If your bacula-dir runs fine when started directly but fails when
started through systemd then you're most likely encountering a problem
with Bacula's systemd integration. This is not unheard of. Systemd
itself is still very new and immature, and systemd integration of most
software packages even more so.

So you'll have to debug the bacula-dir systemd unit, which can be a pain
because systemd has a tendency to hide important information from you.
Start by inspecting the output of "systemctl status bacula-dir". Beyond
the actual status, it should also output the last few syslog lines
relating to the bacula-dir service. If you're lucky you'll already find
a hint there what's going wrong.

If that doesn't put on the right track, have a look at the unit file
/usr/lib/systemd/system/bacula-dir.service and check the content for
plausibility. Try running the ExecStart command manually exactly as
shown, and under the exact User and Group ID given in the unit file. One
frequent problem with systemd units is that they start daemons under an
unprivileged user ID even though they are designed to be started as
root, which leads to strange permission issues that disappear once you
start the daemon manually as root.

HTH
Tilman

Am 25.01.2018 um 20:19 schrieb Ben Wong:
> Hi all,
> 
> I'm setting up Bacula 9.0.6 on a CentOS 7.4.1708 server.  The director,
> storage daemon, and file daemon have all been configured with the same
> hashed password.  I first noticed an issue when I ran bconsole and the
> system had trouble connecting to port 9101.   
> 
> [root@backup3 ~]# bacula status
> bacula-sd (pid 1334) is running...
> bacula-fd (pid 1388) is running...
> bacula-dir dead but pid file exists
> 
> This made me believe there was a misconfiguration somewhere so I ran
> bacula-dir in debug mode. 
> 
> [root@backup3 bacula]# bacula-dir -f -v -d 100
> bacula-dir: dird.c:221-0 Debug level = 100
> bacula-dir: address_conf.c:274-0 Initaddr 0.0.0.0:9101
> <http://0.0.0.0:9101>
> bacula-dir: dird_conf.c:2037-0 Got name=File1
> bacula-dir: dird_conf.c:2054-0 Item=Autochanger got value=File1
> bacula-dir: dird_conf.c:2037-0 Got name=File2
> bacula-dir: dird_conf.c:2054-0 Item=Autochanger got value=File2
> bacula-dir: dird_conf.c:2037-0 Got name=File1
> bacula-dir: dird_conf.c:2054-0 Item=Autochanger got value=File1
> bacula-dir: dird_conf.c:2068-0 Store File1 value=11caf68
> bacula-dir: dird_conf.c:2037-0 Got name=File2
> bacula-dir: dird_conf.c:2054-0 Item=Autochanger got value=File2
> bacula-dir: dird_conf.c:2068-0 Store File2 value=11cb4c8
> bacula-dir: jcr.c:131-0 read_last_jobs seek to 192
> bacula-dir: jcr.c:138-0 Read num_items=0
> bacula-dir: dir_plugins.c:151-0 Load Director plugins
> bacula-dir: dir_plugins.c:153-0 No Director plugin directory!
> bacula-dir: mysql.c:119-0 db_init_database first time
> bacula-dir: mysql.c:224-0 mysql_init done
> bacula-dir: mysql.c:263-0 mysql_real_connect done
> bacula-dir: mysql.c:265-0 db_user=bacula db_name=bacula db_password=bacula
> bacula-dir: mysql.c:301-0 opendb ref=1 connected=1 db=11c5fb0
> bacula-dir: mysql.c:325-0 closedb ref=0 connected=1 db=11c5fb0
> bacula-dir: mysql.c:332-0 close db=11c5fb0
> msg-backup3-dir: bnet_server.c:86-0 Addresses 0.0.0.0:9101
> <http://0.0.0.0:9101>
> msg-backup3-dir: job.c:1760-0 wstorage=File1
> msg-backup3-dir: job.c:1769-0 wstore=File1 where=Job resource
> msg-backup3-dir: job.c:1429-0 JobId=0 created
> Job=*JobMonitor*.2018-01-25_03.00.50_01
> 
> However, bacula works fine in debug mode.  I have no clue why! 
> Shouldn't bacula-dir issue these same basic commands when I start it 
> with systemctl start bacula-dir?  I've noticed when I start bacula-dir
> through systemctl, it'll show as active (exited).  Is there any way to
> make sure it's running? 
> 
> Any ideas would be appreciated.
> 
> Thanks
> Ben Wong
> 

-- 
Tilman Schmidt                              E-Mail: til...@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to