-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kern Sibbald wrote:
> On Saturday 22 August 2009 20:49:11 Dan Langille wrote:
>> Dan Langille wrote:
>>> Dan Langille wrote:
>>>> Dan Langille wrote:
>>>>> Dan Langille wrote:
>>>>>> Eric Bollengier wrote:
>>>>>>> Le Saturday 22 August 2009 13:57:51 Dan Langille, vous avez écrit :
>>>>>>>> Eric Bollengier wrote:
>>>>>>>>> Le Saturday 22 August 2009 13:48:06 Dan Langille, vous avez écrit :
>>>>>>>>>> Eric Bollengier wrote:
>>>>>>>>>>> Le Saturday 22 August 2009 13:28:40 Dan Langille, vous avez
> écrit :
>>>>>>>>>>>> It appears Bacula is always trying the IPv6 address first,
>>>>>>>>>>>> despite no IPV6 support on this box, then failing. Is that what
>>>>>>>>>>>> we want? Should it not then try IP4 given the address is there?
>>>>>>>>>>> It seems to be related to the bug #1029 corrected in May.
>>>>>>>>>>> http://bugs.bacula.org/view.php?id=1029
>>>>>>>>>>>
>>>>>>>>>>> >From what i read in the code, it should try the IPV6 first, then
>>>>>>>>>>>> the
>>>>>>>>>>>>
>>>>>>>>>>>> IPV4
>>>>>>>>>>>>
>>>>>>>>>>>> (if
>>>>>>>>>>> any).
>>>>>>>>>>>
>>>>>>>>>>> If one of them is usable, the connection should be ok and you
>>>>>>>>>>> should see only an Error message reported by a Pmsg() about the
>>>>>>>>>>> IPV6 protocol. Maybe this Pmsg() is causing the problem.
>>>>>>>>>>>
>>>>>>>>>>> Can you try to comment the src/lib/block.c:1025 Pmsg() call, and
>>>>>>>>>>> re-run the test ?
>>>>>>>>> You should read src/lib/bsock.c and not src/lib/block.c
>>>>>>>> Found. Line number is not correct though. I think you mean 228.
>>>>>>> Human grep works well :)
>>>>>> Well, I want to make sure I'm doing as expected. :)
>>>>>>
>>>>>>
>>>>>> === Starting pretest at 08:34:42 ===
>>>>>>
>>>>>> Starting the Bacula Storage daemon
>>>>>> Starting the Bacula File daemon
>>>>>> Starting the Bacula Director daemon
>>>>>> Connecting to Director localhost:8101
>>>>>> Error: Starting Bacula Failed in pretest
>>>>>> scripts/cleanup
>>>>>> rm -f tmp/file-list
>>>>>> rm -fr tmp/* working/* Testing
>>>>>>
>>>>>>
>>>>>> Still an issue. I'll look close at pretest now.
>>>>> Interesting. Running the commands manually succeeds:
>>>>>
>>>>>
>>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ zstat=0
>>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ debug_wait
>>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ echo $debug
>>>>> 1
>>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>>>> ${scripts}/bacula-ctl-sd start
>>>>> Starting the Bacula Storage daemon
>>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>>>> ${scripts}/bacula-ctl-fd start
>>>>> Starting the Bacula File daemon
>>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>>>> ${scripts}/bacula-ctl-dir start
>>>>> Starting the Bacula Director daemon
>>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ ps auwx |
>>>>> grep bacula
>>>>> root 43698 0.0 0.3 5436 2608 ?? IsJ 7:27AM 0:00.02
>>>>> /usr/local/sbin/bacula-fd -u root -g wheel -v -c
>>>>> /usr/local/etc/bacula-f dan 82628 0.0 0.3 4704 3024 ?? IsJ
>>>>> 8:55AM 0:00.01
>>>>> /usr/home/dan/src/BaculaRegressionTesting-TRUNK/regress/bin/bacula-sd
>>>>> -v dan 82777 0.0 0.3 4400 2860 ?? SsJ 8:56AM 0:00.01
>>>>> /usr/home/dan/src/BaculaRegressionTesting-TRUNK/regress/bin/bacula-fd
>>>>> -v dan 82860 0.0 0.3 5116 3448 ?? SsJ 8:56AM 0:00.01
>>>>> /usr/home/dan/src/BaculaRegressionTesting-TRUNK/regress/bin/bacula-dir
>>>>> - dan 82896 0.0 0.1 1544 612 p1 R+J 8:56AM 0:00.00 grep
>>>>> bacula [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ cat
>>>>> ${tmp}/bconcmds | ${bin}/bconsole -c ${conf}/bconsole.conf
>>>>> Connecting to Director localhost:8101
>>>>> 1000 OK: localhost-dir Version: 3.0.3 (22 August 2009)
>>>>> Enter a period to cancel a command.
>>>>> messages
>>>>> You have no messages.
>>>>> quit
>>>>>
>>>>>
>>>>> Still testing.
>>>> The reason it 'fails' but 'succeeds':
>>>>
>>>> $ run_bacula
>>>> Starting the Bacula Storage daemon
>>>> Starting the Bacula File daemon
>>>> Starting the Bacula Director daemon
>>>> Connecting to Director localhost:8101
>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ echo $?
>>>> 1
>>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>>>
>>>> The result is 1 but there is no error shown.
>>>>
>>>>
>>>> Still looking.
>>> I am stumped. I have no idea why run_bacula returns 1 yet running the
>>> same commands by hand obtains 0.
>>>
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>> TestName="pretest"
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ JobName=backup
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ error=0
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ .
>>> scripts/functions
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ copy_test_confs
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ cat
>>> <<END_OF_DATA >${cwd}/tmp/bconcmds
>>>
>>> > messages
>>> > quit
>>> > END_OF_DATA
>>>
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ start_test
>>>
>>>
>>> === Starting pretest at 09:33:32 ===
>>>
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ run_bacula
>>> Starting the Bacula Storage daemon
>>> Starting the Bacula File daemon
>>> Starting the Bacula Director daemon
>>> Connecting to Director localhost:8101
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ echo $?
>>> 1
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ stop_bacula
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ echo $debug
>>> 1
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ run_bacula
>>> Starting the Bacula Storage daemon
>>> Starting the Bacula File daemon
>>> Starting the Bacula Director daemon
>>> Connecting to Director localhost:8101
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ echo $?
>>> 1
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ stop_bacula
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ debug_wait
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ zstat=0
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>> ${scripts}/bacula-ctl-sd start
>>> Starting the Bacula Storage daemon
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>> ${scripts}/bacula-ctl-fd start $1
>>> Starting the Bacula File daemon
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>>> ${scripts}/bacula-ctl-dir start
>>> Starting the Bacula Director daemon
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ cat
>>> ${tmp}/bconcmds | ${bin}/bconsole -c ${conf}/bconsole.conf
>>> Connecting to Director localhost:8101
>>> 1000 OK: localhost-dir Version: 3.0.3 (22 August 2009)
>>> Enter a period to cancel a command.
>>> messages
>>> You have no messages.
>>> quit
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ echo $?
>>> 0
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $
>> Could something have changed with bconsole lately? Whether or not
>> bacula-dir is running, the result of the connection is 1.
>>
>> I amended run_bacula to display the result within the function, just in
>> case there was a problem there. I think not. I think the problem is
>> with bconsole.
>>
>> My test with bacula-dir running:
>>
>> $ run_bacula
>> Starting the Bacula Storage daemon
>> Starting the Bacula File daemon
>> Starting the Bacula Director daemon
>> Connecting to Director localhost:8101
>> the answer is 1
>>
>>
>> Now I amend scripts/functions to comment out the
>> '${scripts}/bacula-ctl-dir start' within run_bacula.
>>
>> Now I try the same test with without bacula-dir running:
>>
>> $ stop_bacula
>> $ . scripts/functions
>> $ run_bacula
>> Starting the Bacula Storage daemon
>> Starting the Bacula File daemon
>> Connecting to Director localhost:8101
>> the answer is 1
>> $
>>
>> The same answer, both times. Is this expected?
>
> Yes, if the Director never runs correctly, which can happen for a number of
> reasons. The most common is that the SQL engine is not running properly or
> cannot be connected to.
NOTE: the bconsole connection returns 1 regardless of whether or not the
Director is running. Is this expected?
>
> Kern
>
>>
>> FYI, here is my run_bacula:
>>
>> run_bacula()
>> {
>> debug_wait
>> zstat=0
>> if test "$debug" -eq 1 ; then
>> ${scripts}/bacula-ctl-sd start
>> ${scripts}/bacula-ctl-fd start $1
>> # ${scripts}/bacula-ctl-dir start
>> cat ${tmp}/bconcmds | ${bin}/bconsole -c ${conf}/bconsole.conf
>> answer=$?
>> echo the answer is $answer
>> return $answer
>> else
>> ${bin}/bacula start >/dev/null 2>&1
>> cat ${tmp}/bconcmds | ${bin}/bconsole -c ${conf}/bconsole.conf
>>
>>> /dev/null
>> answer=$?
>> echo my answer is $answer
>> return $answer
>> fi
>> }
>
>
- --
Dan Langille
BSDCan - The Technical BSD Conference : http://www.bsdcan.org/
PGCon - The PostgreSQL Conference: http://www.pgcon.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkqQTz4ACgkQCgsXFM/7nTyqoACdFAkXtvBPr4p2ln/6muIkaD41
f4QAoMd3ti0WG45I9pscFyYAQ75oTtVS
=MXLd
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel