Wasca
November 16th, 2010, 07:14 PM
Hi Guys
I've just completed a new 10.04.1 LTS 64bit server LAMP install. I've also add a sub interface to eth0 called eth0:1
When I start my server Apache is not starting and I'm seeing this error in my /var/log/boot.log file
fsck from util-linux-ng 2.17.2
fsck from util-linux-ng 2.17.2
/dev/mapper/apoch-root: clean, 91882/4669440 files, 688111/18654208 blocks
/dev/sda1: clean, 211/124496 files, 48619/248832 blocks
* Starting AppArmor profiles ^[[80G
^[[74G[ OK ]
* Starting web server apache2 ^[[80G (99)Cannot assign requested address: make_sock: could not bind to address 203.xxx.xxx.xxx:80
no listening sockets available, shutting down
Unable to open logs
^[[74G[^[[31mfail^[[39;49m]
I've sanitised the log, but essentially it appears that the sub interface was not up before apache tried to use it.
I can confirm that the interface does come up once the boot process is complete.
eth0 Link encap:Ethernet HWaddr 00:14:22:7c:4e:2b
inet addr:203.xxx.xxx.xxx Bcast:203.xxx.xxx.xxx Mask:255.255.255.224
inet6 addr: fe80::214:22ff:fe7c:4e2b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:166 errors:0 dropped:0 overruns:0 frame:0
TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19138 (19.1 KB) TX bytes:20015 (20.0 KB)
Interrupt:16
eth0:1 Link encap:Ethernet HWaddr 00:14:22:7c:4e:2b
inet addr:203.xxx.xxx.xxx Bcast:203.xxx.xxx.xxx Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
As a crude fix I included a "sleep 5" command in the /etc/init.d/apache start up script at the "start" case
case $1 in
start)
log_daemon_msg "Starting web server" "apache2"
sleep 5
if $APACHE2CTL start; then
if check_htcacheclean ; then
log_progress_msg htcacheclean
start_htcacheclean || log_end_msg 1
fi
log_end_msg 0
else
log_end_msg 1
fi
;;
Once this sleep command is there the system boots up perfectly. What I'd like to know is why is Apache trying to start up before the network interfaces have come up?
If anyone could help resolve this it would be great, I really dont want to have to sleep that "start" case by 5 seconds just to get this to work.
Thanks
I've just completed a new 10.04.1 LTS 64bit server LAMP install. I've also add a sub interface to eth0 called eth0:1
When I start my server Apache is not starting and I'm seeing this error in my /var/log/boot.log file
fsck from util-linux-ng 2.17.2
fsck from util-linux-ng 2.17.2
/dev/mapper/apoch-root: clean, 91882/4669440 files, 688111/18654208 blocks
/dev/sda1: clean, 211/124496 files, 48619/248832 blocks
* Starting AppArmor profiles ^[[80G
^[[74G[ OK ]
* Starting web server apache2 ^[[80G (99)Cannot assign requested address: make_sock: could not bind to address 203.xxx.xxx.xxx:80
no listening sockets available, shutting down
Unable to open logs
^[[74G[^[[31mfail^[[39;49m]
I've sanitised the log, but essentially it appears that the sub interface was not up before apache tried to use it.
I can confirm that the interface does come up once the boot process is complete.
eth0 Link encap:Ethernet HWaddr 00:14:22:7c:4e:2b
inet addr:203.xxx.xxx.xxx Bcast:203.xxx.xxx.xxx Mask:255.255.255.224
inet6 addr: fe80::214:22ff:fe7c:4e2b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:166 errors:0 dropped:0 overruns:0 frame:0
TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19138 (19.1 KB) TX bytes:20015 (20.0 KB)
Interrupt:16
eth0:1 Link encap:Ethernet HWaddr 00:14:22:7c:4e:2b
inet addr:203.xxx.xxx.xxx Bcast:203.xxx.xxx.xxx Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
As a crude fix I included a "sleep 5" command in the /etc/init.d/apache start up script at the "start" case
case $1 in
start)
log_daemon_msg "Starting web server" "apache2"
sleep 5
if $APACHE2CTL start; then
if check_htcacheclean ; then
log_progress_msg htcacheclean
start_htcacheclean || log_end_msg 1
fi
log_end_msg 0
else
log_end_msg 1
fi
;;
Once this sleep command is there the system boots up perfectly. What I'd like to know is why is Apache trying to start up before the network interfaces have come up?
If anyone could help resolve this it would be great, I really dont want to have to sleep that "start" case by 5 seconds just to get this to work.
Thanks