[Dnsmasq-discuss] [Fwd: Re: Long freeze during tomcat start]

Adam Hardy adam.ant at cyberspaceroad.com
Fri May 23 14:23:15 BST 2008


I'm trying to figure out a time-out issue with the Apache Tomcat web server, and 
I have dug quite deeply into the issue with the help of the tomcat user mailing 
list.

Apparently my machine's configuration for IPv6 may be causing a connection 
time-out and failure during tomcat's start-up routine. The machine is a gateway 
between the internet and my LAN, running dnsmasq as a DHCP and DNS server.

Tomcat displays a freeze or hang at start-up which I have tracked down to an 
IPv6 system call that times out, as shown by this line from a tomcat strace log:

connect(11, {sa_family=AF_INET6, sin6_port=htons(48669),
  inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0},
  28) = -1 ETIMEDOUT (Connection timed out)

Tomcat runs fine on a workstation on my LAN. This is my ifconfig -a output from 
the two machines:

Good machine:
eth0      Link encap:Ethernet  HWaddr 00:10:DC:79:FF:8F
           inet addr:192.168.0.234  Bcast:192.168.0.255  Mask:255.255.255.0
           inet6 addr: fe80::210:dcff:fe79:ff8f/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:606692 errors:0 dropped:0 overruns:0 frame:0
           TX packets:598681 errors:0 dropped:0 overruns:0 carrier:0
           collisions:65 txqueuelen:1000
           RX bytes:145074456 (138.3 MiB)  TX bytes:44751878 (42.6 MiB)

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:59645 errors:0 dropped:0 overruns:0 frame:0
           TX packets:59645 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:5125125 (4.8 MiB)  TX bytes:5125125 (4.8 MiB)

Gateway machine (eth1 is LAN, eth2 is internet):
eth1      Link encap:Ethernet  HWaddr 00:18:F3:98:F4:EC
           inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
           inet6 addr: fe80::218:f3ff:fe98:f4ec/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:134101 errors:0 dropped:0 overruns:0 frame:0
           TX packets:138909 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:100
           RX bytes:12595060 (12.0 MiB)  TX bytes:53461584 (50.9 MiB)
           Base address:0xbc00 Memory:fe8e0000-fe900000

eth2      Link encap:Ethernet  HWaddr 00:08:54:0A:B1:E7
           inet addr:86.138.125.132  Bcast:86.138.125.132  Mask:255.255.255.255
           inet6 addr: fe80::208:54ff:fe0a:b1e7/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:56889 errors:0 dropped:0 overruns:0 frame:0
           TX packets:50695 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:42379708 (40.4 MiB)  TX bytes:6543279 (6.2 MiB)
           Interrupt:58 Base address:0xd800

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:3894 errors:0 dropped:0 overruns:0 frame:0
           TX packets:3894 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:236606 (231.0 KiB)  TX bytes:236606 (231.0 KiB)


I don't have any plans to set up my LAN as an IPv6 network, and I can't find any 
tomcat configuration options to tell it not to use IPv6 - have you got any tips 
that I could follow to sort this one out?

Thanks
Adam






More information about the Dnsmasq-discuss mailing list