0

I got an issue on my debian 7 / apache 2.2

I can't ifdown my interface eth0 (server timeout, i need to reboot it)

When i do strace i see a SIGCHILD :

strace -e open ifdown eth0
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY) = 3
open("/etc/network/interfaces", O_RDONLY) = 3
open("/run/network/ifstate", O_RDWR|O_CREAT|O_APPEND, 0666) = 3
open("/run/network/ifstate", O_RDWR|O_CREAT|O_APPEND, 0666) = 3
open("/run/network/.ifstate.tmp", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
open("/run/network/ifdown-eth0.pid", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
open("/run/network/ifup-eth0.pid", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGCHLD (Child exited) @ 0 (0) ---

My ifconfig :

eth0      Link encap:Ethernet  HWaddr 02:00:97:50:85:77  
      inet adr:151.80.133.119  Bcast:151.80.133.255  Masque:255.255.255.0
      adr inet6: fe80::97ff:fe50:8577/64 Scope:Lien
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:7887 errors:0 dropped:0 overruns:0 frame:0
      TX packets:3127 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 lg file transmission:1000 
      RX bytes:682530 (666.5 KiB)  TX bytes:260205 (254.1 KiB)

eth0:0    Link encap:Ethernet  HWaddr 02:00:97:50:85:77  
      inet adr:37.187.234.165  Bcast:37.187.234.165  Masque:255.255.255.255
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:1    Link encap:Ethernet  HWaddr 02:00:97:50:85:77  
      inet adr:37.187.234.166  Bcast:37.187.234.166  Masque:255.255.255.255
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Boucle locale  
      inet adr:127.0.0.1  Masque:255.0.0.0
      adr inet6: ::1/128 Scope:Hôte
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:6 errors:0 dropped:0 overruns:0 frame:0
      TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 lg file transmission:0 
      RX bytes:300 (300.0 B)  TX bytes:300 (300.0 B)

My etc/network/interfaces file :

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
    address 151.80.133.119
    netmask 255.255.255.0
    gateway 151.80.133.254
post-up /sbin/ifconfig eth0:0 37.187.234.165 netmask 255.255.255.255 broadcast 37.187.234.165
post-down /sbin/ifconfig eth0:0 down

I got another strange issue when i reboot the server, i always have :

(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.

So i need to to a : netstat -ltnp | grep ':80' and kill the process.

I think these issues are related... but i don't know what do to.

Anyone has an idea ? Thanks

  • regarding Apache HTTPD, make sure Listen directives are not defined more than once for the same ip:port combo. – ezra-s Feb 20 '17 at 17:30
1

I can't ifdown my interface eth0 (server timeout, i need to reboot it)

Taking an interface down will disable it entirely, including any child interfaces (like eth0:0 and eth0:1 on your server) -- just as if you'd pulled the network cable out of the machine. ifdown is doing its job correctly, but you aren't getting to see it finish, because the server has no way of communicating with you anymore!

Don't run ifdown on an interface that you're using to connect to a machine.

0

When you run netstat -ltnp | grep ':80' it should show what process is running on that port. Find out what that process is, then get rid of what is initializing it on boot.

Or within Apache, do you have multiple listen directives configured to bond to the same port? grep Listen /etc/apache2/ports.conf -- there should be only one port 80 listed.

0

This is just a guess, but you may be trying to run nginx as well as apache. I suspect nginx because I see two virtual ports and IPs on the eth0. Additionally, the error you get about already used ports 80 points to that too.

Disable or uninstall one of them if that is the case.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.