Hi,

22.10.2007 06:39,, dracclc wrote::
> Trying to setup a bacula server for a project.  We setup bacula on ubuntu
> 7.10, using the ububacula script, available at
> http://freshmeat.net/projects/ububacula/.   Our problem right now is when we
> try to connect to the Storage Daemon File we get an error message:
>  Automatically selected Storage: File
> Connecting to Storage daemon File at 192.168.7.155:9103
> 
> Failed to connect to Storage daemon File.
> ====
> *
> 21-Oct 20:21 bacula-t238-dir: *Console*.2007-10-21_20.20.53 Fatal error:
> bnet.c:870 Unable to connect to Storage daemon on 192.168.7.155:9103.
> ERR=Connection refused

This indicates that, most probably, the SD is not running, is not 
listening on the port you connect to, or the connection is blocked by 
a firewall in between.

> Things we've tried:
> 1.  Changed passwords on all bacula-*.conf files to the same thing

Good thing for testing, but Bacula doesn't get to that step now.

> 2.  Tried using the following commands to check our syntax, it didn't like
> any of the conf files except bconsole.conf
> [EMAIL PROTECTED]:/home/drac# /usr/bin/bconsole -t -c bacula-fd.conf21-Oct
> 20:25 bconsole: ERROR TERMINATION at parse_conf.c:847
> Config error: expected resource name, got: FileDaemon
>             : line 31, col 11 of file /etc/bacula/bacula-fd.conf
> FileDaemon {                          # this is me

Yeah, you need the FD to check the FD configuration file, and so on.

> [EMAIL PROTECTED]:/home/drac# /usr/bin/bconsole -t -c bacula-dir.conf21-Oct
> 20:26 bconsole: ERROR TERMINATION at parse_conf.c:884
> Config error: Keyword "QueryFile" not permitted in this resource.
> Perhaps you left the trailing brace off of the previous resource.
>             : line 18, col 12 of file /etc/bacula/bacula-dir.conf
>   QueryFile = "/etc/bacula/scripts/query.sql"
> 
> 
> 3.  We've rebooted the server, rerun the startup scripts after editing the
> conf files
> 4.  Searched google and these forums
> 5.  Edited our /etc/hosts file
> 6.  Netstat output 
> [EMAIL PROTECTED]:/var/log/bacula# netstat -tap
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State     
>  
> PID/Program name   
> tcp        0      0 localhost:mysql         *:*                     LISTEN    
> 4059/mysqld         
> tcp        0      0 localhost:bacula-dir    *:*                     LISTEN    
> 5176/bacula-dir     
> tcp        0      0 localhost:bacula-fd     *:*                     LISTEN    
> 5151/bacula-fd      
> tcp        0      0 localhost:bacula-sd     *:*                     LISTEN    
> 5103/bacula-sd      

Ok, all components are listening. That's a good start. Unfurtunately, 
they are only listening on the lo interface, which won't work once you 
add networked clients to the setup. So, even if, theoretically, you 
could run such a setup, I wouldn't recommend it.

> tcp        0      0 localhost:smtp          *:*                     LISTEN    
> 4359/exim4          
> tcp6       0      0 *:www                   *:*                     LISTEN    
> 4430/apache2        
> tcp6       0      0 *:ssh                   *:*                     LISTEN    
> 3965/sshd           
> tcp6       0      0 bacula-t238:ssh         ::ffff:192.168.7.:45212
> ESTABLISHED4490/sshd: drac [pr 
> tcp6       0      0 bacula-t238:ssh         ::ffff:192.168.7.:45213
> ESTABLISHED4509/sshd: drac [pr 
> 
> [EMAIL PROTECTED]:/var/log/bacula# netstat -an
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State     
>  
> tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN    
>  
> tcp        0      0 127.0.0.1:9101          0.0.0.0:*               LISTEN    
>  
> tcp        0      0 127.0.0.1:9102          0.0.0.0:*               LISTEN    
>  
> tcp        0      0 127.0.0.1:9103          0.0.0.0:*               LISTEN    
>  
> tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN    
>  
> tcp6       0      0 :::80                   :::*                    LISTEN    
>  
> tcp6       0      0 :::22                   :::*                    LISTEN  
> 
> 7.  I ran nmap against the server and the only ports open are 22 and 80. 
> Don't know if that helps at all, but right now i'm just just trying to
> connect locally.  

Currently, none of the Bacula daemons are listening on the network, so 
you shouldn't see them with nmap. That is correct.

> That all I can remember right now, here's the bacula director and storage
> director files
> #
> # 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 2.0.3 (06 March 2007) -- debian lenny/sid
> #
> #  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 = bacula-t238-dir
>   DIRport = 9101                # where we listen for UA connections
>   QueryFile = "/etc/bacula/scripts/query.sql"
>   WorkingDirectory = "/var/lib/bacula"
>   PidDirectory = "/var/run/bacula"
>   Maximum Concurrent Jobs = 1
>   Password = "blood"         # Console password
> #  Password = "blood"
>   Messages = Daemon
>   DirAddress = 127.0.0.1

Use the fully qualified domain name of your network interface here, or 
its IP address.

> }
> 
...
> # Client (File Services) to backup
> Client {
>   Name = bacula-t238-fd
>   Address = bacula-t238

Here, too, it might be better to use the FQDN or IP address. Shouldn't 
matter much, but if your resolver configuration is changed or broken, 
you'll get errors.

>   FDPort = 9102
>   Catalog = MyCatalog
>   Password = "blood"   # password for FileDaemon
> 
>  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 = File
> # Do not use "localhost" here    
>   Address = 192.168.7.155                  # N.B. Use a fully qualified name

Good.

> here
>   SDPort = 9103
>   Password = "blood"
>   Device = FileStorage
>   Media Type = File
> }
...

> # Default Bacula Storage Daemon Configuration file
> #
> #  For Bacula release 2.0.3 (06 March 2007) -- debian lenny/sid
> #
> # 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 = bacula-t238-sd
>   SDPort = 9103                  # Director's port      
>   WorkingDirectory = "/var/lib/bacula"
>   Pid Directory = "/var/run/bacula"
>   Maximum Concurrent Jobs = 20
>   SDAddress = 127.0.0.1

Better let it listen on the network interface... this one is usually 
not connected to the network :-)

> }
...

What you set up is the following:

The SD listens on 127.0.0.1, but the DIR tries to connect to it on 
192.etc. That won't work. I recommend you change all the addresses to 
IP numbers or FQDNs, if you plan to do networked backups. If you 
really only want to run local backups, use 127.0.0.1 throughout all 
the configuration files.

Arno


-- 
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to