Bacula-users

Re: [Bacula-users] Bacula-dir won't start but almost

2013-03-15 09:14:56
Subject: Re: [Bacula-users] Bacula-dir won't start but almost
From: Julien Cochennec <julien.cochennec AT mnhn DOT fr>
To: Konstantin Khomoutov <flatworm AT users.sourceforge DOT net>, Bacula Users Mailing List <bacula-users AT lists.sourceforge DOT net>
Date: Fri, 15 Mar 2013 14:11:38 +0100
On 14/03/2013 15:56, Konstantin Khomoutov wrote:
> On Thu, 14 Mar 2013 09:08:01 +0100
> Julien Cochennec <julien.cochennec AT mnhn DOT fr> wrote:
>
>> I've replaced my server recently and migrate database, from 5.0.3 to
>> 5.2.? and upgraded tables from v12 to v14 (Debian Wheezy).
>> When I try to start bacula by /etc/init.d/bacula-director start it
>> says OK but no process appears when I do ps -lfC bacula-dir.
>> Is there anything wrong with the following output?
>> I'm almost there I guess because webacula works with the command line
>> below. Thanks guys, bacula rocks!
>>
>>   > bacula-dir -f -d 100 -c /etc/bacula/bacula-dir.conf
>>
>> bacula-dir: dird.c:185-0 Debug level = 100
>> bacula-dir: bsys.c:510-0 Could not open state file. sfd=-1 size=192:
>> ERR=Aucun fichier ou dossier de ce type
> [...]
>
> By the way... In Debian, Bacula Director is started like this:
>
> /usr/sbin/bacula-dir -c /etc/bacula/bacula-dir.conf -u bacula -g bacula
>
> That is, it's told to drop its privileges at some point during the
> startup process.
> Hence re-try your debug run adding "-u bacula -g bacula" to see if it
> stops working if told to drop its privileges.
>
> The next question is if the director also fails if you run it in
> foreground? -- you did not tell us.
>

Thanks a lot for your help. I added user and group and changed ownership 
of /var/lib/bacula files and it works again (see below).
Is foreground the -f option? If so, it works because I did run it with 
-f option from the begining and always worked, but not in background.
But I still get the state file error in -f mode, still can't find why 
(line 3, the same you noticed first).

/usr/sbin/bacula-dir -c /etc/bacula/bacula-dir.conf -u bacula -g bacula 
-f -d 100
bacula-dir: dird.c:185-0 Debug level = 100
bacula-dir: bsys.c:510-0 Could not open state file. sfd=-1 size=192: 
ERR=Aucun fichier ou dossier de ce type
bacula-dir: dir_plugins.c:160-0 Load dir plugins
bacula-dir: dir_plugins.c:162-0 No dir plugin dir!
bacula-dir: mysql.c:663-0 db_init_database first time
bacula-dir: mysql.c:177-0 mysql_init done
bacula-dir: mysql.c:202-0 mysql_real_connect done
bacula-dir: mysql.c:204-0 db_user=bacula db_name=bacula db_password=****
bacula-dir: mysql.c:227-0 opendb ref=1 connected=1 db=1222ec0
bacula-dir: mysql.c:247-0 closedb ref=0 connected=1 db=1222ec0
bacula-dir: mysql.c:252-0 close db=1222ec0
rddm503serveur-dir: pythonlib.c:102-0 No script dir. prog=DirStartUp
rddm503serveur-dir: bnet_server.c:95-0 Addresses host[ipv4:0.0.0.0:9101]
rddm503serveur-dir: job.c:1331-0 wstorage=astaStorage
rddm503serveur-dir: job.c:1340-0 wstore=astaStorage where=Job resource
rddm503serveur-dir: job.c:1031-0 JobId=0 created 
Job=*JobMonitor*.2013-03-15_10.45.10_01

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
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>