Dan Langille wrote:
> Steve Polyack wrote:
>> Dan Langille wrote:
>>> I'm trying to get a regression test instance setup. This process worked
>>> previously when we used svn. Since then, it's been failing, and I don't
>>> know why.
>>>
>>>
>>> [...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ scripts/pretest
>>>
>>>
>>> === Starting pretest at 09:14:03 ===
>>>
>>> Starting the Bacula Storage daemon
>>> Starting the Bacula File daemon
>>> Starting the Bacula Director daemon
>>> Connecting to Director localhost:8101
>>> bconsole: bsock.c:228 Socket open error. proto=28 port=8101. ERR=Protocol
>>> not supported
>>> Error: Starting Bacula Failed in pretest
>>> scripts/cleanup
>>> rm -f tmp/file-list
>>> rm -fr tmp/* working/* Testing
>>> rm -f test.out
>>> rm -f diff
>>>
>>> [rest of the output snipped]
>>>
>>> I started breaking down the script by steps, and found the error is
>>> related to this:
>>>
>>> $ ${bin}/bconsole -c ${conf}/bconsole.conf
>>> Connecting to Director localhost:8101
>>> bconsole: bsock.c:228 Socket open error. proto=28 port=8101. ERR=Protocol
>>> not supported
>>> 1000 OK: localhost-dir Version: 3.0.3 (09 August 2009)
>>> Enter a period to cancel a command.
>>> *
>>>
>>>
>>> $ netstat -na | grep LISTEN | grep 810
>>> netstat: kvm not available
>>> netstat: kvm not available
>>> tcp4 0 0 10.55.0.20.8101 *.* LISTEN
>>> tcp4 0 0 10.55.0.20.8102 *.* LISTEN
>>> tcp4 0 0 10.55.0.20.8103 *.* LISTEN
>>>
>>> Any ideas?
>
> > proto=28 maps to AF_INET6, aka IPv6. Does the host you are running
> > the tests on have IPv6 enabled/built-in?
>
> It does not
>
> > A quick look at the code shows that it shouldn't attempt to open any
> > IPv6 sockets unless you are telling it to listen on one. If 'address
> > = localhost' is being set in bconsole.conf and /etc/hosts resolves
> > localhost to an IPv6 address first without IPv6 support on the host,
> > this is likely the problem. Remove the lines mapping localhost to
> > ::1.
>
>
> Done. The problem persists this morning.
>
> $ grep localhost /etc/hosts
> #::1 localhost localhost.my.domain
> 127.0.0.1 localhost localhost.my.domain
>
> However, the DNS servers for this system resolve localhost as:
>
> ;; QUESTION SECTION:
> ;localhost. IN A
>
> ;; ANSWER SECTION:
> localhost. 10800 IN A 127.0.0.1
>
> ;; AUTHORITY SECTION:
> localhost. 10800 IN NS localhost.
>
> ;; ADDITIONAL SECTION:
> localhost. 10800 IN AAAA ::1
Regression tests are failing. The suggestion is an IPv6 related issue.
GRANT
GRANT
GRANT
Privileges for regress granted on regress.
Starting the Bacula Storage daemon
Starting the Bacula File daemon
Starting the Bacula Director daemon
Stopping the Bacula File daemon
Stopping the Bacula Storage daemon
Stopping the Bacula Director daemon
echo "Doing: scripts/do_sed"
Doing: scripts/do_sed
scripts/do_sed
[...@ducky:~/src/BaculaRegressionTesting-TRUNK/regress] $ ./scripts/pretest
=== Starting pretest at 06:57:45 ===
Starting the Bacula Storage daemon
Starting the Bacula File daemon
Starting the Bacula Director daemon
Connecting to Director localhost:8101
bconsole: bsock.c:228 Socket open error. proto=28 port=8101.
ERR=Protocol not supported
Error: Starting Bacula Failed in pretest
scripts/cleanup
^C
The problem is this line from run_bacula in scripts/functions:
$ cat ${tmp}/bconcmds | ${bin}/bconsole -c ${conf}/bconsole.conf
Connecting to Director localhost:8101
bconsole: bsock.c:228 Socket open error. proto=28 port=8101.
ERR=Protocol not supported
1000 OK: localhost-dir Version: 3.0.3 (20 August 2009)
Enter a period to cancel a command.
messages
You have no messages.
quit
If I alter ${conf}/bconsole.conf to replace localhost with 127.0.0.1,
the command succeeds:
$ cat ${tmp}/bconcmds | ${bin}/bconsole -c ${conf}/bconsole.conf
Connecting to Director 127.0.0.1:8101
1000 OK: localhost-dir Version: 3.0.3 (20 August 2009)
Enter a period to cancel a command.
messages
You have no messages.
quit
It appears Bacula is getting the IPv6 address of localhost and trying
that first. It is not getting this from /etc/hosts:
$ grep localhost /etc/hosts
#::1 localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain
$ cat /etc/resolv.conf
search unixathome.org
nameserver 10.55.0.1
nameserver 10.55.0.67
$ dig @10.55.0.1 localhost
; <<>> DiG 9.3.3 <<>> @10.55.0.1 localhost
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64352
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;localhost. IN A
;; ANSWER SECTION:
localhost. 10800 IN A 127.0.0.1
;; AUTHORITY SECTION:
localhost. 10800 IN NS localhost.
;; ADDITIONAL SECTION:
localhost. 10800 IN AAAA ::1
;; Query time: 9 msec
;; SERVER: 10.55.0.1#53(10.55.0.1)
;; WHEN: Sat Aug 22 07:24:49 2009
;; MSG SIZE rcvd: 85
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?
------------------------------------------------------------------------------
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