# SIOCADDRT: File exists

## Jamon

Hello!!  This is probably the most frustrating error I have seen yet, so bear with me.  I recently did an etc-update (LONG overdue) and I have a reeeaaallllly annoying startup error.  For the longest time, I have set my eth0 (3c905c NIC) as a static IP, with default route to my Linux internet gateway.  Everything worked just fine, until this recent update.  When it boots up, and default runlevel starts, I get this:

* Bringing eth0 up...    [ ok ]

*     Setting default gateway...

SIOCADDRT: File exists

* Failed to bring eth0 up   [ !! ]

and then several of my typical startup services proceed to fail starting up as they depend on "net" being started.  The thing that makes this even more strange is that when I go to a root console, (whether in X or not doesn't matter), and I type:

# /etc/init.d/net.eth0 start

or it's equivalent /etc/runlevels/default/net.eth0, as they are symlinks, everything starts just fine!!!  Like this:

* Bringing eth0 up...   [ ok ]

*   Setting default gateway...  [ ok ]

This is highly frustrating, which is exacerbated by the fact that I start KDM (with an auto-login KDE session full of lovely internet applications  :Wink:  ).  

Anyone have any ideas?  I would really appreciate it!  Thanks!!

    Jamon

----------

## mikki

Well, I just found this exact problem, although even after starting eth0, it doesn't work (no errors, just failed tx/rx). Sucks seeing as this was a caching server....

It started after an emerge that included the new baselayout, but that might be a red herring.

If you figure it out, let me know! I'll do the same...

----------

## bi3l

I had exactly the same problem.

"SIOCADDRT: File exists" means that the defaults gateway has already been set.

I removed net.eth0 (along with all netword dependant scripts) from the boot sequence to check what was happening and I discovered that eth0 was up and the gateway set without executing /etc/init.d/net.eth0 start.

So, I simply put back network dependant scripts, reboot, and everything was ok.

I do not understand exactly where and when the network is configured but there is no need to execute /etc/init.d/net.eth0 start.

So, just try:

rc-update del net.eth0 default

and check if it's ok for you.

----------

## slapcat

Same problem here. I've been unable to find whatever is setting the default gateway. It doesn't seem to be done using the 'route' command because I replaced 'route' with a script that just prints out diagnostic info and the gateway is still getting set.

It's working right now by leaving net.etho out of the default runlevel but it is still bugging me that I can't track this down.   :Confused: 

----------

## rac

Is it possible that a replacement /etc/init.d/net.eth0 (like /etc/init.d/._cfg????_net.eth0) or an editor backup file is sticking around, so you have effectively two largely identical files trying to start eth0?

----------

## mikki

It seems like /etc/init.d/net.eth0 is now obsolete?

Even once booted, /etc/init.d/eth0 status says "not running"...

So, anyone know who is starting the network and where? Does it matter?

And my card is still not working. I'm going to try a hardware swap, because I'm sick of the st00pid pos anyway...

----------

## mikki

Interesting. I renamed net.eth0 to net.eth0.sav, and the network is now not up. Someone is secretly calling it somewhere. A service dependency somewhere? If so, why is it silent?

Hmmm....

----------

## rac

Could people please note which versions of baselayout they are using when convenient?

----------

## mikki

1.8.6.2

----------

## nealbirch

same problem, after upgrading baselayout (1.8.6.2)

I come up in init 3,  it says default gateway  file exists. 

I do:

# init 1

and then

# init 3

and it works as it should.

Now, if I boot in at init 1, and then go to init 3, I still get the error, I need to drop back to init 1 then init 3.

It's a linksys (tulip) nic, and yes, the module is loaded in modules.autoload. 

What's wierd is that it works the 2nd and subsequent times, but not the first.

----------

## DFB

Exact same problem here, "rc-update del net.eth0" fixes the problem.  This is with baselayout-1.8.6.2 (just updated)

etc-update lists no updates pending, and /etc and all its subdirs are empty of ._cfg files.

----------

## slapcat

my baselayout is version 1.8.6.2

----------

## Nudge

I am having the same problem and my base layout is also 1.8.6.2.

----------

## pjp

1.8.6.2 has a bug report.  This problem doesn't appear to be mentioned, so it might be worth having one person add some comments.

----------

## RJG

I have the same issue, and have added it to the above mentioned bug .

----------

## buckminst

I also had that problem, so as soon as my system was up, I did like a few before me, and did a manual /etc/init.d/net.eth0 start, and up it came. then rebooted, and it's been fine ever since. Dunno what's going on with it.

Also had some trouble with modules not loading, or modprobe trying to insmod REALLY WEIRD THINGS, like /dev/gpmctl @_@ The reboot fixed that as well.

UPDATE:

The reboot only fixes it for that session. If I cold-boot my machine, the errors are there again, but if I immediately warm-boot right afterward, the errors go away and things load properly. WTF? @_@

----------

## Zalator

I have the exact same problem, using baselayout 1.8.6.2

EDIT: Additionally, when booting, the init scripts scream at me for the most random /dev entries which obviously dont exist. I think that baselayout 1.8.6.2 is br0ked, i am going to try to downgrade.

----------

## nealbirch

for some reason "rc-update del net.eth0 default" works. it makes no sense. I figure it has to be loading the ... thing somewhere or somehow, but  where and how I can't see. I load init 1, and do ifconfig, no eth0, init 3 and it's there. The wierdest thing is that if I don't load the tulip module, nothing complains, apache loads, everything loads.... go figure.

Anyway, "rc-update del net.ethx default" fixes it. the question is how.

----------

## buckminst

I'd say it's quite official that baselayout 1.8.6.2 is b0rked beyond all belief. An emerge rsync && emerge -up world today reveals that they are downgrading systems from 1.8.6.2 to 1.8.5.8. Hopefully they'll figure out what's causing this major flakage.

Nothing that I can see, would be loading the network module... so WHERE is eth0 being configured from?

----------

## pjp

According to the bugreport, 1.8.6.2 wasn't supposed to be unmasked.

----------

