Gentoo Archives: gentoo-user

From: Manuel McLure <manuel@××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] MySQL startup problem - interface does not have an address yet.
Date: Wed, 23 Jan 2013 18:58:29
Message-Id: CAGJrxsT3U8AS4OuDkefmY_mnxpeHR2QS9=T_GGRFPmzeYK5O-A@mail.gmail.com
1 I'm having a problem with booting my Gentoo system due to MySQL
2 hanging at startup. My system is up-to-date stable (including
3 udev-197, although I believe the problem started while I was still on
4 171) except for the kernel, which is at 3.1.10 because I can't seem to
5 get lirc to work correctly on newer kernels. The problem started after
6 a large system update just before the udev 171 to 197 migration. Among
7 other upgrades dhcpcd was upgraded from 5.2.12 to 5.6.4, net-tools was
8 upgraded from 1.60_p20110409135728 to 1.60_p20120127084908, and openrc
9 was upgraded from 0.9.8.4 to 0.11.8.
10
11 For historical reasons, this system has two ethernet adapters, eth0
12 and eth1. eth0 is not configured any more (it used to be used for IPTV
13 connectivity to my cable provider for MythTV before they changes their
14 system.) eth1 is configured via DHCP to an RFC 1918 10.x.x.x address -
15 the DHCP server is always configured to provide the same IP address
16 for this system. net.eth1 is symlinked to /etc/runlevels/default.
17
18 The boot process starts, configures eth1, starts LCDd, and then
19 attempts to start MySQL - and hangs for about 15 minutes before
20 continuing with the boot.
21
22 I added several debugging statements to /etc/init.d/mysql and found
23 that even though the log shows that eth1 got its IP address, when
24 MySQL attempts to start the interface does not have an IP address
25 assigned. It's like the net.eth1 script exits before the interface is
26 completely up.
27
28 After the 15 minute hang, the system boots up as usual, except for
29 MySQL not running. If I then start mysql manually it comes up
30 immediately.
31
32 Here's the rc.log output:
33
34 * Starting D-BUS system messagebus ...
35 [ ok ]
36 * Bringing up interface eth1
37 * dhcp ...
38 * Running dhcpcd ...
39 dhcpcd[8400]: version 5.6.4 starting
40 dhcpcd[8400]: eth1: waiting for carrier
41 dhcpcd[8400]: eth1: carrier acquired
42 dhcpcd[8400]: eth1: sending IPv6 Router Solicitation
43 dhcpcd[8400]: eth1: sendmsg: Cannot assign requested address
44 dhcpcd[8400]: eth1: rebinding lease of 10.x.y.14
45 dhcpcd[8400]: eth1: acknowledged 10.x.y.14 from 10.x.y.1
46 dhcpcd[8400]: eth1: checking for 10.x.y.14
47 dhcpcd[8400]: eth1: Router Advertisement from NNNN::NNNN:NNNN:NNNN:NNNN
48 dhcpcd[8400]: forked to background, child pid 8454
49 [ ok ]
50 * received address
51 [ ok ]
52 * Adding routes
53 * 239.0.0.0/8 ...
54 [ ok ]
55 * Starting LCDd ...
56 [ ok ]
57 * Starting mysql ...
58 [ !! ]
59 * ERROR: mysql failed to start
60 * Starting syslog-ng ...
61 [ ok ]
62 * Mounting network filesystems ...
63 [ ok ]
64
65 I added the following commands before the start-stop-daemon line in
66 /etc/init.d/mysql:
67
68 date >/var/log/mysqlstart.log
69 netstat -anp | grep 3306 >>/var/log/mysqlstart.log
70 ps -efl | grep mysql >>/var/log/mysqlstart.log
71 lsof -i @10.x.y.14:3306 >>/var/log/mysqlstart.log
72 ifconfig -a >>/var/log/mysqlstart.log
73
74 The output of this was:
75
76 Wed Jan 23 09:56:03 PST 2013
77 0 S root 8497 8290 0 80 0 - 4301 poll_s 09:56 ?
78 00:00:00 /sbin/runscript /etc/init.d/mysql --lockfd 10 start
79 4 S root 8498 8497 1 80 0 - 3425 wait 09:56 ?
80 00:00:00 /bin/sh /lib64/rc/sh/runscript.sh /etc/init.d/mysql start
81 0 S root 8537 8498 0 80 0 - 2142 pipe_w 09:56 ?
82 00:00:00 grep mysql
83 eth0: flags=4098<BROADCAST,MULTICAST> mtu 1500
84 ether 00:22:15:b7:ff:bc txqueuelen 1000 (Ethernet)
85 RX packets 0 bytes 0 (0.0 B)
86 RX errors 0 dropped 0 overruns 0 frame 0
87 TX packets 0 bytes 0 (0.0 B)
88 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
89 device interrupt 22 base 0xa000
90
91 eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
92 inet6 NNNN:NNNN:NNNN:NNNN:NNNN:NNNN:NNNN:NNNN prefixlen 64
93 scopeid 0x0<global>
94 inet6 NNNN::NNNN:NNNN:NNNN:NNNN prefixlen 64 scopeid 0x20<link>
95 ether 00:1b:21:b1:cb:bb txqueuelen 1000 (Ethernet)
96 RX packets 9 bytes 1149 (1.1 KiB)
97 RX errors 0 dropped 0 overruns 0 frame 0
98 TX packets 8 bytes 936 (936.0 B)
99 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
100 device interrupt 18 memory 0xfebe0000-fec00000
101
102 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
103 inet 127.0.0.1 netmask 255.0.0.0
104 inet6 ::1 prefixlen 128 scopeid 0x10<host>
105 loop txqueuelen 0 (Local Loopback)
106 RX packets 0 bytes 0 (0.0 B)
107 RX errors 0 dropped 0 overruns 0 frame 0
108 TX packets 0 bytes 0 (0.0 B)
109 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
110
111 As you can see, eth1 has no IPV4 address assigned. Once the server
112 boots (after the 15 minute mysql timeout ends) ifconfig shows the
113 following:
114
115
116 eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
117 inet 10.x.y.14 netmask 255.255.255.0 broadcast 10.x.y.255
118 inet6 NNNN:NNNN:NNNN:NNNN:NNNN:NNNN:NNNN:NNNN prefixlen 64
119 scopeid 0x0<global>
120 inet6 NNNN::NNNN:NNNN:NNNN:NNNN prefixlen 64 scopeid 0x20<link>
121 ether 00:1b:21:b1:cb:bb txqueuelen 1000 (Ethernet)
122 RX packets 2732 bytes 496650 (485.0 KiB)
123 RX errors 0 dropped 0 overruns 0 frame 0
124 TX packets 1853 bytes 277789 (271.2 KiB)
125 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
126 device interrupt 18 memory 0xfebe0000-fec00000
127
128 In rc.conf I have rc_depend_strict set to YES. I do *not* have
129 rc_parallel set. I attempted adding "need net" to the depend() section
130 of the mysql init script with no effect.
131
132 The entries for eth1 in /etc/conf.d/net are:
133
134 config_eth1="dhcp"
135 routes_eth1="239.0.0.0/8"
136
137 I also tested adding
138
139 dhcpcd_eth1="--waitip"
140
141 to /etc/conf.d/net again to no avail.
142
143 I could add a delay to the mysql script to ensure startup, but I'd
144 rather figure out why the IP address is not yet available even though
145 the net.eth1 script has completed. Does anyone have any hints on what
146 could be going wrong?
147
148 Thanks!
149 --
150 Manuel A. McLure WW1FA <manuel@××××××.org> <http://www.mclure.org>
151 ...for in Ulthar, according to an ancient and significant law,
152 no man may kill a cat. -- H.P. Lovecraft

Replies

Subject Author
Re: [gentoo-user] MySQL startup problem - interface does not have an address yet. Stroller <stroller@××××××××××××××××××.uk>
Re: [gentoo-user] MySQL startup problem - interface does not have an address yet. Paul Hartman <paul.hartman+gentoo@×××××.com>
Re: [gentoo-user] MySQL startup problem - interface does not have an address yet. Kerin Millar <kerframil@×××××××××××.uk>