After resolving the “device is not open” error, I got this “SDSocket closed” error. This is how I fixed it.
Fortunately, this error was as easy to resolve as the other one. I just had to open up my Bacula director configuration file (bacula-dir.conf) and edit the Storage Address directive.
Fixing the “SDSocket Closed” Error in Bacula
I had configured things through the Webmin module (which is helpful sometimes, but as was demonstrated in this instance, it’s not fool-proof). Since the storage daemon was operating on the same machine, I thought it would be okay to have the Address listed as “localhost.”
If I had looked at the configuration file first, I would have seen that you aren’t supposed to use “localhost” for this Address. I swapped it out for the IP address of the machine, and everything worked fine afterwards.
# Definition of file storage device
Name = san2-sd
# Do not use "localhost" here
Address = 192.168.3.17
SDPort = 9103
Password = ********
Device = FileStorage
Media Type = File
Maximum Concurrent Jobs = 20