SIOCADDRT: File exists - Failed to bring up eth0.

New to Debian (Or Linux in general)? Ask your questions here!

SIOCADDRT: File exists - Failed to bring up eth0.

Postby MilloDk » 2010-07-06 23:48

Hi there.

I have a huge problem.
I have a rented server where I hosts some websites and a few IRC BNCs.
Today, I was installing flash for Iceweasel (needed it for a site I was using) and my server crashed.
A few minutes later, it booted up but the network didn't work properly.
When I do /etc/init.d/networking start, it gives me this error:

Configuring network interfaces...SIOCADDRT: File exists
Failed to bring up eth0.
done.

My /etc/network/interfaces looks like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address xx.xx.xxx.xxx
netmask 255.255.255.0
network 91.121.114.0
broadcast 91.121.xxx.xxx
gateway 91.121.xxx.xxx

Does anybody know how to fix this? I've been trying for 8 hours, google'ing and trying shit and NOTHING works for me :/
Reinstalling isn't a solution, cause there's files there I need and since it's located in France, I can't remove the HD from the server.

I really hope someone can help me here

Thanks in advance

MilloDk
MilloDk
 
Posts: 5
Joined: 2010-07-06 23:43

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby smallchange » 2010-07-07 00:18

Since you are accessing the server over the network and it only shows one network interface, how can you access it if the network is not up? What are the symptoms that make you say the network is not working? Do you see eth0 in the output of ifconfig? Does it have an IP address?

Might it be that what is not working is the web server?
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby aspnair » 2010-07-07 02:30

Normally when the system boots up, it tries to bring the network.
Then you have to stop and start (or restart) the networking, but you are only trying to start it.

If you are having problem still, try the following and post the output specified.
/etc/init.dnetworking stop
rmmod <which ever kernel module of the nework card>
dmesg -c (clear the current kernel log)
modproble <same kernel module of the network card>
/etc/init.d/networking start
dmesg (post the output of the kernel messages)
ifconfig eth0 (post the output of interface eth0)
route -n (post the output of routing table)
Compressed Air Energy Storage, Entropy and Efficiency
http://saurorja.org/2012/06/18/compress ... fficiency/
User avatar
aspnair
 
Posts: 1247
Joined: 2009-06-18 12:27
Location: Twitter: @anand_sivaram

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby bluesdog » 2010-07-07 03:46

See if this helps
User avatar
bluesdog
 
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby MilloDk » 2010-07-07 11:40

smallchange wrote:Since you are accessing the server over the network and it only shows one network interface, how can you access it if the network is not up? What are the symptoms that make you say the network is not working? Do you see eth0 in the output of ifconfig? Does it have an IP address?

Might it be that what is not working is the web server?


It's a rented server from OVH - they have some sort of rescue system, so I can connect to a rescue server, mount my filesystem and change root to my filesystem to check for errors and such. That's all they allow me - I can't even run ifconfig - it gives me this:

rescue:~# ifconfig eth0
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
Segmentation fault

route -n gives me this:

rescue:~# route -n
/proc/net/route: No such file or directory
INET (IPv4) not configured in this system.

:/

The thing they're talking about on Voodish doesn't work either - I don't have that /etc/sysconfig folder :/
MilloDk
 
Posts: 5
Joined: 2010-07-06 23:43

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby smallchange » 2010-07-07 12:42

MilloDk wrote:
smallchange wrote:Since you are accessing the server over the network and it only shows one network interface, how can you access it if the network is not up? What are the symptoms that make you say the network is not working? Do you see eth0 in the output of ifconfig? Does it have an IP address?

Might it be that what is not working is the web server?


It's a rented server from OVH - they have some sort of rescue system, so I can connect to a rescue server, mount my filesystem and change root to my filesystem to check for errors and such. That's all they allow me - I can't even run ifconfig - it gives me this:

rescue:~# ifconfig eth0
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
Segmentation fault

route -n gives me this:

rescue:~# route -n
/proc/net/route: No such file or directory
INET (IPv4) not configured in this system.

:/

The thing they're talking about on Voodish doesn't work either - I don't have that /etc/sysconfig folder :/


The thing from Voodish is for a Redhat based system. The problem with chroot and then no /proc means that you need to mount /dev inside the chroot. You can try
mount -o bind /proc /chroot/proc
where /chroot is the absolute path to the chroot jail. Then chroot and try ifconfig again. Something other than installing Flash seems to have happened. Was libc6 and/or other things installed at the same time? Did the upgrade not complete? After you get /proc/mounted you might need to run
dpkg --configure -a
to finish any partially installed packages.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby MilloDk » 2010-07-07 16:53

All right, I mounted proc with this: mount -o bind /proc /mnt/proc (/mnt/ is my server hd)

ifconfig eth0 gives me this:

rescue:/# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:19:D1:AB:16:58
inet addr:91.121.xxx.xxx Bcast:91.121.114.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9740107 errors:0 dropped:0 overruns:0 frame:0
TX packets:18267698 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:780295030 (744.1 MiB) TX bytes:1638713099 (1.5 GiB)
Interrupt:29

route -n gives me this:

rescue:/# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
91.121.114.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 91.121.114.254 0.0.0.0 UG 0 0 0 eth0

and dmesg gives me this:

rescue:/# dmesg
ifconfig[3775]: segfault at 8 ip b775cf40 sp bffe4cc4 error 4 in libc-2.3.6.so[b76f2000+127000]
MilloDk
 
Posts: 5
Joined: 2010-07-06 23:43

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby smallchange » 2010-07-07 17:03

So your network is up. Can you ping outside computers, by name or address? eg.
Code: Select all
ping -c 3 yahoo.com
and
Code: Select all
ping -c 3 209.191.122.70


If so your network is allowing you access to the internet. If not try
Code: Select all
ping -c 3 91.121.114.254
to see if you can reach the gateway.

Edit: Additional test. Can you
Code: Select all
ping -c 3 <the address for eth0 in ifconfig>
from your current location? If so the network is accessible from the internet.
Last edited by smallchange on 2010-07-07 17:12, edited 1 time in total.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby MilloDk » 2010-07-07 17:12

rescue:~/Desktop# ping -c 3 91.121.114.254
PING 91.121.114.254 (91.121.114.254) 56(84) bytes of data.
64 bytes from 91.121.114.254: icmp_seq=1 ttl=255 time=0.626 ms
64 bytes from 91.121.114.254: icmp_seq=2 ttl=255 time=0.897 ms
64 bytes from 91.121.114.254: icmp_seq=3 ttl=255 time=0.967 ms

--- 91.121.114.254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.626/0.830/0.967/0.147 ms

I've been able to do this all the time, but when I reboot the server, it just re-reboots into rescue mode - that's what I don't get :s

rescue:~/Desktop# ping -c 3 yahoo.com
PING yahoo.com (209.191.122.70) 56(84) bytes of data.
64 bytes from ir1.fp.vip.mud.yahoo.com (209.191.122.70): icmp_seq=1 ttl=54 time=132 ms
64 bytes from ir1.fp.vip.mud.yahoo.com (209.191.122.70): icmp_seq=2 ttl=54 time=133 ms
64 bytes from ir1.fp.vip.mud.yahoo.com (209.191.122.70): icmp_seq=3 ttl=54 time=133 ms

--- yahoo.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 132.621/133.067/133.380/0.531 ms


works too
MilloDk
 
Posts: 5
Joined: 2010-07-06 23:43

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby smallchange » 2010-07-07 17:14

How do you know it is booting into rescue mode?
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby MilloDk » 2010-07-07 17:20

Cause I'm not able to reach it by it's usual ports for irc bnc + I'm getting a new password for the rescue root user everytime on mail.
MilloDk
 
Posts: 5
Joined: 2010-07-06 23:43

Re: SIOCADDRT: File exists - Failed to bring up eth0.

Postby smallchange » 2010-07-07 17:47

I am not real familiar with whatever hosting system they are using but my experience with Debian is that when it fails to boot entirely it is almost always because it tries to run fsck at boot and ends up needing it to be run by the user to fix corruption with the filesystem. It then goes into rescue mode and asks for the root password to allow you to run fsck manually and fix it. I expect that this is what is happening and then their system is sending you a new rescue password to allow you to login and run fsck. If this is true the root file system should be mounted read-only and you will be able to run something like
Code: Select all
fsck.ext3 /dev/sda
/etc/fstab should contain enough info for you to know which file system type and partition to use.

You need to look closely at /var/log/syslog and /var/log/messages to see if you can see what is happening.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 19 guests

fashionable