On 04/01/16 10:51, Peter Keller wrote: > Hello,
Hello, Peter and Greg.
Thanks for your replies.
>>> ----------------------------------------------------------------------
>>>
>>> But I do not see the running processes:
>>>
>>> ----------------------------------------------------------------------
>>> root@baculatest:~# ps ax | grep bacula
>>> 3055 pts/1 S+ 0:00 grep bacula
>>> ----------------------------------------------------------------------
>>>
>>> Have you had a problem like this and found the cause of it?
>> I would appreciate any comments about this.
> Your lock and subsys directories might not exist or be of the right permission
> or your config file might have a syntax error in it.
>
> To debug this, try running the director like this:
>
> # bacula-dir -t
>
> If it comes back with a 0 return value, then your config file is of
> a good syntax.
The configurations seem to have no errors:
root@baculatest:~# bacula-dir -t
root@baculatest:~# echo $?
0
root@baculatest:~# bacula-sd -t
root@baculatest:~# echo $?
0
> Then try:
>
> # bacula-dir -v -f -d100
>
> This runs it verbosely in the foreground and should likely explain why
> your daemon didn't want to start up. If it starts properly, then
> CTRL-C to quit it.
It seems that in this way both processes run smoothly:
----------------------------------------------------------------
root@baculatest:~# bacula-dir -v -f -d100
bacula-dir: dird.c:208-0 Debug level = 100
bacula-dir: address_conf.c:275-0 Initaddr 0.0.0.0:9101
bacula-dir: jcr.c:132-0 read_last_jobs seek to 192
bacula-dir: jcr.c:139-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:120-0 db_init_database first time
bacula-dir: mysql.c:219-0 mysql_init done
bacula-dir: mysql.c:258-0 mysql_real_connect done
bacula-dir: mysql.c:260-0 db_user=bacula db_name=bacula
db_password=xxxxxxxxxxxx
bacula-dir: mysql.c:296-0 opendb ref=1 connected=1 db=1f380d8
bacula-dir: mysql.c:320-0 closedb ref=0 connected=1 db=1f380d8
bacula-dir: mysql.c:327-0 close db=1f380d8
baculatest-dir: job.c:1698-0 wstorage=File1
baculatest-dir: job.c:1707-0 wstore=File1 where=Job resource
baculatest-dir: job.c:1374-0 JobId=0 created
Job=*JobMonitor*.2016-01-04_11.33.23_01
baculatest-dir: bnet_server.c:87-0 Addresses 0.0.0.0:9101
NOTE: Is the "No Director plugin directory!" important?
----------------------------------------------------------------
root@baculatest:~# bacula-sd -v -f -d100
bacula-sd: address_conf.c:275-0 Initaddr 0.0.0.0:9103
bacula-sd: stored_conf.c:699-0 Inserting Director res: baculatest-mon
bacula-sd: stored_conf.c:699-0 Inserting Device res: FileChgr1-Dev2
bacula-sd: stored_conf.c:699-0 Inserting Autochanger res: FileChgr2
bacula-sd: stored_conf.c:699-0 Inserting Device res: FileChgr2-Dev1
bacula-sd: stored_conf.c:699-0 Inserting Device res: FileChgr2-Dev2
baculatest-sd: jcr.c:132-0 read_last_jobs seek to 192
baculatest-sd: jcr.c:139-0 Read num_items=0
baculatest-sd: stored.c:573-0 calling init_dev /tmp
baculatest-sd: bnet_server.c:87-0 Addresses 0.0.0.0:9103
baculatest-sd: dev.c:343-0 init_dev: tape=0 dev_name=/tmp
baculatest-sd: stored.c:575-0 SD init done /tmp
baculatest-sd: acquire.c:674-0 Attach 0x40001c18 to dev "FileChgr1-Dev1"
(/tmp)
baculatest-sd: stored.c:573-0 calling init_dev /tmp
baculatest-sd: dev.c:343-0 init_dev: tape=0 dev_name=/tmp
baculatest-sd: stored.c:575-0 SD init done /tmp
baculatest-sd: acquire.c:674-0 Attach 0x40002be8 to dev "FileChgr1-Dev2"
(/tmp)
baculatest-sd: stored.c:573-0 calling init_dev /tmp
baculatest-sd: dev.c:343-0 init_dev: tape=0 dev_name=/tmp
baculatest-sd: stored.c:575-0 SD init done /tmp
baculatest-sd: acquire.c:674-0 Attach 0x40003bb8 to dev "FileChgr2-Dev1"
(/tmp)
baculatest-sd: stored.c:573-0 calling init_dev /tmp
baculatest-sd: dev.c:343-0 init_dev: tape=0 dev_name=/tmp
baculatest-sd: stored.c:575-0 SD init done /tmp
baculatest-sd: acquire.c:674-0 Attach 0x40004b88 to dev "FileChgr2-Dev2"
(/tmp)
----------------------------------------------------------------
> I noticed that, at least under Debian 8, I needed to add the
> Linux Standards Base information to all of the startup scripts and
> ensure (the director's) dependencies included postres so it would
> start in the right order. Otherwise the update-rc.d program would insist
> upon starting them in S01 and it would just fail to start since postgres
> was in S02.
I think LSB lines are correct:
----------------------------------------------------------------
### BEGIN INIT INFO
# Provides: bacula-dir
# Required-Start: $network
# Should-Start: bacula-fd postgresql mysql
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start Bacula Director daemon at boot time
# Description: Enable Bacula Director.
### END INIT INFO
----------------------------------------------------------------
### BEGIN INIT INFO
# Provides: bacula-sd
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start Bacula Storage daemon at boot time
# Description: Enable Bacula Storage daemon.
### END INIT INFO
----------------------------------------------------------------
> I also noticed that, since I used my own locations for the subsys directory
> and pidfile, that those directories I chose in /var/run and /var/run/lock
> MUST be created by the startup scripts (since they were deleted by the
> system upon shutdown). So I also had to add that code to the startup
> scripts as well.
The PIDFILE variable at the startup script for the director and storage
daemon was using:
PIDFILE=/var/run/bacula/${NAME}.${BPORT}.pid
An the permissions are:
root@baculatest:~# ll -d /var/run
lrwxrwxrwx 1 root root 4 Dec 24 14:58 /var/run -> /run
root@baculatest:~# ll -d /run/
drwxr-xr-x 20 root root 720 Jan 4 11:55 /run/
So I made a slight adjustment here:
root@baculatest:/var/run# mkdir bacula
root@baculatest:/var/run# chown -R bacula.bacula bacula/
root@baculatest:/var/run# chmod 775 bacula/
root@baculatest:/var/run# chmod g+s bacula/
root@baculatest:/var/run# ll -d bacula/
drwxrwsr-x 2 bacula bacula 40 Jan 4 11:55 bacula/
And I modified the PIDFILE variable to fit it on the changes applied:
PIDFILE=/var/run/bacula/${NAME}.${BPORT}.pid
But unfortunately, even with these changes, the processes was not able
to starts up:
-----------------------------------------------------------------------
root@baculatest:~# systemctl start bacula-dir.service
root@baculatest:~# systemctl status bacula-dir.service
● bacula-dir.service - LSB: Start Bacula Director daemon at boot time
Loaded: loaded (/etc/init.d/bacula-dir)
Active: active (exited) since Mon 2016-01-04 12:35:38 ART; 5s ago
Process: 1710 ExecStart=/etc/init.d/bacula-dir start (code=exited,
status=0/SUCCESS)
Jan 04 12:35:38 baculatest bacula-dir[1710]: Starting Bacula Director:
bacula-dir
-----------------------------------------------------------------------
root@baculatest:~# systemctl start bacula-sd.service
root@baculatest:~# systemctl status bacula-sd.service
● bacula-sd.service - LSB: Start Bacula Storage daemon at boot time
Loaded: loaded (/etc/init.d/bacula-sd)
Active: active (exited) since Mon 2016-01-04 12:36:50 ART; 4s ago
Process: 1700 ExecStop=/etc/init.d/bacula-sd stop (code=exited,
status=0/SUCCESS)
Process: 1730 ExecStart=/etc/init.d/bacula-sd start (code=exited,
status=0/SUCCESS)
Jan 04 12:36:50 baculatest bacula-sd[1730]: Starting Bacula Storage
Daemon: bacula-sd
-----------------------------------------------------------------------
root@baculatest:~# ps ax | grep bacula-sd | grep -v grep
root@baculatest:~# ps ax | grep bacula-dir | grep -v grep
root@baculatest:~#
-----------------------------------------------------------------------
Greg, I've also tried what you mentioned, but I do not see any
indication of what may be the problem:
-----------------------------------------------------------------------
root@baculatest:~# journalctl -xb | egrep "bacula-sd|bacula-dir"
Jan 04 11:16:17 baculatest bacula-sd[417]: Starting Bacula Storage
Daemon: bacula-sd
Jan 04 11:16:17 baculatest bacula-dir[418]: Starting Bacula Director:
bacula-dir
Jan 04 11:35:18 baculatest bacula-dir[1284]: Shutting down Bacula
service: baculatest-dir ...
Jan 04 11:35:35 baculatest bacula-sd[1295]: Shutting down Bacula
service: baculatest-sd ...
Jan 04 12:02:03 baculatest bacula-dir[1536]: Stopping Bacula Director:
bacula-dir
Jan 04 12:02:22 baculatest bacula-dir[1547]: Starting Bacula Director:
bacula-dir
Jan 04 12:34:51 baculatest bacula-dir[1675]: Stopping Bacula Director:
bacula-dir
Jan 04 12:35:28 baculatest bacula-sd[1700]: Stopping Bacula Storage
Daemon: bacula-sd
Jan 04 12:35:38 baculatest bacula-dir[1710]: Starting Bacula Director:
bacula-dir
Jan 04 12:36:50 baculatest bacula-sd[1730]: Starting Bacula Storage
Daemon: bacula-sd
-----------------------------------------------------------------------
> Thank you!
Thanks to you!
Best regards,
Daniel
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------
_______________________________________________ Bacula-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-users
