View Issue Details

IDProjectCategoryView StatusLast Update
0000373bareos-corefile daemonpublic2015-11-06 17:48
Reporterjbehrend Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformLinuxOSDebianOS Version7.7
Product Version13.2.3 
Summary0000373: FD child turns to Zombie after run-before Skript
DescriptionI am trying to run this script before the actual backup takes place:

#!/bin/bash
  if [ ! -b /dev/vg-local/mailboxBackup ] ; then
    echo "Creating backup snapshot"
    service dovecot stop
    lvcreate -nmailboxBackup -s /dev/vg-local/mailbox -L50G
    mount /dev/vg-local/mailboxBackup /media/mailboxBackup -onouuid,ro
    service dovecot start
    echo "done"
  else
    echo "Snapshot already taken, please remove first"
    exit 1
  fi

The "service dovecot start" command causes the corresponding FD child to turn into a zombie and does not run any backups at all.

Cheers Jan
Steps To ReproduceRun backup with this job definition:
Job {
   Name = "mailbox1"
   JobDefs = "WeeklyCycle"
   FileSet = "mailbox1"
   Client = mailbox1-fd
   Pool = mailbox1-DailyPool
   RunScript {
      RunsWhen=Before
      Command = "/usr/local/sbin/create-backup-snapshot"
   }
   RunScript {
      RunsWhen=After
      Command = "/usr/local/sbin/create-backup-snapshot REMOVE"
   }
   RunScript {
      RunsWhen=After
      RunsOnClient=No
      Console = "purge volume action=truncate pool=mailbox1-DailyPool storage=backupsrv1-sd-mailbox1-DailyPool"
   }
}
Additional InformationWhole script:

#!/bin/bash

if [ "$1" == "REMOVE" ] ; then
  if [ -b /dev/vg-local/mailboxBackup ] ; then
    echo "Removing backup snapshot"
    set -e
    umount /media/mailboxBackup 2>&1 >/dev/null
    yes | lvremove /dev/vg-local/mailboxBackup
    echo -e "\ndone"
  else
    echo "Snapshot not taken, please create first"
    exit 1
  fi
else
  if [ ! -b /dev/vg-local/mailboxBackup ] ; then
    echo "Creating backup snapshot"
    service dovecot stop
    lvcreate -nmailboxBackup -s /dev/vg-local/mailbox -L50G
    mount /dev/vg-local/mailboxBackup /media/mailboxBackup -onouuid,ro
    service dovecot start
    echo "done"
  else
    echo "Snapshot already taken, please remove first"
    exit 1
  fi
fi
exit 0
TagsNo tags attached.

Activities

pstorz

pstorz

2015-01-23 12:03

administrator   ~0001210

Hello Jan,

does this problem still exist with Version 14.2?

If so, can you provide a logfile with high loglevel like 500 please?

Thanks and best regards,

Philipp
jbehrend

jbehrend

2015-01-30 09:46

reporter  

bareos-fd.log (8,281 bytes)   
bareos-fd: lex.c:238-0 Open config file: /etc/bareos/bareos-fd.conf
bareos-fd: lex.c:238-0 Open config file: /etc/bareos/bareos-fd.conf
mailbox2-fd: message.c:351-0 Copy message resource 681b38 to 69f258
mailbox2-fd: jcr.c:141-0 read_last_jobs seek to 192
mailbox2-fd: jcr.c:148-0 Read num_items=10
mailbox2-fd: fd_plugins.c:1560-0 plugin dir is NULL
mailbox2-fd: filed.c:267-0 filed: listening on port 9102
mailbox2-fd: bnet_server_tcp.c:166-0 Addresses host[ipv4;192.168.1.87;9102] 
mailbox2-fd: dir_cmd.c:576-0 Conn: Hello Director backupsrv1-dir calling
mailbox2-fd: dir_cmd.c:582-0 Got a DIR connection at 30-Jan-2015 09:40:53
mailbox2-fd: find.c:74-0 init_find_files ff=7fd1dc001fe8
mailbox2-fd: dir_cmd.c:444-0 Calling Authenticate
mailbox2-fd: cram-md5.c:68-0 send: auth cram-md5 <1259909454.1422607253@mailbox2-fd> ssl=0
mailbox2-fd: cram-md5.c:123-0 cram-get received: auth cram-md5 <1379003071.1422607253@backupsrv1-dir> ssl=0
mailbox2-fd: cram-md5.c:143-0 sending resp to challenge: K8+KgE/ZPy+xb4+tc5Q5ZD
mailbox2-fd: dir_cmd.c:449-0 OK Authenticate
mailbox2-fd: dir_cmd.c:463-0 <dird: JobId=115280 Job=mailbox2.2015-01-30_09.40.51_14 SDid=47 SDtime=1422548355 Authorization=ILOH-OAEO-PALO-HHFB-KAHI-HFNO-HMCH-LJAI
mailbox2-fd: dir_cmd.c:474-0 Executing JobId= command.
mailbox2-fd: dir_cmd.c:1430-0 set sd auth key
mailbox2-fd: dir_cmd.c:810-0 JobId=115280 Auth=ILOH-OAEO-PALO-HHFB-KAHI-HFNO-HMCH-LJAI
mailbox2-fd: fd_plugins.c:1691-0 plugin list is NULL
mailbox2-fd: dir_cmd.c:463-0 <dird: level = accurate_incremental  mtime_only=0 
mailbox2-fd: dir_cmd.c:474-0 Executing level =  command.
mailbox2-fd: dir_cmd.c:1265-0 level_cmd: level = accurate_incremental  mtime_only=0 
mailbox2-fd: dir_cmd.c:463-0 <dird: level = since_utime 1418432914 mtime_only=0 prev_job=mailbox2.2014-12-13_00.05.01_44
mailbox2-fd: dir_cmd.c:474-0 Executing level =  command.
mailbox2-fd: dir_cmd.c:1265-0 level_cmd: level = since_utime 1418432914 mtime_only=0 prev_job=mailbox2.2014-12-13_00.05.01_44
mailbox2-fd: dir_cmd.c:1310-0 since_time=1418432914 prev_job=mailbox2.2014-12-13_00.05.01_44
mailbox2-fd: dir_cmd.c:1331-0 Dirtime=1422607253133861 FDtime=1422607253134383
mailbox2-fd: dir_cmd.c:1333-0 rt=196 adj=424
mailbox2-fd: dir_cmd.c:1331-0 Dirtime=1422607253134146 FDtime=1422607253134652
mailbox2-fd: dir_cmd.c:1333-0 rt=214 adj=823
mailbox2-fd: dir_cmd.c:1331-0 Dirtime=1422607253134425 FDtime=1422607253134938
mailbox2-fd: dir_cmd.c:1333-0 rt=208 adj=1232
mailbox2-fd: dir_cmd.c:1331-0 Dirtime=1422607253134710 FDtime=1422607253135216
mailbox2-fd: dir_cmd.c:1333-0 rt=213 adj=1632
mailbox2-fd: dir_cmd.c:1331-0 Dirtime=1422607253134990 FDtime=1422607253135499
mailbox2-fd: dir_cmd.c:1333-0 rt=215 adj=2034
mailbox2-fd: dir_cmd.c:1331-0 Dirtime=1422607253135273 FDtime=1422607253135785
mailbox2-fd: dir_cmd.c:1333-0 rt=222 adj=2435
mailbox2-fd: dir_cmd.c:1331-0 Dirtime=1422607253135571 FDtime=1422607253136081
mailbox2-fd: dir_cmd.c:1333-0 rt=213 adj=2839
mailbox2-fd: dir_cmd.c:1331-0 Dirtime=1422607253135788 FDtime=1422607253136364
mailbox2-fd: dir_cmd.c:1333-0 rt=143 adj=3344
mailbox2-fd: dir_cmd.c:1337-0 rt=143 adj=418
mailbox2-fd: dir_cmd.c:1352-0 adj=0 since_time=1418432914
mailbox2-fd: dir_cmd.c:463-0 <dird: fileset vss=1
mailbox2-fd: dir_cmd.c:474-0 Executing fileset command.
mailbox2-fd: dir_cmd.c:1175-0 Fileset: I
mailbox2-fd: fileset.c:251-0 I
mailbox2-fd: dir_cmd.c:1175-0 Fileset: Z NO_BACKUP
mailbox2-fd: fileset.c:251-0 Z NO_BACKUP
mailbox2-fd: dir_cmd.c:1175-0 Fileset: Z KEIN_BACKUP
mailbox2-fd: fileset.c:251-0 Z KEIN_BACKUP
mailbox2-fd: dir_cmd.c:1175-0 Fileset: O SACmcs:Vpins1:s
mailbox2-fd: fileset.c:251-0 O SACmcs:Vpins1:s
mailbox2-fd: dir_cmd.c:1175-0 Fileset: N
mailbox2-fd: fileset.c:251-0 N
mailbox2-fd: dir_cmd.c:1175-0 Fileset: F /
mailbox2-fd: fileset.c:251-0 F /
mailbox2-fd: dir_cmd.c:1175-0 Fileset: F /var
mailbox2-fd: fileset.c:251-0 F /var
mailbox2-fd: dir_cmd.c:1175-0 Fileset: F /var/log
mailbox2-fd: fileset.c:251-0 F /var/log
mailbox2-fd: dir_cmd.c:1175-0 Fileset: F /media/mailboxBackup
mailbox2-fd: fileset.c:251-0 F /media/mailboxBackup
mailbox2-fd: dir_cmd.c:1175-0 Fileset: N
mailbox2-fd: fileset.c:251-0 N
mailbox2-fd: dir_cmd.c:1175-0 Fileset: N
mailbox2-fd: fileset.c:251-0 N
mailbox2-fd: dir_cmd.c:1175-0 Fileset: E
mailbox2-fd: fileset.c:251-0 E
mailbox2-fd: dir_cmd.c:1175-0 Fileset: F /var/lib/bareos
mailbox2-fd: fileset.c:251-0 F /var/lib/bareos
mailbox2-fd: dir_cmd.c:1175-0 Fileset: F /tmp
mailbox2-fd: fileset.c:251-0 F /tmp
mailbox2-fd: dir_cmd.c:1175-0 Fileset: F /var/tmp
mailbox2-fd: fileset.c:251-0 F /var/tmp
mailbox2-fd: dir_cmd.c:1175-0 Fileset: N
mailbox2-fd: fileset.c:251-0 N
mailbox2-fd: dir_cmd.c:1175-0 Fileset: N
mailbox2-fd: fileset.c:251-0 N
mailbox2-fd: dir_cmd.c:463-0 <dird: storage address=192.168.1.100 port=9103 ssl=0
mailbox2-fd: dir_cmd.c:474-0 Executing storage  command.
mailbox2-fd: dir_cmd.c:1449-0 StorageCmd: storage address=192.168.1.100 port=9103 ssl=0
mailbox2-fd: dir_cmd.c:1463-0 Open storage: 192.168.1.100:9103 ssl=0
mailbox2-fd: bsock.c:70-0 All source addresses 
mailbox2-fd: bsock_tcp.c:230-0 Current host[ipv4;192.168.1.100;9103]  All host[ipv4;192.168.1.100;9103] 
mailbox2-fd: bsock_tcp.c:153-0 who=Storage daemon host=192.168.1.100 port=9103
mailbox2-fd: dir_cmd.c:1499-0 Connection OK to SD.
mailbox2-fd: cram-md5.c:123-0 cram-get received: auth cram-md5 <1046372284.1422607253@backupsrv1-sd> ssl=1
mailbox2-fd: cram-md5.c:143-0 sending resp to challenge: 06s/0+sDm9/7Ezp1XVc6xC
mailbox2-fd: cram-md5.c:75-0 send: auth cram-md5 <664462086.1422607253@mailbox2-fd> ssl=0
mailbox2-fd: cram-md5.c:94-0 Authenticate OK f+tkC4Eag/+3yRFOb6QIPC
mailbox2-fd: dir_cmd.c:1508-0 Authenticated with SD.
mailbox2-fd: dir_cmd.c:463-0 <dird: Run OnSuccess=1 OnFailure=0 AbortOnError=1 When=2 Command=/usr/local/sbin/create-backup-snapshot
mailbox2-fd: dir_cmd.c:474-0 Executing Run command.
mailbox2-fd: runscript.c:41-0 runscript: creating new RUNSCRIPT object
mailbox2-fd: dir_cmd.c:942-0 runscript_cmd: 'Run OnSuccess=1 OnFailure=0 AbortOnError=1 When=2 Command=/usr/local/sbin/create-backup-snapshot
'
mailbox2-fd: runscript.c:232-0 runscript: setting command = /usr/local/sbin/create-backup-snapshot
mailbox2-fd: runscript.c:334-0 runscript: debug
mailbox2-fd: runscript.c:335-0  --> RunScript
mailbox2-fd: runscript.c:336-0   --> Command=/usr/local/sbin/create-backup-snapshot
mailbox2-fd: runscript.c:337-0   --> Target=*None*
mailbox2-fd: runscript.c:338-0   --> RunOnSuccess=1
mailbox2-fd: runscript.c:339-0   --> RunOnFailure=0
mailbox2-fd: runscript.c:340-0   --> FailJobOnError=1
mailbox2-fd: runscript.c:341-0   --> RunWhen=2
mailbox2-fd: dir_cmd.c:463-0 <dird: Run OnSuccess=1 OnFailure=0 AbortOnError=1 When=1 Command=/usr/local/sbin/create-backup-snapshotREMOVE
mailbox2-fd: dir_cmd.c:474-0 Executing Run command.
mailbox2-fd: runscript.c:41-0 runscript: creating new RUNSCRIPT object
mailbox2-fd: dir_cmd.c:942-0 runscript_cmd: 'Run OnSuccess=1 OnFailure=0 AbortOnError=1 When=1 Command=/usr/local/sbin/create-backup-snapshotREMOVE
'
mailbox2-fd: runscript.c:232-0 runscript: setting command = /usr/local/sbin/create-backup-snapshot REMOVE
mailbox2-fd: runscript.c:334-0 runscript: debug
mailbox2-fd: runscript.c:335-0  --> RunScript
mailbox2-fd: runscript.c:336-0   --> Command=/usr/local/sbin/create-backup-snapshot REMOVE
mailbox2-fd: runscript.c:337-0   --> Target=*None*
mailbox2-fd: runscript.c:338-0   --> RunOnSuccess=1
mailbox2-fd: runscript.c:339-0   --> RunOnFailure=0
mailbox2-fd: runscript.c:340-0   --> FailJobOnError=1
mailbox2-fd: runscript.c:341-0   --> RunWhen=1
mailbox2-fd: dir_cmd.c:463-0 <dird: RunBeforeNow
mailbox2-fd: dir_cmd.c:474-0 Executing RunBeforeNow command.
mailbox2-fd: runscript.c:149-0 runscript: running all RUNSCRIPT object (ClientBeforeJob) JobStatus=C
mailbox2-fd: runscript.c:165-0 runscript: try to run *None*:/usr/local/sbin/create-backup-snapshot
mailbox2-fd: runscript.c:172-0 runscript: Run it because SCRIPT_Before (/usr/local/sbin/create-backup-snapshot,1,0,C)
mailbox2-fd: runscript.c:264-0 runscript: running a RUNSCRIPT object type=124
mailbox2-fd: util.c:768-0 edit_job_codes: /usr/local/sbin/create-backup-snapshot
mailbox2-fd: runscript.c:271-0 runscript: running '/usr/local/sbin/create-backup-snapshot'...
bareos-fd.log (8,281 bytes)   
jbehrend

jbehrend

2015-01-30 09:48

reporter   ~0001237

Still exists with:

DIR: Version: 14.2.1+20141017gitc6c5b56-3 (jessie)
FD: Version: 14.2.2-46.1 (wheezy)

FD-Log is uploaded.

If you need more let me know ...
Cheers Jan

DIR output is this:

*run job=mailbox2 yes
Using Catalog "MyCatalog"
Job queued. JobId=115280
*
30-Jan 09:40 backupsrv1-dir JobId 115280: Start Backup JobId 115280, Job=mailbox2.2015-01-30_09.40.51_14
30-Jan 09:40 backupsrv1-dir JobId 115280: Using Device "Backupsrv1_FileStorage-mailbox2" to write.
30-Jan 09:40 mailbox2-fd JobId 115280: shell command: run ClientBeforeJob "/usr/local/sbin/create-backup-snapshot"
30-Jan 09:40 mailbox2-fd JobId 115280: ClientBeforeJob: Creating backup snapshot
30-Jan 09:40 mailbox2-fd JobId 115280: ClientBeforeJob: Stopping IMAP/POP3 mail server: dovecot.
30-Jan 09:40 mailbox2-fd JobId 115280: ClientBeforeJob: Logical volume "mailboxBackup" created
30-Jan 09:40 mailbox2-fd JobId 115280: ClientBeforeJob: Starting IMAP/POP3 mail server: dovecot.
30-Jan 09:40 mailbox2-fd JobId 115280: ClientBeforeJob: done
maik

maik

2015-11-06 17:48

administrator   ~0001943

Could not reproduce it, probably individual scripting problem.

Issue History

Date Modified Username Field Change
2014-12-08 10:25 jbehrend New Issue
2015-01-15 16:03 pstorz Assigned To => pstorz
2015-01-15 16:03 pstorz Status new => assigned
2015-01-23 12:03 pstorz Note Added: 0001210
2015-01-26 19:36 mvwieringen Assigned To pstorz =>
2015-01-26 19:36 mvwieringen Severity major => minor
2015-01-26 19:36 mvwieringen Status assigned => feedback
2015-01-30 09:46 jbehrend File Added: bareos-fd.log
2015-01-30 09:48 jbehrend Note Added: 0001237
2015-01-30 09:48 jbehrend Status feedback => new
2015-11-06 17:48 maik Note Added: 0001943
2015-11-06 17:48 maik Status new => closed
2015-11-06 17:48 maik Resolution open => unable to reproduce