# [CLOSED] Server cannot ping/see itself. No local loop

## trossachs

Am missing something really simple here!  :Confused:   Just rebuilt the box. Ifconfig shows:

```
eth0      Link encap:Ethernet  HWaddr 00:01:02:19:95:3C

          inet addr:10.22.18.113  Bcast:10.255.255.255  Mask:255.0.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:10342 errors:0 dropped:0 overruns:0 frame:0

          TX packets:8465 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1250422 (1.1 Mb)  TX bytes:2457506 (2.3 Mb)

          Interrupt:12 Base address:0xe800

eth1      Link encap:Ethernet  HWaddr 00:90:27:60:FF:66

          inet addr:10.22.18.108  Bcast:10.22.18.255  Mask:255.0.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:190107 errors:0 dropped:0 overruns:0 frame:0

          TX packets:200241 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:45355804 (43.2 Mb)  TX bytes:51543402 (49.1 Mb)

          Interrupt:10
```

But does not show any local loop. I can see the internet and other machines on the lan, but not internals.Last edited by trossachs on Wed Aug 24, 2005 10:37 am; edited 1 time in total

----------

## masteroftheuniverse

try 

```
/etc/init.d/local start
```

 as root.  local doesn't show up if the local service isn't running.

----------

## trossachs

Thanks for replying back masteroftheuniverse. Was already started at boot up. No change.

----------

## trossachs

This is the result from netstat -r and I have two nics in the box.

netstat -r:

```
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

10.0.0.0        *               255.0.0.0       U         0 0          0 eth0

default         SpeedTouch.cros 0.0.0.0         UG        0 0          0 eth0
```

----------

## trossachs

Sorted it!

```
ifconfig lo up
```

But how do I ensure that this happens when the box boots?

----------

## msalerno

Check the output of rc-update -s

You might just need to: 

rc-update add net.lo boot

----------

## trossachs

net.lo is already installed. I am worried that when the server boots, it will not find the network.

----------

## trossachs

Well I booted the server and some items did not come up. But by inssuing the command:

```
ifconfig lo up
```

Evertything is now fine. net.lo is already part of the boot runlevel, how do I ensure that this starts up when the server boots?

----------

## UberLord

 *JulesF wrote:*   

> Well I booted the server and some items did not come up. But by inssuing the command:

 

If net.lo was one of those items then you're correct.

So which items didn't come up? Gimmie a list!

----------

## trossachs

These were the ones that did not come up as I remember:

```
spamd

webmin

postgrey
```

net.lo was already in the boot list, but this failed to come up. I have to manually issue the command once I had logged in. Any ideas what I should be looking for to put this right?

----------

## UberLord

Could you post the exact output of

/etc/init.d/net.lo restart

Thanks

----------

## trossachs

```
foo usr # /etc/init.d/net.lo restart

 * WARNING:  you are stopping a boot service.

 * Stopping lo

 *   Shutting down lo ...                                                                                 [ ok ]

 * Starting lo

 *   Bringing up lo ...                                                                                   [ ok ]
```

It does show as having started which is the annoying thing. But when I then issued a ifconfig command immediately after the server returned:

```
eth0      Link encap:Ethernet  HWaddr 00:01:02:19:95:3C

          inet addr:10.22.18.113  Bcast:10.255.255.255  Mask:255.0.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:606934 errors:0 dropped:0 overruns:0 frame:0

          TX packets:907581 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:92343717 (88.0 Mb)  TX bytes:390413497 (372.3 Mb)

          Interrupt:12 Base address:0xe800

eth1      Link encap:Ethernet  HWaddr 00:90:27:60:FF:66

          inet addr:10.22.18.105  Bcast:10.22.18.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:173271 errors:0 dropped:0 overruns:0 frame:0

          TX packets:634 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:19092140 (18.2 Mb)  TX bytes:69340 (67.7 Kb)

          Interrupt:10
```

In fact, having just restarted the "lo" service, this brought down net.lo, and gave the result just above. When in fact I had started "lo" manually last night. I have just had to start "lo" again:

```
ifconfig lo up
```

----------

## UberLord

If you're using baselayout-1.12.0 then you're using iproute2 by default if you have it installed.

Try using ifconfig

```
modules=( "ifconfig" )
```

----------

## trossachs

iproute2 is not installed. Should I emerge it before I execute the "modules?"

----------

## UberLord

 *JulesF wrote:*   

> iproute2 is not installed. Should I emerge it before I execute the "modules?"

 

Really? Wow.

Maybe that's the problem then - try emerging iproute2 and then restart net.lo

If that works, I'll see if I can fix for next release.

----------

## trossachs

Installed, restarted. No joy, still the same.  :Shocked: 

----------

## UberLord

Put this in /etc/conf.d/net

```
modules=("iproute2")
```

And report your baselayout version

----------

## trossachs

Baselayout:

```
1.12.0_pre3-r2
```

Restarted lo with added .net line. No change.

----------

## UberLord

Please post the following files - (remove comments) if you have them installed. You can do this like so

```
grep '^[ \t]*[^#]' /etc/conf.d/{net,net.lo,net.default}
```

----------

## trossachs

```
/etc/conf.d/net:modules=("iproute2")

/etc/conf.d/net:iface_eth0="dhcp"

/etc/conf.d/net:iface_eth1="10.22.18.104 broadcast 10.22.18.255 netmask 255.255.255.0"

grep: /etc/conf.d/net.lo: No such file or directory

grep: /etc/conf.d/net.default: No such file or directory
```

Last edited by trossachs on Tue Aug 09, 2005 11:40 am; edited 2 times in total

----------

## UberLord

For gods sake, use a recent syntax.

```
config_eth0=( "dhcp" )

config_eth1=( "10.x.x.x broadcast 10.x.x.255 netmask 255.255.255.0" )
```

And is there any point in hiding the IP of your private network?

Here's mine 192.168.0.51/24 - hack me!

Back to the lo probem - what kernel version are you running?

----------

## trossachs

 *UberLord wrote:*   

> For gods sake, use a recent syntax.
> 
> ```
> config_eth0=( "dhcp" )
> 
> ...

 

----------

## trossachs

No need to shout, we all fall into bad habits! Look at you and your flying underpants. Nobody is screaming at those...  :Mad: 

```
Linux version 2.6.12-gentoo-r6
```

----------

## UberLord

I'm starting to run out of ideas here.

Add RC_VERBOSE="yes" to /etc/conf.d/net

Then post the output of /etc/init.d/net.lo restart again please

----------

## trossachs

No change. UL, do we know where the fault lies? It just seems so simple, but all results come back to say that the service is up when clearly it is not.

```
mwf_03sx140 ~ # /etc/init.d/net.lo restart

 * Caching service dependencies ...

 *  Service 'metalog' already provided by 'logger'!;

 *  Not adding service 'syslog-ng'...                                                                                    [ ok ]

 * WARNING:  you are stopping a boot service.

 * Stopping lo

 *   Shutting down lo ...                                                                                                [ ok ]

 * Starting lo

 *   Bringing up lo ...                                                                                                  [ ok ]
```

----------

## UberLord

```
grep loopback /etc/init.d/net.lo
```

If that output's "interface_loopback_create" then you need to update net.lo via etc-update (you may need to re-emerge baselayout)

----------

## trossachs

Output:

```
interface_loopback_create
```

As you can see form below, I have the previous version of BL installed:

```
*  sys-apps/baselayout

      Latest version available: 1.11.13

      Latest version installed: 1.12.0_pre3-r2

      Size of downloaded files: 152 kB

      Homepage:    http://www.gentoo.org/

      Description: Filesystem baselayout and init scripts

      License:     GPL-2
```

To go up to v1.11.13 is a risk, given that this contributed to the broken server last time around.

----------

## UberLord

 *JulesF wrote:*   

> 
> 
> As you can see form below, I have the previous version of BL installed:
> 
> ```
> ...

 

Actually, you have pre3-r2 installed - which isn't even in portage anymore.

What's more, you are actually using a net.lo file from 1.11.x which means that the loopback will not be created as we changed how it was in 1.12.

You know, when the baselayout says "Ensure all files are updated by etc-update otherwise things will break" we are not joking.

From what you have just said, you didn't and lo and behold things have broken.

----------

## trossachs

I would agree with you UberLord that I have pre3-r2 installed, but this was on your recommendation when we spoke in the IRC chat room. My server has only just come back from the dead and I would rather it was kept that way. I must confess that I do not use etc-update that often because whenever things get updated, I prefer leaving config files as they are. However, in light of what has happened clearly it is not just the "main" apps that have config files which point links to new destinations and thus this is the trouble we have here.

But is it really safe for me to go ahead and emerge 1.11.13 so long as I update net.lo which would point to the new link UberLord? I need advice here. You know the probs I had before; I cannot go thru it again or I will have no business. Literally.

----------

## UberLord

 *JulesF wrote:*   

> I would agree with you UberLord that I have pre3-r2 installed, but this was on your recommendation when we spoke in the IRC chat room.

 

Yes, and that was to solve a specifc problem with the old dead server - I didn't expect you to re-install it on a new server

 *Quote:*   

> My server has only just come back from the dead and I would rather it was kept that way. I must confess that I do not use etc-update that often because whenever things get updated, I prefer leaving config files as they are.

 

Files in /etc/init.d are not config files. It's people like you that make me want to move the entire code out of net.lo and into a non config protected area so I can slap a very large comment

##########################################################

#

# CODE AND LOGIC MOVED TO /LIB/FOO/BAR BECAUSE PEOPLE DO NOT ETC-UPATE

# WHEN EXPLICTLY TOLD TO AND STILL BITCH ABOUT THINGS BREAKING

#

##########################################################

Sorry if you think that's harsh.

It's not going to happen though, as other files in /etc/init.d definitely need to be updated (checkroot, localmount, etc etc)

So lo or a network interface not working is say preferable to not being about to boot at all due to localmount not being updated.

 *Quote:*   

> But is it really safe for me to go ahead and emerge 1.11.13 so long as I update net.lo which would point to the new link UberLord? I need advice here. You know the probs I had before; I cannot go thru it again or I will have no business. Literally.

 

If it's only net.lo that isn't working, then I suggest that you extract it from the baselayout tarball in /usr/portage/distfiles and put it in /etc/init.d

----------

## trossachs

No it's not harsh. Msalerno gave me a good slap recently  :Embarassed: . The net.lo issue is resolved and I will etc-update at the next maintenance cycle which will be month end September.

----------

