Bacula-users

[Bacula-users] can't connect to bacula director

2014-07-17 20:32:01
Subject: [Bacula-users] can't connect to bacula director
From: Tim Dunphy <bluethundr AT gmail DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 17 Jul 2014 20:25:41 -0400

Hey all, 

For some reason, seemingly out of the blue I can no longer connect to my bconsole command environment. 


When I try to I get the following result: 

[root@ops:/etc/bacula] #bconsole 
Connecting to Director ops.mydomain.com:9101 


It just sort of fails silently. Sad 

At first I thought this might be a failure to connect to the database. But I can connect to the DB using the credentials supplied in the director config. 


[root@ops:/etc/bacula] #mysql -uadmin -p 
Enter password: 
Welcome to the MySQL monitor. Commands end with ; or \g. 
Your MySQL connection id is 43 
Server version: 5.5.38-log MySQL Community Server (GPL) by Remi 

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 

Oracle is a registered trademark of Oracle Corporation and/or its 
affiliates. Other names may be trademarks of their respective 
owners. 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 

mysql> 

mysql> use bacula 
Reading table information for completion of table and column names 
You can turn off this feature to get a quicker startup with -A 

Database changed 


I'm hoping if I share my configs I might get some leads on how to deal with this situation. 

Director conf: 


# 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.13 (19 February 2013) -- redhat 

# 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 = ops.mydomain.com 
DIRport = 9101 # where we listen for UA connections 
QueryFile = "/etc/bacula/query.sql" 
WorkingDirectory = "/var/spool/bacula" 
PidDirectory = "/var/run" 
Maximum Concurrent Jobs = 1 
Password = "mydomain" # Console password 
Messages = Daemon 
TLS Certificate = /etc/pki/tls/certs/ops.mydomain.com.crt 
TLS Key = /etc/pki/tls/private/ops.mydomain.com.key 
TLS CA Certificate File = /etc/pki/CA/certs/ca.crt 
TLS Enable = yes 
TLS Require = yes 



JobDefs { 
Name = "DefaultJob" 
Type = Backup 
Level = Incremental 
Client = ops.mydomain.com 
FileSet = "Full Set" 
Schedule = "WeeklyCycle" 
Storage = File 
Messages = Standard 
Pool = "Default" 
Priority = 10 
Write Bootstrap = "/var/spool/bacula/%c.bsr" 



# Define the main nightly save backup job 
# By default, this job will back up to disk in /tmp 
Job { 
Name = "ops.mydomain.com
Type = Backup 
Client = ops.mydomain.com 
FileSet = "Full Set" 
Schedule = "WeeklyCycle" 
Storage = File 
Messages = Standard 
Pool = "Default" 
Write Bootstrap = "/var/spool/bacula/%c.bsr" 


Job { 
Name = "beta-new.mydomain.com
Type = Backup 
Client = beta-new.mydomain.com 
FileSet = "Full Set" 
Schedule = "WeeklyCycle" 
Storage = File 
Messages = Standard 
Pool = "Default" 
Write Bootstrap = "/var/spool/bacula/%c.bsr" 


#Job { 
# Name = "mail.mydomain.com
# Type = Backup 
# Client = mail.mydomain.com 
# FileSet = "Full Set" 
# Schedule = "WeeklyCycle" 
# Storage = File 
# Messages = Standard 
# Pool = "Default" 
# Write Bootstrap = "/var/spool/bacula/%c.bsr" 
#} 


#Job { 
# Name = "logs.mydomain.com
# Type = Backup 
# Client = logs.mydomain.com 
# FileSet = "Full Set" 
# Schedule = "WeeklyCycle" 
# Storage = File 
# Messages = Standard 
# Pool = "Default" 
# Write Bootstrap = "/var/spool/bacula/%c.bsr" 
#} 

#Job { 
# Name = "monitor.mydomain.com
# Type = Backup 
# Client = monitor.mydomain.com 
# FileSet = "Full Set" 
# Schedule = "WeeklyCycle" 
# Storage = File 
# Messages = Standard 
# Pool = "Default" 
# Write Bootstrap = "/var/spool/bacula/%c.bsr" 
#} 


# Backup the catalog database (after the nightly save) 
Job { 
Name = "mydomain BackupCatalog" 
JobDefs = "DefaultJob" 
Level = Full 
FileSet="mydomainCatalog" 
Schedule = "WeeklyCycleAfterBackup" 
# This creates an ASCII copy of the catalog 
# Arguments to make_catalog_backup.pl are: 
# make_catalog_backup.pl <catalog-name> 
RunBeforeJob = "/etc/bacula/make_catalog_backup.pl mydomainCatalog" 
# This deletes the copy of the catalog 
RunAfterJob = "/etc/bacula/delete_catalog_backup" 
Write Bootstrap = "/var/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=ops.mydomain.com 
FileSet="Full Set" 
Storage = File 
Pool = "Default" 
Messages = Standard 
Where = /backup/tapes/bacula-restores 


# List of files to be backed up 
FileSet { 
Name = "Full Set" 
Include { 
Options { 
signature = MD5 


# Put your list of files here, preceded by 'File =', one per line 
# or include an external list with: 

# File = <file-name 

# Note: / backs up everything on the root partition. 
# if you have other partitions such as /usr or /home 
# you will probably want to add them too. 

# By default this is defined to point to the Bacula binary 
# directory to give a reasonable FileSet to backup to 
# disk storage during initial testing. 

File = / 



# If you backup the root directory, the following two excluded 
# files can be useful 

Exclude { 
File = /var/bacula 
File = /proc 
File = /tmp 
File = /.journal 
File = /.fsck 
File = /backup 
File = /opt/zimbra/store 




# 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 03:05 
Run = Differential 2nd-5th sun at 03:05 
Run = Incremental mon-sat at 03:05 


# This schedule does the catalog. It starts after the WeeklyCycle 
Schedule { 
Name = "WeeklyCycleFullBackup" 
Run = Full sun-sat at 02:10 


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


# This is the backup of the catalog 
FileSet { 
Name = "mydomainCatalog" 
Include { 
Options { 
signature = MD5 

File = "/var/bacula/bacula.sql" 





# Client (File Services) to backup 
Client { 
Name = ops.mydomain.com 
Address = ops.mydomain.com 
FDPort = 9102 
Catalog = mydomainCatalog 
Password = "mydomain" # password for FileDaemon 
File Retention = 14 days # 14 days 
Job Retention = 14d # 14 days 
AutoPrune = yes # Prune expired Jobs/Files 
TLS Certificate = /etc/pki/tls/certs/ops.mydomain.com.crt 
TLS Key = /etc/pki/tls/private/ops.mydomain.com.key 
TLS CA Certificate File = /etc/pki/CA/certs/ca.crt 
TLS Enable = yes 
TLS Require = yes 


# Client (File Services) to backup 
Client { 
Name = beta-new.mydomain.com 
Address = beta-new.mydomain.com 
FDPort = 9102 
Catalog = mydomainCatalog 
Password = "mydomain" # password for 
File Retention = 14 days # 14 days 
Job Retention = 14d # 14 days 
AutoPrune = yes # Prune expired Jobs/Files 
TLS Certificate = /etc/pki/tls/certs/beta-new.mydomain.com.crt 
TLS Key = /etc/pki/tls/private/beta-new.mydomain.com.key 
TLS CA Certificate File = /etc/pki/CA/certs/ca.crt 
TLS Enable = yes 
TLS Require = yes 


# Client (File Services) to backup 
#Client { 
# Name = mail.mydomain.com 
# Address = mail.mydomain.com 
# FDPort = 9102 
# Catalog = mydomainCatalog 
# Password = "mydomain" # password for 
# File Retention = 14d # 14 days 
# Job Retention = 14d # 14 days 
# AutoPrune = yes # Prune expired Jobs/Files 
#} 

#Client (File Services) to backup 
#Client { 
# Name = logs.mydomain.com 
# Address = logs.mydomain.com 
# FDPort = 9102 
# Catalog = mydomainCatalog 
# Password = "mydomain" # password for 
# File Retention = 14d # 14 days 
# Job Retention = 14d # 14 days 
# AutoPrune = yes # Prune expired Jobs/Files 
#} 


#Client (File Services) to backup 
#Client { 
# Name = monitor.mydomain.com 
# Address = monitor.mydomain.com 
# FDPort = 9102 
# Catalog = mydomainCatalog 
# Password = "mydomain" # password for 
# File Retention = 14d # 14 days 
# Job Retention = 14d # 14 days 
# AutoPrune = yes # Prune expired Jobs/Files 
#} 


Storage { 
Name = File 
# Do not use "localhost" here 
Address = ops.mydomain.com # N.B. Use a fully qualified name here 
SDPort = 9103 
Password = "mydomain" 
Device = FileStorage 
Media Type = File 
TLS Certificate = /etc/pki/tls/certs/ops.mydomain.com.crt 
TLS Key = /etc/pki/tls/private/ops.mydomain.com.key 
TLS CA Certificate File = /etc/pki/CA/certs/ca.crt 
TLS Enable = yes 
TLS Require = yes 



# Generic catalog service 
Catalog { 
Name = mydomainCatalog 
# Uncomment the following line if you want the dbi driver 
dbdriver = "dbi:mysql"; dbaddress = localhost; dbport = 3306 
dbname = "bacula"; dbuser = "admin"; dbpassword = “secret” 


# 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 AT mydomain DOT 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\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r" 
operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r" 
mail = bluethundr AT gmail DOT com = all, !skipped 
operator = bluethundr AT gmail DOT 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 = "/usr/opt/bacula/log/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 = root@localhost = all, !skipped 
console = all, !skipped, !saved 
append = "/var/log/bacula/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 = 365 days # one year 
#} 

# Default pool definition 
Pool { 
Name = "Default" 
Pool Type = Backup 
Recycle = yes # Bacula can automatically recycle Volumes 
AutoPrune = yes # Prune expired volumes 
Volume Retention = 14 days # 2 week retention 
Maximum Volume Bytes = 5G # Limit Volume size to something reasonable 
Maximum Volumes = 2000 # Limit number of Volumes in Pool 
Volume Use Duration = 14d # Use a new tape every 2 weeks 
Recycle = yes # Recycling 
Recycle Oldest Volume = yes # Recycle the oldest volume 
LabelFormat = "jf-backup-tape-" 


# File Pool definition 
Pool { 
Name = "File" 
Pool Type = Backup 
Recycle = yes # Bacula can automatically recycle Volumes 
AutoPrune = yes # Prune expired volumes 
Volume Retention = 14 days # 2 week retention 
Maximum Volume Bytes = 5G # Limit Volume size to something reasonable 
Maximum Volumes = 2000 # Limit number of Volumes in Pool 
Volume Use Duration = 14d # Use a new tape every day 
Recycle = yes # Recycling 
Recycle Oldest Volume = yes # Recycle the oldest volume 
LabelFormat = "jf-backup-tape-" 


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



# Restricted console used by tray-monitor to get the status of the director 

Console { 
Name = ops.mydomain.com 
Password = "mydomain" 
CommandACL = status, .status 



Storage conf: 


# Default Bacula Storage Daemon Configuration file 

# For Bacula release 5.2.13 (19 February 2013) -- redhat 

# 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 = ops.mydomain.com 
SDPort = 9103 # Director's port 
WorkingDirectory = "/var/spool/bacula" 
Pid Directory = "/var/run" 
Maximum Concurrent Jobs = 20 
TLS Certificate = /etc/pki/tls/certs/ops.mydomain.com.crt 
TLS Key = /etc/pki/tls/private/ops.mydomain.com.key 
TLS CA Certificate File = /etc/pki/CA/certs/ca.crt 
TLS Enable = yes 
TLS Require = yes 



# List Directors who are permitted to contact Storage daemon 

Director { 
Name = ops.mydomain.com 
Password = "secret" 
TLS Certificate = /etc/pki/tls/certs/ops.mydomain.com.crt 
TLS Key = /etc/pki/tls/private/ops.mydomain.com.key 
TLS CA Certificate File = /etc/pki/CA/certs/ca.crt 
TLS Enable = yes 
TLS Require = yes 
#Monitor = yes 


# Restricted Director, used by tray-monitor to get the 
# status of the storage daemon 



# 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 = FileStorage 
Media Type = File 
Archive Device = /backup/tapes 
LabelMedia = yes; # lets Bacula label unlabeled media 
Random Access = Yes; 
AutomaticMount = yes; # when device opened, read it 
RemovableMedia = no; 
AlwaysOpen = no; 


# Name = Autochanger 
# Device = Drive-1 
# Device = Drive-2 
# Changer Command = "/etc/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 = "/etc/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 = "/etc/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 = "/etc/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 = ops.mydomain.com = all 



File daemon conf: 


# Default Bacula File Daemon Configuration file 

# For Bacula release 5.2.13 (19 February 2013) -- redhat 

# 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 = ops.mydomain.com 
Password = "secret" 
TLS Certificate = /etc/pki/tls/certs/ops.mydomain.com.crt 
TLS Key = /etc/pki/tls/private/ops.mydomain.com.key 
TLS CA Certificate File = /etc/pki/CA/certs/ca.crt 
TLS Enable = yes 
TLS Require = yes 



# Restricted Director, used by tray-monitor to get the 
# status of the file daemon 

Director { 
Name = cloud-mon 
Password = "nonofyourbeezwax" 
Monitor = yes 



# "Global" File daemon configuration specifications 

FileDaemon { # this is me 
Name = ops.mydomain.com 
FDport = 9102 # where we listen for the director 
WorkingDirectory = /var/bacula 
Pid Directory = /var/run 
Maximum Concurrent Jobs = 20 
TLS Certificate = /etc/pki/tls/certs/ops.mydomain.com.crt 
TLS Key = /etc/pki/tls/private/ops.mydomain.com.key 
TLS CA Certificate File = /etc/pki/CA/certs/ca.crt 
TLS Enable = yes 
TLS Require = yes 


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


I'm not seeing any errors turning up into the logs.

Any and all advice and insight would be ideal. 

Thank you!

Tim
--
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] can't connect to bacula director, Tim Dunphy <=