Bacula-users

Re: [Bacula-users] RunBeforeJob get stuck .. sometimes ..

2008-07-22 02:23:09
Subject: Re: [Bacula-users] RunBeforeJob get stuck .. sometimes ..
From: Arno Lehmann <al AT its-lehmann DOT de>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 22 Jul 2008 08:22:50 +0200
Hello,

21.07.2008 17:48, Tilman Schmidt wrote:
> Jeremy Koppel schrieb:
> 
>> The script: /etc/bacula/customScripts/backupComplete.bash:
>>
>> #!/bin/bash
>> #
>> # This script fires after Alfresco backup is complete.
>>  
>> source /etc/profile
>> /etc/init.d/alfresco start
>> echo "This was echoed from the bacula script."
>>
>> Bacula log:
>>  
>> 20-Jul 21:20 ns2-sd: Volume "AAA017L2" previously written, moving to 
>> end of data.
>> 20-Jul 21:21 ns2-sd: Ready to append to end of Volume "AAA017L2" at 
>> file=9.
>> 20-Jul 21:32 bckm1-fd: ClientAfterJob: run command 
>> "/etc/bacula/customScripts/backupComplete.bash"
>> 20-Jul 21:32 bckm1-fd: ClientAfterJob: Starting OpenOffice service ...
>> 20-Jul 21:32 bckm1-fd: ClientAfterJob: Starting Alfresco ...
>> 20-Jul 21:32 bckm1-fd: ClientAfterJob: This was echoed from the bacula 
>> script.
>> 20-Jul 21:51 ns2-dir: bckm1.2008-07-20_21.19.44 Fatal error: Network 
>> error with FD during Backup: ERR=No data available
>>
>> The last line is where I restart the Bacula client service on bckm1-fd 
>> since the script does not complete.  Any idea why this would be 
>> hanging on my script?

Yes...

> If an ssh session won't close after the shell running inside it exits,
> it's usually because some process started from that shell wasn't
> properly demonized and still keeps the terminal open. There are quite
> a few init scripts in the wild which have that problem. Although I
> don't know Alfresco I would guess it's one of them.

... I'm thinking along the same lines.

IIRC, I suggested to run the init script backgrounded and nohup'ed. If 
the run after job script finishes then you could investigate if there 
are any children or grandchildren of it still running, and you could 
check which files (terminals, in this case) those have left open.

You could even check which files your currently running alfresco has open.

A well-behaving daemon usually closes its stdin, stdout, and stderr 
files or reopens them on the fork to background, like this:

httpd2-pr 6045 root    0r   CHR    1,3              4610 /dev/null
httpd2-pr 6045 root    1w   CHR    1,3              4610 /dev/null
httpd2-pr 6045 root    2w   REG  253,3   88157 117442915 
/var/log/apache2/error_log


Arno

> HTH
> TS
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users