Fatal error bad response to storage command wanted 2000 ok storage got 2902 bad storage

Здравствуйте. Пытаюсь настроить bacula. Директор и файловый демон располагаются на одной физической железке, клиент на удалённом сервере.

Здравствуйте. Пытаюсь настроить bacula. Директор и файловый демон располагаются на одной физической железке, клиент на удалённом сервере.

Сначала покажу конфиги.

Директор:

Код: Выделить всё

Messages {
Name = Daemon
syslog = all
}

Messages {
Name = Standard
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f "(Bacula) <%r>" -s "Bacula: %t %e of %c %l" %r"
operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f "(Bacula) <%r>" -s "Bacula: Intervention needed for %j" %r"
mail = root@localhost = all, !skipped
operator = root@localhost = mount
console = all, !skipped, !saved
append = "/var/lib/bacula/log" = all, !skipped
catalog = all
}

Director { # define myself
Name = backup-store-director
DIRport = 9101 # where we listen for UA connections
Password = "ПАРОЛЬ1"
Messages = Daemon
QueryFile = "/etc/bacula/scripts/query.sql"
WorkingDirectory = "/var/bacula/director"
PidDirectory = "/var/run/bacula"
Maximum Concurrent Jobs = 5
DirAddress = ВНЕШНИЙ АЙПИ СЕРВЕРА С ДИРЕКТОРОМ
}

Catalog {
Name = mutaborCatalog
dbname = bacula_db;
DB Address = "localhost";
dbuser = "baculauser";
dbpassword = "ghjcnjpass"
}

Client {
Name = mutabor
Address = АЙПИ КЛИЕНТА
FDPort = 9102
Catalog = mutaborCatalog
Password = "ПАРОЛЬ2"
AutoPrune = yes
File Retention = 30 days
Job Retention = 6 months
}

FileSet {
Name = mutabor-fileset
Include {
Options {
compression=GZIP3
signature=SHA1
verify=pins5
recurse=yes
hardlinks=yes
}
File = "/etc/"
File = "/home/"
File = "/var/www/"
}
}

Storage {
Name = backup_store
Address = localhost
SDPort = 9103
Password = 'ПАРОЛЬ3'
Device = Mutabor_Device
Media Type = File
Maximum Concurrent Jobs = 1
}

Pool {
Name = main_pool
Maximum Volumes = 4
Pool Type = Backup
Storage = backup_store
Maximum Volume Jobs = 7
Volume Retention = 21
Recycle = yes # Может ли бакула удалять задания из томов
AutoPrune = yes # Может ли бакула очищать тома
}

Schedule {
Name = mutabor_schedule
Run = Full mon-sat at 0:00
}

Job {
Name = mutabor_full
Type = Backup
Level = Full
Client = mutabor
FileSet = mutabor-fileset
Pool = main_pool
Schedule = mutabor_schedule
Storage = backup_store
Messages = Standard
}

Сторейдж демон:

Код: Выделить всё

Messages {
Name = Standard
director = backup-store-director = all
}
Storage {
Name = backup_store
WorkingDirectory = /var/bacula/storage
PidDirectory = /var/run
Maximum Concurrent Jobs = 20
SDAddress = localhost
SDPort = 9103
}
Director {
Name = backup-store-director
Password = 'ПАРОЛЬ3'
}
Device {
Name = Mutabor_Device
ArchiveDevice = /data/bacula
Label media = no
Media Type = File
}

Клиента:

Код: Выделить всё

Messages {
  Name = Standard
  mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f "(Bacula) <%r>" -s "Bacula: %t %e of %c %l" %r"
  operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f "(Bacula) <%r>" -s "Bacula: Intervention needed for %j" %r"
  mail = root@localhost = all, !skipped
  operator = root@localhost = mount
  console = all, !skipped, !saved
  append = "/var/lib/bacula/log" = all, !skipped
  catalog = all
}

Client {
  Name = mutabor
  Working Directory = /var/bacula
  Pid Directory = /var/run
  Maximum Concurrent Jobs = 2
  FDPort = 9102
  FDAddress = ВНЕШНИЙ АЙПИ СЕРВЕРА С ДИРЕКТОРОМ
}

Director {
  Name = backup-store-director
  Password = "ПАРОЛЬ2"
}

Из бакуловской консоли запускаю задание:

run mutabor_full
Automatically selected Catalog: mutaborCatalog
Using Catalog «mutaborCatalog»
Run Backup job
JobName: mutabor_full
Level: Full
Client: mutabor
FileSet: mutabor-fileset
Pool: main_pool (From Job resource)
Storage: backup_store (From Pool resource)
When: 2011-11-16 18:55:28
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=15

В webacula с надеждой смотрю на список выполняющихся заданий. 20-30 минут задание висит со статусом «is waiting for Client mutabor to connect to Storage backup_store». Потом отваливается. В логах вижу вот что:

2011-11-18 13:34:09 backup-store-director JobId 26: Start Backup JobId 26, Job=mutabor_full.2011-11-18_13.34.07_04
2011-11-18 13:34:09 backup-store-director JobId 26: Created new Volume «main_pool0001» in catalog.
2011-11-18 13:34:09 backup-store-director JobId 26: Using Device «Mutabor_Device»
2011-11-18 14:04:10 backup-store-director JobId 26: Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2902 Bad storage
2011-11-18 14:04:10 backup-store-director JobId 26: Error: Bacula backup-store-director 5.0.2 (28Apr10): 18-Nov-2011 14:04:10
Build OS: x86_64-pc-linux-gnu debian squeeze/sid
JobId: 26
Job: mutabor_full.2011-11-18_13.34.07_04
Backup Level: Full
Client: «mutabor» 5.0.0 (26Jan10) x86_64-unknown-linux-gnu,redhat,(Final)
FileSet: «mutabor-fileset» 2011-11-14 00:00:00
Pool: «main_pool» (From Job resource)
Catalog: «mutaborCatalog» (From Client resource)
Storage: «backup_store» (From Pool resource)
Scheduled time: 18-Nov-2011 13:33:28
Start time: 18-Nov-2011 13:34:09
End time: 18-Nov-2011 14:04:10
Elapsed time: 30 mins 1 sec
Priority: 1
FD Files Written: 0
SD Files Written: 0
FD Bytes Written: 0 (0 B)
SD Bytes Written: 0 (0 B)
Rate: 0.0 KB/s
Software Compression: None
VSS: no
Encryption: no
Accurate: no
Volume name(s):
Volume Session Id: 2
Volume Session Time: 1321606037
Last Volume Bytes: 0 (0 B)
Non-fatal FD errors: 0
SD Errors: 0
FD termination status: Error
SD termination status: Waiting on FD
Termination: *** Backup Error ***

Ошибка «Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2902 Bad storage» гуглится, но у большинства проблема соединения (лог содержит ещё и Fatal error: Failed to connect to
Storage daemon: ) и после правки адресов или перестройки фаервола проблема исчезает. У меня порты открыты, пароли совпадают.

На сервере (директор, сервер хранения) — центос, на клиенте — дебиан.

Права на каталоги:

ls -la /var/bacula/
drwx—— 4 bacula bacula 4096 Nov 17 18:43 .
drwxr-xr-x 15 root root 4096 Nov 9 17:06 ..
drwx—— 2 bacula bacula 4096 Nov 18 14:04 director
drwx—— 3 bacula tape 4096 Nov 18 14:04 storage

ls -la /data/
drwxr-xr-x 3 root root 4096 Nov 10 19:55 .
drwxr-xr-x 24 root root 4096 Nov 10 19:55 ..
drwx—— 2 bacula tape 4096 Nov 10 19:55 bacula

Прошу помощи.

Scenario: Server backs itself up just fine. Tried adding a file daemon on another computer, my workstation, and the job for that fails with the error «2902 Bad storage». The log also gives a link to bacula documentation regarding passwords but I think my configuration is already following the rules set there.

server daemons

director

#
# Default Bacula Director Configuration file
#
#  The only thing that MUST be changed is to add one or more
#   file or directory names in the Include directive of the
#   FileSet resource.
#
#  For Bacula release 5.2.12 (12 September 2012) -- gentoo 
#
#  You might also want to change the default email address
#   from root to your address.  See the "mail" and "operator"
#   directives in the Messages resource.
#

Director {                            # define myself
  Name = castellan-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/usr/libexec/bacula/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run"
  Maximum Concurrent Jobs = 1
  Password = "GRek4WPD2RlNGkdzhW00zyA6Xg2FU/fFMVP2eQyWEzi6"         # Console password
  Messages = Daemon
}

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = castellan-fd 
#  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = MainBackupArray
  Messages = Standard
  Pool = File
  Priority = 10
  Write Bootstrap = "/var/lib/bacula/%c.bsr"

  RunScript {
    RunsWhen = Before
    FailJobOnError = No
    RunsOnClient = No
    Command = "/bin/mount /dev/md4"
  }
  RunScript {
    RunsWhen = After
    RunsOnSuccess = Yes
    RunsOnFailure = Yes
    RunsOnClient = No
    Command = "/bin/umount /dev/md4"
  }

}


#
# Define the main nightly save backup job
#   By default, this job will back up to disk in /tmp
Job {
  Name = "BackupCastellan"
  JobDefs = "DefaultJob"
  FileSet = "Full Set"
}

Job {
  Name = "BackupLiege"
  JobDefs = "DefaultJob"
  Client = liege-fd
  FileSet = "LiegeFullset"
}

#Job {
#  Name = "BackupClient2"
#  Client = castellan2-fd
#  JobDefs = "DefaultJob"
#}

# Backup the catalog database (after the nightly save)
Job {
  Name = "BackupCatalog"
  JobDefs = "DefaultJob"
  Level = Full
  FileSet = "Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  # This creates an ASCII copy of the catalog
  # Arguments to make_catalog_backup.pl are:
  #  make_catalog_backup.pl <catalog-name>
  RunBeforeJob = "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"
  # This deletes the copy of the catalog
  RunAfterJob  = "/usr/libexec/bacula/delete_catalog_backup"
  Write Bootstrap = "/var/lib/bacula/%n.bsr"
  Priority = 11                   # run after main backup
}

#
# Standard Restore template, to be changed by Console program
#  Only one such job is needed for all Jobs/Clients/Storage ...
#
Job {
  Name = "RestoreFiles"
  Type = Restore
  Client = castellan-fd                 
  FileSet = "Full Set"                  
  Storage = MainBackupArray
  Pool = Default
  Messages = Standard
  Where = /tmp/bacula-restores

  RunScript {
    RunsWhen = Before
    FailJobOnError = No
    RunsOnClient = No
    Command = "/bin/mount /dev/md4"
  }
  RunScript {
    RunsWhen = After
    RunsOnSuccess = Yes
    RunsOnFailure = Yes
    RunsOnClient = No
    Command = "/bin/umount /dev/md4"
  }

}


# List of files to be backed up
FileSet {
  Name = "Full Set"
  Include {
    Options {
      signature = MD5
      compression=gzip
    }
    File = /
    File = /boot
    File = /var
  }

  Exclude {
    File = /dev
    File = /var/lib/bacula
    File = /proc
    File = /mnt
    File = /media
    File = /.journal
    File = /.fsck
    File = /var/lib/minecraft/wholebackups
    File = /var/lib/minecraft/backups
    File = /var/nas/live_torrents
  }
}

FileSet {
  Name = "LiegeFullset"
  Include {
    Options {
      signature = MD5
      compression=gzip
    }
    File = "C:/" 
  }

  Exclude {
    File = "C:/Temp"
  }
}




#
# When to do the backups, full backup on first sunday of the month,
#  differential (i.e. incremental since full) every other sunday,
#  and incremental backups other days
Schedule {
  Name = "WeeklyCycle"
  Run = Full 1st sun at 2:05
  Run = Differential 2nd-5th sun at 2:05
  Run = Incremental mon-sat at 2:05
}

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
  Name = "WeeklyCycleAfterBackup"
  Run = Full sun-sat at 4:00
}

# This is the backup of the catalog
FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5
    }
    File = "/var/lib/bacula/bacula.sql"
  }
}

# Client (File Services) to backup
Client {
  Name = castellan-fd
  Address = castellan
  FDPort = 9102
  Catalog = MyCatalog
  Password = "PeVkZSMSO/rvermyd0shMYfTGg70P3gB2YBdkXcEwDdE"          # password for FileDaemon
  File Retention = 2 months            # 30 days
  Job Retention = 12 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

# Client (File Services) to backup
Client {
  Name = liege-fd
  Address = liege
  FDPort = 9102
  Catalog = MyCatalog
  Password = "vZwrnQRZanw4q8BE3BEraGsc9UQnehYHNyvirP1fhURU"      # password for FileDaemon
  File Retention = 2 months            # 30 days
  Job Retention = 12 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

#
# Second Client (File Services) to backup
#  You should change Name, Address, and Password before using
#
#Client {
#  Name = castellan2-fd                
#  Address = castellan2
#  FDPort = 9102
#  Catalog = MyCatalog
#  Password = "PeVkZSMSO/rvermyd0shMYfTGg70P3gB2YBdkXcEwDdE2"         # password for FileDaemon 2
#  File Retention = 30 days            # 30 days
#  Job Retention = 6 months            # six months
#  AutoPrune = yes                     # Prune expired Jobs/Files
#}


# Definition of file storage device
Storage {
  Name = MainBackupArray
# Do not use "localhost" here    
  Address = 192.168.10.192                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "3Yzd6Ohb5GMWfMZx8GJbQNf06BSV3WpMQK3Tl3tTsil2"
  Device = MainBackupArray
  Media Type = File
}



# Definition of DDS tape storage device
#Storage {
#  Name = DDS-4    
#  Do not use "localhost" here
#  Address = castellan                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "3Yzd6Ohb5GMWfMZx8GJbQNf06BSV3WpMQK3Tl3tTsil2"          # password for Storage daemon
#  Device = DDS-4                      # must be same as Device in Storage daemon
#  Media Type = DDS-4                  # must be same as MediaType in Storage daemon
#  Autochanger = yes                   # enable for autochanger device
#}

# Definition of 8mm tape storage device
#Storage {
#  Name = "8mmDrive"
#  Do not use "localhost" here
#  Address = castellan                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "3Yzd6Ohb5GMWfMZx8GJbQNf06BSV3WpMQK3Tl3tTsil2"
#  Device = "Exabyte 8mm"
#  MediaType = "8mm"
#}

# Definition of DVD storage device
#Storage {
#  Name = "DVD"
#  Do not use "localhost" here
#  Address = castellan                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "3Yzd6Ohb5GMWfMZx8GJbQNf06BSV3WpMQK3Tl3tTsil2"
#  Device = "DVD Writer"
#  MediaType = "DVD"
#}


# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
# dbdriver = "dbi:mysql"; dbaddress = 127.0.0.1; dbport =  
  dbname = "bacula"; dbuser = "bacula"; dbpassword = "GMWfMZx8GJbQNf06BSV3WpMQK3Tl3tTsil2"
}

# Reasonable message delivery -- send most everything to email address
#  and to the console
Messages {
  Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
#  to replace the %r in the from field (-f part) with a single valid
#  email address in both the mailcommand and the operatorcommand.
#  What this does is, it sets the email address that emails would display
#  in the FROM field, which is by default the same email as they're being
#  sent to.  However, if you send email to more than one address, then
#  you'll have to set the FROM address manually, to a single address. 
#  for example, a 'no-reply@mydomain.com', is better since that tends to
#  tell (most) people that its coming from an automated source.

#
  mailcommand = "/usr/sbin/bsmtp -h localhost -f "(Bacula) <bacula@aehdev.com>" -s "Bacula: %t %e of %c %l" %r"
  operatorcommand = "/usr/sbin/bsmtp -h localhost -f "(Bacula) <bacula@aehdev.com>" -s "Bacula: Intervention needed for %j" %r"
  mail = aeheathc@gmail.com = all, !skipped            
  operator = aeheathc@gmail.com = mount
  console = all, !skipped, !saved
#
# WARNING! the following will create a file that you must cycle from
#          time to time as it will grow indefinitely. However, it will
#          also keep all your messages if they scroll off the console.
#
  append = "/var/log/bacula/working/bacula.log" = all, !skipped
  catalog = all
}


#
# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "/usr/sbin/bsmtp -h localhost -f "(Bacula) <%r>" -s "Bacula daemon message" %r"
  mail = aeheathc@gmail.com = all, !skipped            
  console = all, !skipped, !saved
  append = "/var/log/bacula/working/bacula.log" = all, !skipped
}

# Default pool definition
Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 2 days         # one year
}

# File Pool definition
Pool {
  Name = File
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 2 days         # one year
  Maximum Volume Bytes = 100G          # Limit Volume size to something reasonable
  Maximum Volumes = 1000               # Limit number of Volumes in Pool
  LabelFormat = "Vol"
}


# Scratch pool definition
Pool {
  Name = Scratch
  Pool Type = Backup
}

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = castellan-mon
  Password = "4BcHoJRAOkZJlMf8wm6s11ZoAfwYYpefAnMstlzfUj7h"
  CommandACL = status, .status
}

file

#
# Default  Bacula File Daemon Configuration file
#
#  For Bacula release 5.2.13 (19 February 2013) -- gentoo 
#
# There is not much to change here except perhaps the
# File daemon Name to
#

#
# List Directors who are permitted to contact this File daemon
#
Director {
  Name = castellan-dir
  Password = "PeVkZSMSO/rvermyd0shMYfTGg70P3gB2YBdkXcEwDdE"
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the file daemon
#
Director {
  Name = castellan-mon
  Password = "QEN/69pxCIYQ9GOvJK+XL1VGLl8ovRxfSMOe1Kt2Q/Fp"
  Monitor = yes
}

#
# "Global" File daemon configuration specifications
#
FileDaemon {                          # this is me
  Name = castellan-fd
  FDport = 9102                  # where we listen for the director
  WorkingDirectory = /var/lib/bacula
  Pid Directory = /var/run
  Maximum Concurrent Jobs = 20
}

# Send all messages except skipped files back to Director
Messages {
  Name = Standard
  director = castellan-dir = all, !skipped, !restored
}

storage

#
# Default Bacula Storage Daemon Configuration file
#
#  For Bacula release 5.2.12 (12 September 2012) -- gentoo 
#
# You may need to change the name of your tape drive
#   on the "Archive Device" directive in the Device
#   resource.  If you change the Name and/or the 
#   "Media Type" in the Device resource, please ensure
#   that dird.conf has corresponding changes.
#

Storage {                             # definition of myself
  Name = castellan-sd
  SDPort = 9103                  # Director's port      
  WorkingDirectory = "/var/lib/bacula"
  Pid Directory = "/var/run"
  Maximum Concurrent Jobs = 20
}

#
# List Directors who are permitted to contact Storage daemon
#
Director {
  Name = castellan-dir
  Password = "3Yzd6Ohb5GMWfMZx8GJbQNf06BSV3WpMQK3Tl3tTsil2"
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the storage daemon
#
Director {
  Name = castellan-mon
  Password = "uA1iI8Vxirh+JZc7zPTengOQt978CG3F6V3MNI/I2Sbi"
  Monitor = yes
}

#
# Note, for a list of additional Device templates please
#  see the directory <bacula-source>/examples/devices
# Or follow the following link:
#  http://bacula.svn.sourceforge.net/viewvc/bacula/trunk/bacula/examples/devices/
#

#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
#  same Name and MediaType. 
#

Device {
  Name = MainBackupArray
  Media Type = File
  Archive Device = /mnt/backup/main
  LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  Requires Mount = no;
  RemovableMedia = no;
  AlwaysOpen = no;
  #Mount Command = "/bin/mount /dev/md4";
  #Unmount Command = "/bin/umount /dev/md4";
  Mount Point = "/mnt/backup"
  Write Part Command = ""
}

#
# An autochanger device with two drives
#
#Autochanger {
#  Name = Autochanger
#  Device = Drive-1
#  Device = Drive-2
#  Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
#  Changer Device = /dev/sg0
#}

#Device {
#  Name = Drive-1                      #
#  Drive Index = 0
#  Media Type = DLT-8000
#  Archive Device = /dev/nst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  AutoChanger = yes
#  #
#  # Enable the Alert command only if you have the mtx package loaded
#  # Note, apparently on some systems, tapeinfo resets the SCSI controller
#  #  thus if you turn this on, make sure it does not reset your SCSI 
#  #  controller.  I have never had any problems, and smartctl does
#  #  not seem to cause such problems.
#  #
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#Device {
#  Name = Drive-2                      #
#  Drive Index = 1
#  Media Type = DLT-8000
#  Archive Device = /dev/nst1
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A Linux or Solaris LTO-2 tape drive
#
#Device {
#  Name = LTO-2
#  Media Type = LTO-2
#  Archive Device = /dev/nst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  Maximum File Size = 3GB
## Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
## Changer Device = /dev/sg0
## AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
## If you have smartctl, enable this, it has more info than tapeinfo 
## Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A Linux or Solaris LTO-3 tape drive
#
#Device {
#  Name = LTO-3
#  Media Type = LTO-3
#  Archive Device = /dev/nst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  Maximum File Size = 4GB
## Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
## Changer Device = /dev/sg0
## AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
## If you have smartctl, enable this, it has more info than tapeinfo 
## Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A Linux or Solaris LTO-4 tape drive
#
#Device {
#  Name = LTO-4
#  Media Type = LTO-4
#  Archive Device = /dev/nst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  Maximum File Size = 5GB
## Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
## Changer Device = /dev/sg0
## AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
## If you have smartctl, enable this, it has more info than tapeinfo 
## Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}




#
# A FreeBSD tape drive
#
#Device {
#  Name = DDS-4 
#  Description = "DDS-4 for FreeBSD"
#  Media Type = DDS-4
#  Archive Device = /dev/nsa1
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes
#  Offline On Unmount = no
#  Hardware End of Medium = no
#  BSF at EOM = yes
#  Backward Space Record = no
#  Fast Forward Space File = no
#  TWO EOF = yes
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

# 
# Send all messages to the Director, 
# mount messages also are sent to the email address
#
Messages {
  Name = Standard
  director = castellan-dir = all
}

Workstation

file

#
# Default  Bacula File Daemon Configuration file
#
#  For Bacula release 7.0.5 (08/05/14) -- Windows MinGW64
#
# There is not much to change here except perhaps the
# File daemon Name
#

#
# "Global" File daemon configuration specifications
#
FileDaemon {                            # this is me
  Name = liege-fd
  FDport = 9102                # where we listen for the director
  WorkingDirectory = "C:\Program Files\Bacula\working"
  Pid Directory = "C:\Program Files\Bacula\working"
  Plugin Directory = "C:\Program Files\Bacula\plugins"
  Maximum Concurrent Jobs = 10
}

#
# List Directors who are permitted to contact this File daemon
#
Director {
  Name = castellan-dir
  Password = "vZwrnQRZanw4q8BE3BEraGsc9UQnehYHNyvirP1fhURU"  # Director must know this password
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the file daemon
#
Director {
  Name = liege-mon
  Password = ""
  Monitor = yes
}

# Send all messages except skipped files back to Director
Messages {
  Name = Standard
  director = castellan-dir = all, !skipped, !restored
}

Job result

28-Mar 02:05 castellan-dir JobId 1518: No prior Full backup Job record found.
28-Mar 02:05 castellan-dir JobId 1518: No prior or suitable Full backup found in catalog. Doing FULL backup.
28-Mar 02:07 castellan-dir JobId 1518: shell command: run BeforeJob "/bin/mount /dev/md4"
28-Mar 02:07 castellan-dir JobId 1518: Start Backup JobId 1518, Job=BackupLiege.2015-03-28_02.05.00_19
28-Mar 02:07 castellan-dir JobId 1518: Using Device "MainBackupArray" to write.
28-Mar 01:48 liege-fd JobId 1518: Fatal error: Authorization key rejected by Storage daemon.
Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION00260000000000000000 for help.
28-Mar 02:07 castellan-dir JobId 1518: Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2902 Bad storage

28-Mar 02:07 castellan-dir JobId 1518: Error: Bacula castellan-dir 5.2.13 (19Jan13):
  Build OS:               x86_64-pc-linux-gnu gentoo
  JobId:                  1518
  Job:                    BackupLiege.2015-03-28_02.05.00_19
  Backup Level:           Full (upgraded from Incremental)
  Client:                 "liege-fd" 7.0.5 (04Aug14) Microsoft Windows 7 Ultimate Edition Service Pack 1 (build 7601), 64-bit,Cross-compile,Win64
  FileSet:                "LiegeFullset" 2015-03-18 02:05:00
  Pool:                   "File" (From Job resource)
  Catalog:                "MyCatalog" (From Client resource)
  Storage:                "MainBackupArray" (From Job resource)
  Scheduled time:         28-Mar-2015 02:05:00
  Start time:             28-Mar-2015 02:07:29
  End time:               28-Mar-2015 02:07:41
  Elapsed time:           12 secs
  Priority:               10
  FD Files Written:       0
  SD Files Written:       0
  FD Bytes Written:       0 (0 B)
  SD Bytes Written:       0 (0 B)
  Rate:                   0.0 KB/s
  Software Compression:   None
  VSS:                    no
  Encryption:             no
  Accurate:               no
  Volume name(s):
  Volume Session Id:      127
  Volume Session Time:    1422045928
  Last Volume Bytes:      86,414,167,951 (86.41 GB)
  Non-fatal FD errors:    2
  SD Errors:              0
  FD termination status:  Error
  SD termination status:  Waiting on FD
  Termination:            *** Backup Error ***

28-Mar 02:07 castellan-dir JobId 1518: shell command: run AfterJob "/bin/umount /dev/md4"

I have a Bacula setup with 9 clients, and it’s working happily. Today I had to add another client, so I went and copied+adapted the existing configuration files from another client, but when I schedule a job for the new client, I get these errors:

20-Mar 17:50 tools-dir JobId 39: Start Backup JobId 39, Job=BackupPresenze2.2012-03-20_17.50.49_04
20-Mar 17:50 tools-dir JobId 39: Using Device "FileStorage"
20-Mar 17:50 presenze2-fd JobId 39: Fatal error: Failed to connect to Storage daemon: bacula.mylan.local:9103
20-Mar 17:50 tools-dir JobId 39: Fatal error: Bad response to Storage command: wanted 2000 OK storage
, got 2902 Bad storage

From the client I can telnet to bacula.mylan.local:9103 just fine, and jobs for other clients work successfully… What could I check?
(Server and client run Ubuntu 10.04, if it’s relevant)

asked Mar 20, 2012 at 16:57

Joril's user avatar

It looks like it was a «slow DNS» kind of problem… I added the hostname to /etc/hosts and now Bacula works happily.

answered Mar 21, 2012 at 8:55

Joril's user avatar

JorilJoril

1,5521 gold badge19 silver badges28 bronze badges

2

In my case it was firewall — FD (client) could not connect to SD (storage daemon) to port tcp/9103. But director could normally retrieve client status with status client=myclient-fd (as DIR could connect to FD to port tcp/9102)

The error is confusing as on causal look it sounds like SD is returning error to FD (which would imply that FD could connect to SD afterall), while in reality it is DIR noticing that FD did not connect to SD and issuing error.

answered Apr 28, 2017 at 15:04

Matija Nalis's user avatar

Matija NalisMatija Nalis

2,45923 silver badges37 bronze badges

[rt@bacula user]# netstat -anp | grep bac
tcp        0      0 127.0.0.1:9101          0.0.0.0:*               LISTEN      48075/bacula-dir
tcp        0      0 0.0.0.0:9102            0.0.0.0:*               LISTEN      48077/bacula-fd
tcp        0      0 10.x.y.z:9103        0.0.0.0:*               LISTEN      48076/bacula-sd #<---
Storage {                             # definition of myself
  Name = bacula-sd
  SDPort = 9103                  # Director's port
  WorkingDirectory = "/var/spool/bacula"
  Pid Directory = "/var/run"
  Maximum Concurrent Jobs = 20
# SDAddress = {{ ansible_fqdn }}
}

After adding another interface to the storage system these Bad storage errors started showing up. After looking into it the StorageDaemon was only listening to one interface. Commenting SDAddress forces the sd to listen to all interfaces.

answered Jun 10, 2021 at 5:45

Riccardo B.'s user avatar

Здравствуйте.
Настраиваю бакулу для резервирования, пока тестовый сервер.

В общем основы настроил, на локальном сервере задания выполняет, а вот добавляю удаленного клиента:

Client {
  Name = asstream
  Address = xxx.xxx.xxx.xxx #ip
  FDPort = 9102
  Catalog = MyCatalog
@/etc/bacula/bacula-fd-password.conf
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

К нему fileset:

FileSet {
  Name = «asstream»
  Include {
    Options {
      signature = MD5
    }
    File = /home/admin/Stream
  }
}

Job:

Job {
  Name = «DefaultJob»
  Type = Backup
  Level = Incremental
  Client = fd
  FileSet = «Catalog»
  Storage = File
  Schedule = «minutes»
  Messages = syslog
  Pool = Default
  Priority = 10
  Write Bootstrap = «/var/lib/bacula/defaultjob.bsr»
}

Job {
  Name = «asstream»
  Type = Backup
  Level = Incremental
  Client = asstream
  FileSet = «asstream»
  Storage = File
  Schedule = «minutes»
  Messages = syslog
  Pool = asstream
  Priority = 11
  Write Bootstrap = «/var/lib/bacula/asstream.bsr»
}

Вот так настроен у меня Storage:

Storage {
  Name = File
# Do not use «localhost» here
  Address = 127.0.0.1                # N.B. Use a fully qualified name here
  SDPort = 9103
@/etc/bacula/bacula-sd-password.conf
  Device = FileStorage
  Media Type = File
}

Такой device:

Device {
  Name = FileStorage
  Media Type = File
  Archive Device = /backup
  LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}

Director и Catalog из конфига bacula-dir.conf:

Director {                            # define myself
  Name = dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = «/usr/share/bacula/scripts/query.sql»
  WorkingDirectory = «/var/lib/bacula»
  PidDirectory = «/var/run/bacula»
  Maximum Concurrent Jobs = 1
@/etc/bacula/bacula-dir-password.conf
  Messages = syslog
}

# Generic catalog service
Catalog {
  Name = MyCatalog
  dbname = bacula
  user = bacula
  password = «xxxx»
}

А теперь так настроено на удаленном клиенте bacula-fd.conf:

# List Directors who are permitted to contact this File daemon
#
Director {
  Name = dir
@/etc/bacula/bacula-fd-password.conf
}

FileDaemon {                          # this is me
  Name = asstream
  FDport = 9102                  # where we listen for the director
  WorkingDirectory = /var/lib/bacula
  Pid Directory = /var/run/bacula
  Maximum Concurrent Jobs = 20
}

# Send all messages except skipped files back to Director
Messages {
  Name = syslog
  syslog = all
}

В bconsole по команде status клиента видит и опрашивает(пароль верный):

asstream Version: 5.0.3 (04 August 2010)  x86_64-alt-linux-gnu altlinux Sisyphus
Daemon started 17-Oct-13 15:21. Jobs: run=0 running=0.
 Heap: heap=266,240 smbytes=14,881 max_bytes=17,597 bufs=47 max_bufs=64
 Sizeof: boffset_t=8 size_t=8 debug=0 trace=0

Running Jobs:
Director connected at: 18-Oct-13 11:29
No Jobs running.

Пишу run, хочу забекапить, в итоге задание создается, но так и висит(минут 10):

JobId Level   Name                       Status
======================================================================
    12 Full    asstream.2013-10-18_11.31.19_06 is waiting for Client asstream to connect to Storage File

А потом error:

Terminated Jobs:
 JobId  Level    Files      Bytes   Status   Finished        Name
====================================================================
     2  Full          0         0   Error    16-Oct-13 11:40 DefaultJob
     3  Full          1         9   OK       16-Oct-13 11:43 DefaultJob
     4  Incr          0         0   OK       16-Oct-13 11:47 DefaultJob
     5                1         9   OK       17-Oct-13 09:47 RestoreFiles
     6  Full          1         9   OK       17-Oct-13 11:43 DefaultJob
     7  Full          0         0   Error    17-Oct-13 15:09 asstream
     8  Full          0         0   Error    17-Oct-13 15:55 asstream
     9  Incr          0         0   OK       17-Oct-13 15:55 DefaultJob
    12  Full          0         0   Error    18-Oct-13 10:40 asstream

Вот лог:

Oct 18 11:31:19 backup bacula-dir: dir JobId 12: No prior Full backup Job record found.
Oct 18 11:31:19 backup bacula-dir: dir JobId 12: No prior or suitable Full backup found in catalog. Doing FULL backup.
Oct 18 11:31:21 backup bacula-dir: dir JobId 12: Start Backup JobId 12, Job=asstream.2013-10-18_11.31.19_06
Oct 18 11:31:21 backup bacula-dir: dir JobId 12: Using Device «FileStorage» to write.
Oct 18 11:40:01 backup crond[22607]: (root) CMD (/usr/lib/sa/sa1 -S DISK 1 1)
Oct 18 11:50:01 backup crond[22618]: (root) CMD (/usr/lib/sa/sa1 -S DISK 1 1)
Oct 18 12:00:01 backup crond[22622]: (root) CMD (/usr/lib/sa/sa1 -S DISK 1 1)
Oct 18 12:01:01 backup crond[22625]: (root) CMD (run-parts /etc/cron.hourly)
Oct 18 12:01:21 backup bacula-dir: dir JobId 12: Fatal error: Bad response to Storage command: wanted 2000 OK storage
Oct 18 12:01:21 backup bacula-dir: , got 2902 Bad storage
Oct 18 12:01:21 backup bacula-dir:
Oct 18 12:01:21 backup bacula-dir: dir JobId 12: Error: Bacula dir 5.2.13 (19Jan13):
Oct 18 12:01:21 backup bacula-dir:   Build OS:               i586-alt-linux-gnu altlinux Sisyphus
Oct 18 12:01:21 backup bacula-dir:   JobId:                  12
Oct 18 12:01:21 backup bacula-dir:   Job:                    asstream.2013-10-18_11.31.19_06
Oct 18 12:01:21 backup bacula-dir:   Backup Level:           Full (upgraded from Incremental)
Oct 18 12:01:21 backup bacula-dir:   Client:                 «asstream» 5.0.3 (04Aug10) x86_64-alt-linux-gnu,altlinux,Sisyphus
Oct 18 12:01:21 backup bacula-dir:   FileSet:                «asstream» 2013-10-18 11:31:19
Oct 18 12:01:21 backup bacula-dir:   Pool:                   «asstream» (From Job resource)
Oct 18 12:01:21 backup bacula-dir:   Catalog:                «MyCatalog» (From Client resource)
Oct 18 12:01:21 backup bacula-dir:   Storage:                «File» (From Job resource)
Oct 18 12:01:21 backup bacula-dir:   Scheduled time:         18-Oct-2013 11:31:17
Oct 18 12:01:21 backup bacula-dir:   Start time:             18-Oct-2013 11:31:21
Oct 18 12:01:21 backup bacula-dir:   End time:               18-Oct-2013 12:01:21
Oct 18 12:01:21 backup bacula-dir:   Elapsed time:           30 mins
Oct 18 12:01:21 backup bacula-dir:   Priority:               11
Oct 18 12:01:21 backup bacula-dir:   FD Files Written:       0
Oct 18 12:01:21 backup bacula-dir:   SD Files Written:       0
Oct 18 12:01:21 backup bacula-dir:   FD Bytes Written:       0 (0 B)
Oct 18 12:01:21 backup bacula-dir:   SD Bytes Written:       0 (0 B)
Oct 18 12:01:21 backup bacula-dir:   Rate:                   0.0 KB/s
Oct 18 12:01:21 backup bacula-dir:   Software Compression:   None
Oct 18 12:01:21 backup bacula-dir:   VSS:                    no
Oct 18 12:01:21 backup bacula-dir:   Encryption:             no
Oct 18 12:01:21 backup bacula-dir:   Accurate:               no
Oct 18 12:01:21 backup bacula-dir:   Volume name(s):
Oct 18 12:01:21 backup bacula-dir:   Volume Session Id:      2
Oct 18 12:01:21 backup bacula-dir:   Volume Session Time:    1382079544
Oct 18 12:01:21 backup bacula-dir:   Last Volume Bytes:      0 (0 B)
Oct 18 12:01:21 backup bacula-dir:   Non-fatal FD errors:    1
Oct 18 12:01:21 backup bacula-dir:   SD Errors:              0
Oct 18 12:01:21 backup bacula-dir:   FD termination status:  Error
Oct 18 12:01:21 backup bacula-dir:   SD termination status:  Waiting on FD
Oct 18 12:01:21 backup bacula-dir:   Termination:            *** Backup Error ***
Oct 18 12:01:21 backup bacula-dir:


Записан



Записан

Андрей Черепанов (cas@)


Bad storage

Это я заметил, но причины мне не понятны и видимо не совсем усвоил как работает бакула.
Прошу помощи у знатоков.


Записан


Я тож натстраиваю бакулу, только у меня все три службы на одном сервере
И пока другая проблема….
Задание пытаюсь выполнить (run -> №job …)
«Jobs waiting to reserve a drive»
и » Device «devSRV» not in SD Device resources»

Судя по вашему логу — у вас проблемка в другом…


Записан


Если все на одном сервере, то у меня заработало нормально, все задания выполняются, вот с удаленным не работает.


Записан


В общем проблема решилась указанием другого ip адреса в Storage, вместо 127.0.0.1 указал Ip адрес машины в локальной сети.
Странно конечно. Но зато работает.

А кто подскажет что это: Write Bootstrap = «/var/lib/bacula/asstream.bsr»
Вроде как вычитал что поможет восстановить данные если бакула умер, а как?


Записан


указал Ip адрес машины в локальной сети

В конфиге директора должно быть сетевое имя SD, по которому и директор и клиент может к подключиться к SD.
Если на сервере 2 адреса и он в разных сетях, то надо, чтоб днс отдавал правильный адрес по запросу клиента (из его  подсети)
В конфиге клиента и SD «имя» директора должно быть таким же как и в конфиге самого директора. Это не сетевое имя, а что-то вроде логина. Проверяется логин и пароль.

Write Bootstrap = «/var/lib/bacula/asstream.bsr»

Вроде бы оно нужно для восстановления самих файлов из бекапа. В этих бутстрапах метаданные, а в самом бэкапе просто свалка, которую не прочитать просто так. Т е, для восстановления уж слишком много условий, а бакула бэкапит только базу sql и в свой же бэкап, который не восстановить если сама бакула будет повреждена. Это мне непонятно.
Всего 1 тема про бакулу на форуме? есть куча вопросов. Изучаю дефолтные настройки в альте. Это практически единственный дистр с бакулой из коробки и с гуем.
В дефолтных установках не используется VSS, сжатие, имена volume назначаются просто по порядку (непонятно, это полный архив или нет), непонятно сколько заданий в каждом архиве, это не определено.
Это все не нужно или не работает? Если оставить дефолт, то все будет работать, т е в таком виде используется разработчиками? Просто добавляй клиентов через веб морду и все?
Не нашел откуда вебинтерфейс берет шаблоны настроек клиентов. Особенно интересны fileset для винды и линукса.

« Последнее редактирование: 20.01.2014 00:45:15 от nanoUzr »


Записан


Bacula is an open software enterprise backup system! Check out the official site here
Complex but useful software, which could automate the whole backup process of all your servers.
Some errors are easy to track some are not, so here is one error with a misleading error message if you do not know or forget the details of how the daemons works.

Here is the error extracted from the logs:

01-Sep 00:45 backup01-de-dir JobId 8789: No prior Full backup Job record found.
01-Sep 00:45 backup01-de-dir JobId 8789: No prior or suitable Full backup found in catalog. Doing FULL backup.
01-Sep 00:45 backup01-de-dir JobId 8789: Job srv123us.2017-09-01_00.45.28_34 waiting 103 seconds for scheduled start time.
01-Sep 00:47 backup01-de-dir JobId 8789: Start Backup JobId 8789, Job=srv123us.2017-09-01_00.45.28_34
01-Sep 00:47 backup01-de-dir JobId 8789: Using Device "web" to write.
01-Sep 00:51 srv123us-fd JobId 8789: Warning: bsock.c:112 Could not connect to Storage daemon on 1.1.1.1:9103. ERR=Connection timed out
01-Sep 01:17 srv123us-fd JobId 8789: Fatal error: bsock.c:118 Unable to connect to Storage daemon on 1.1.1.1:9103. ERR=Interrupted system call
01-Sep 01:17 srv123us-fd JobId 8789: Fatal error: job.c:1893 Failed to connect to Storage daemon: 1.1.1.1:9103
01-Sep 01:17 backup01-de-dir JobId 8789: Fatal error: Bad response to Storage command: wanted 2000 OK storage
01-Sep 01:17 backup01-de-dir JobId 8789: Error: Bacula backup01-de-dir 7.0.5 (28Jul14):
 Build OS:               x86_64-pc-linux-gnu ubuntu 16.04
  JobId:                  8789
  Job:                    srv123us.2017-09-01_00.45.28_34
  Backup Level:           Full (upgraded from Incremental)
  Client:                 "srv123us" 7.0.5 (28Jul14) x86_64-pc-linux-gnu,ubuntu,16.04
  FileSet:                "web" 2017-11-07 17:19:45
  Pool:                   "web-full" (From Job FullPool override)
  Catalog:                "ucdn" (From Client resource)
  Storage:                "web" (From Job resource)
  Scheduled time:         01-Sep-2018 00:47:11
  Start time:             01-Sep-2018 00:47:11
  End time:               01-Sep-2018 01:17:23
  Elapsed time:           30 mins 12 secs
  Priority:               10
  FD Files Written:       0
  SD Files Written:       0
  FD Bytes Written:       0 (0 B)
  SD Bytes Written:       0 (0 B)
  Rate:                   0.0 KB/s
  Software Compression:   None
  VSS:                    no
  Encryption:             no
  Accurate:               no
  Volume name(s):         
  Volume Session Id:      4719
  Volume Session Time:    1510075534
  Last Volume Bytes:      0 (0 B)
  Non-fatal FD errors:    2
  SD Errors:              0
  FD termination status:  Error
  SD termination status:  Waiting on FD
  Termination:            *** Backup Error ***

But when we check the status of client from “bconsole” (Bacula’s management Console), everything seems OK, the backup server (Director daemon = bacula-dir) connects and get the report from the client daemon (Bacula File service = bacula-fd) in the server, even when you run a backup job, the status report is OK, the backup is running on the client, here is the output:

srv@local ~ # bconsole
Connecting to Director localhost:9101
1000 OK: 1 backup01-de-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*status
Status available for:
     1: Director
     2: Storage
     3: Client
     4: Scheduled
     5: All
Select daemon type for status (1-5): 3
The defined Client resources are:
     1: srv1us
     2: srv2us
     3: srv123us
Select Client (File daemon) resource (1-3): 3
Connecting to Client srv123us at 108.61.250.36:9102
srv123us-fd Version: 7.0.5 (28 July 2014)  x86_64-pc-linux-gnu ubuntu 16.04
Daemon started 23-Feb-17 00:43. Jobs: run=1 running=0.
 Heap: heap=98,304 smbytes=571,344 max_bytes=571,361 bufs=97 max_bufs=97
 Sizes: boffset_t=8 size_t=8 debug=0 trace=0 mode=0,0 bwlimit=0kB/s
 Plugin: bpipe-fd.so 

Running Jobs:
JobId 8789 Job srv123us.2017-09-01_00.45.28_34 is running.
    Incremental Backup Job started: 01-Sep-17 00:45
    Files=0 Bytes=0 AveBytes/sec=0 LastBytes/sec=0 Errors=0
    Bwlimit=0
    Files: Examined=5 Backed up=0
    SDReadSeqNo=6 fd=5
Director connected at: 01-Sep-17 01:10
====

Terminated Jobs:
====

As you can see, everything seems OK of the status, there was a running job in the client server and it seemed the backup process had been running without errors for more then 20 minutes, but then suddenly got Fatal error (the first log):

01-Sep 00:51 srv123us-fd JobId 8789: Warning: bsock.c:112 Could not connect to Storage daemon on 1.1.1.1:9103. ERR=Connection timed out
01-Sep 01:17 srv123us-fd JobId 8789: Fatal error: bsock.c:118 Unable to connect to Storage daemon on 1.1.1.1:9103. ERR=Interrupted system call
01-Sep 01:17 srv123us-fd JobId 8789: Fatal error: job.c:1893 Failed to connect to Storage daemon: 1.1.1.1:9103
01-Sep 01:17 backup01-de-dir JobId 8789: Fatal error: Bad response to Storage command: wanted 2000 OK storage

And the problem is that, the Director (backup server) connects to the File Service of the client (the daemon on the client), but the opposite connection is not possible! When the backup is ready, the client daemon bacula file service connects to the bacula storage service (which could be on the same server with the director, but it could be on another server) to send the backup files and here is the problem! Client could not connect to the storage! So always check the two way connections: backup server -> client server-port:9102 and backup server-port:9103 (or storage server) <- client.
In the world of bacula:

bacula-dir -> bacula-fd:9102

bacula-sd:9103 -> bacula-fd

Misleading error on causal look it seems like bacula-sd is returning error to bacula-fd (which would mean that bacula-fd could connect to bacula-sd after all), but in reality bacula-dir received and logged that bacula-fd did not connect to bacula-sd resulting in Fatal error.

In our situation the firewall of the backup server was denying the connections from the client, but it could be a DNS resolve issue or another network problem. Most common problems are firewall or DNS resolve issues. The solution – just add accept rule for the IP of the client to connect to port 9103 of the backup (storage) server.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Fatal error avr io h no such file or directory
  • Fatal error attempting to save in maya 2023
  • Fatal error ark epic games
  • Fatal error another instance is already running перевод
  • Fatal error allowed memory size of phpexcel

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии