![设置 Bacula 时无法通过端口 9102 远程登录到 Windows 7 客户端](https://linux22.com/image/611368/%E8%AE%BE%E7%BD%AE%20Bacula%20%E6%97%B6%E6%97%A0%E6%B3%95%E9%80%9A%E8%BF%87%E7%AB%AF%E5%8F%A3%209102%20%E8%BF%9C%E7%A8%8B%E7%99%BB%E5%BD%95%E5%88%B0%20Windows%207%20%E5%AE%A2%E6%88%B7%E7%AB%AF.png)
我正在尝试为我的所有工作机器设置 Bacula。我的大多数机器都是基于 Linux(Ubuntu)的,我已成功在这些机器上设置了 Bacula。但是,我也有几台 Windows 7 机器,我无法连接到这些机器。director 和存储守护程序托管在 Ubuntu Maverick 10.10 机器上。我已在 Windows 7 机器的防火墙上打开了相关端口(9101-9103)。但是,我仍然无法连接(telnet)到在端口 9101 上托管 director 守护程序的机器。从 Ubuntu 机器到端口 9102 上的 Windows 客户端的连接也不起作用。但是,如果我在进行适当的防火墙更改后使用端口 23 telnet 到机器,则可以建立连接。所有机器都在同一个子网中,我可以 ping 到所有机器。
非常感谢您对此事提供的任何帮助。
编辑:
我已经修复了防火墙问题,现在我能够在服务器和客户端之间进行 telnet 连接。但是,我仍然无法在服务器和客户端之间进行身份验证。我在服务器端收到的错误如下:
10-May 12:00 mydir-dir JobId 6395: Start Backup JobId 6395, Job=server-bkp.2013-05-10_12.00.00_13
10-May 12:00 mydir-dir JobId 6395: Using Device "RAID_Device"
10-May 12:00 mydir-dir JobId 0: Fatal error: Unable to authenticate with File daemon at "myserver.ip.address:9102". Possible causes:
Passwords or names not the same or
Maximum Concurrent Jobs exceeded on the FD or
FD networking messed up (restart daemon).
Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION003760000000000000000 for help.
*q
root@cosmo:~# telnet my-client-hostname.domain 9102
Trying myclient.ip.address...
Connected to my-client-hostname.domain.
Escape character is '^]'.
^[^[
Connection closed by foreign host.
Windows 7 客户端计算机上的我的 bconsole.conf 文件:
Director {
Name = mydir-dir
DIRport = 9101
address = mydir.domain
Password = "my_secret_password"
}
我在客户端上的bacula-fd.conf文件如下:
# Main Director
Director {
Name = mydir-dir
Password = "my_secret_password"
}
# File Daemon
FileDaemon {
Name = my-client-hostname-fd
FDport = 9102
WorkingDirectory = "C:\\Program Files\\Bacula\\working"
Pid Directory = "C:\\Program Files\\Bacula\\working"
Maximum Concurrent Jobs = 10
}
# Where to send messages.
Messages {
Name = Standard
director = mydir-dir = all, !skipped, !restored
}
下面是我服务器上的 /etc/bacula/bacula-dir.conf。请注意,删除了一些不必要的信息。
# Main Director for backup control.
Director {
Name = mydir-dir
DIRport = 9101
QueryFile = "/etc/bacula/scripts/query.sql"
WorkingDirectory = "/home/bacula/bacula/working"
PidDirectory = "/var/run/bacula"
Password = "my_secret_password"
Messages = Standard
}
# Restricted Director for monitoring.
Console {
Name = mydir-mon
Password = "my_other_password"
CommandACL = status, .status
}
# Catalog within the MySQL database
Catalog {
Name = MYDIR_Catalog
DB Name = bacula
DB Address = localhost
user = "MY_USER_NAME"
password = "MY_DB_PASSWORD"
}
# Storage to use for backup
Storage {
Name = RAID_Storage
Password = "MY_SD_PASSWORD"
Address = mydirhost.domain
SDPort = 9103
Device = RAID_Device
Media Type = File
}
# Include client, job, schedule and fileset information
@/etc/bacula/clients/MY-CLIENT-HOSTNAME.conf
最后,我的 /etc/bacula/clients/MY-CLIENT-HOSTNAME.CONF 如下所示。同样,省略了一些不必要的信息。
# Client information for my-client-hostname
Client {
Name = my-client-hostname
Password = "my_secret_password"
Address = my-client-hostname.domain
FDPort = 9102
Catalog = MYDIR_Catalog
}
*请注意,我在所有文件中都使用了相同的“my_secret_password”。
如果有人能告诉我我做错了什么我会非常高兴!!!
答案1
首先,通过运行以下命令验证 bacula 是否在监听正确的端口:
netstat -anb
如果这样没问题的话,那么只需为 bacula 守护进程添加一个防火墙例外:
netsh firewall add allowedprogram "C:\bacula\bin\backula-fd.exe" "bacula daemon" enable
(检查实际的进程名称:已经有一段时间了)
答案2
尝试在客户端 fd 文件配置上注释掉以下行:
FDAddress = 127.0.0.1
变成:
#FDAddress = 127.0.0.1