Windows – Unable to telnet to a Windows 7 client on port 9102 while setting up Bacula

baculanetworkingtelnetwindows

I'm trying to setup Bacula for all my work machines. Most of my machines are Linux (Ubuntu) based and I have successfully managed to setup Bacula on those machines. However, I do have several Windows 7 machines as well and I'm unable to connect to those machines. The director and storage daemon are hosted on a Ubuntu Maverick 10.10 machine. I have opened the relevant ports (9101-9103) on the firewall of my Windows 7 machines. However, I'm still unable to connect (telnet) to the machine that hosts the director daemon on port 9101. The connection from the Ubuntu machine to the windows client on port 9102 doesn't work either. However, the connection is made if I telnet to the machine using port 23, after making the appropriate firewall changes. All the machines are in the same subnet and I can ping to all the machines.

Any help on this matter is greatly appreciated.

Edit:
So I've fixed the firewall issue and now I'm able to telnet between the server and the client. However, I'm still having trouble authenticating between the server and the client. The error I get on the server side is as following:

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.  

My bconsole.conf file on the windows 7 client machine:

Director {
Name = mydir-dir
DIRport = 9101
address = mydir.domain
Password = "my_secret_password"
}

My bacula-fd.conf file on the client is as follows:

# 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
}

This is what my /etc/bacula/bacula-dir.conf on the server is shown below. Note that some unnecessary information is removed.

# 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

Finally, my /etc/bacula/clients/MY-CLIENT-HOSTNAME.CONF is shown below. Again, some unnecessary information is omitted.

# 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
}

*Note that I've used the same "my_secret_password" in all the files.

I'll be fantastically glad if someone could tell me what I'm doing wrong!!!

Best Answer

First, verify that bacula is listening on the correct port by running this command:

netstat -anb

If this is fine, then just add a firewall exception for the bacula daemon process:

netsh firewall add allowedprogram "C:\bacula\bin\backula-fd.exe" "bacula daemon" enable

(check the actual process name: it's been a while)