【问题标题】:Bacula bconsole - Director authorization fail (localhost)Bacula bconsole - 导演授权失败(本地主机)
【发布时间】:2020-05-03 19:49:46
【问题描述】:

嗨!

我有 Ubuntu 16.04.1 LTS
还有我的 bacula 服务:

$ service --status-all | grep bacula
[ + ]  bacula-director
[ + ]  bacula-fd
[ + ]  bacula-sd

Bacula 版本 5.2.6(2012 年 2 月 21 日)- ubuntu 14.04
Bacula 导演配置:

Director {                            # define myself
  Name = ubuntu-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run/bacula"
  Maximum Concurrent Jobs = 10
  Password = "password-bacula-dir"         # Console password
  Messages = Daemon
  DirAddress = localhost
# DirAddresses = {
#   ip = { addr = 127.0.0.1; port = 9101; }
#   ip = { addr = 10.0.5.71; port = 9101; }
# }
}

bconsole 配置:

Director {
  Name = ubuntu-dir
  DIRport = 9101
  address = localhost
  Password = "password-bacula-dir"
}

$ netstat -anp |听听 | grep bacula

tcp        0      0 127.0.0.1:9101          0.0.0.0:*               LISTEN      5532/bacula-dir 
tcp        0      0 127.0.0.1:9102          0.0.0.0:*               LISTEN      1091/bacula-fd  
tcp        0      0 127.0.0.1:9103          0.0.0.0:*               LISTEN      1072/bacula-sd  

所以,当我使用

$ bconsole

得到错误:

Connecting to Director localhost:9101
Director authorization problem.
Most likely the passwords do not agree.
If you are using TLS, there may have been a certificate validation error during the TLS handshake.
Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION00260000000000000000 for help.

错误可能在哪里?

附: ufw被禁用

【问题讨论】:

    标签: bacula


    【解决方案1】:

    我的命令与 RHEL\CentOS 和 Bacula 5.2.13(2013 年 2 月 19 日)相关,我现在没有 Ubuntu 实例

    首先尝试检查您的配置:

    bacula-dir -tc path-to-bacula-dir.config
    bconsole -tc path-to-bacula-console.config
    

    然后重启bacula director服务:

    systemctl restart bacula-dir
    

    然后再次检查bconsole

    我想你的 bacula director 实例有过时的配置(不是来自文件的当前配置)

    【讨论】:

      【解决方案2】:

      我遇到了类似的问题,原因是 bconsole.conf 和 bacula-dir.conf 的 director 部分的密码不一样。 编辑密码,然后重新启动服务。现在应该可以了

      【讨论】:

        【解决方案3】:

        我之前也遇到过这个问题,我找到的解决方法是在 bacula-dir.conf 配置中去掉密码中的引号

        Director {
          Name = ubuntu-dir
          DIRport = 9101
          QueryFile = "/etc/bacula/scripts/query.sql"
          WorkingDirectory = "/var/lib/bacula"
          PidDirectory = "/var/run/bacula"
          Maximum Concurrent Jobs = 10
          Password = password-bacula-dir
          Messages = Daemon
          DirAddress = localhost
        }
        

        然后是bacula的bconsole.conf,在密码两边加上引号:

        Director {
          Name = ubuntu-dir
          DIRport = 9101
          address = localhost
          Password = "password-bacula-dir"
        }
        

        然后最后重启所有bacula服务:

        sudo systemctl restart bacula-dir
        sudo systemctl restart bacula-sd
        sudo systemctl restart bacula-fd
        

        重启后,您应该可以使用以下命令连接到 bconsole:

        sudo bconsole
        

        这对我有用(Ubuntu 16.04)

        【讨论】:

        • 您必须始终将密码放在引号中。留下报价有一些问题。例如,如果您的密码是数字,则 service bacula-director 不会启动并显示错误消息“配置错误:需要一个字符串,得到 T_NUMBER...”
        猜你喜欢
        • 2016-01-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-06-28
        • 1970-01-01
        相关资源
        最近更新 更多