# RTNETLINK, lo errors. [solved]

## poly_poly-man

EDIT: changed title to reflect current issue - scroll to the bottom.

Recently, I've been trying to set up a new gentoo server for my network. However, it is working just fine so far. DHCP and DNS servers cranking away, etc.

Just now, I was trying to get NFS set up (so that I can have /usr/portage the same between the two (and possibly future, more), and I noticed some sort of weird error on my desktop - not related to the new DHCP, DNS, or NFS services.

Starting since I downgraded my kernel from 2.6.24 to 2.6.21 (gentoo-sources), I've noticed that samba has started taking a loooong time to start up (on my desktop, now). Also, /etc/init.d/net.eth0 start takes maybe a little bit more time than normal (not by much, it might just be me trying to see it), but gives several "RTNETLINK answers: Invalid argument" errors. It does work fine, however.

Now, normally this wouldn't be an issue, except that I'm trying to get NFS to work, and it's giving me problems with rpc.statd, and I think it may be related.

relevant .config:

```
# Networking options

#

# CONFIG_NETDEBUG is not set

CONFIG_PACKET=y

# CONFIG_PACKET_MMAP is not set

CONFIG_UNIX=y

# CONFIG_NET_KEY is not set

CONFIG_INET=y

CONFIG_IP_MULTICAST=y

# CONFIG_IP_ADVANCED_ROUTER is not set

CONFIG_IP_FIB_HASH=y

CONFIG_IP_PNP=y

CONFIG_IP_PNP_DHCP=y

# CONFIG_IP_PNP_BOOTP is not set

# CONFIG_IP_PNP_RARP is not set

# CONFIG_NET_IPIP is not set

# CONFIG_NET_IPGRE is not set

# CONFIG_IP_MROUTE is not set

# CONFIG_ARPD is not set

# CONFIG_SYN_COOKIES is not set

# CONFIG_INET_AH is not set

# CONFIG_INET_ESP is not set

# CONFIG_INET_IPCOMP is not set

# CONFIG_INET_XFRM_TUNNEL is not set

CONFIG_INET_TUNNEL=y

# CONFIG_INET_XFRM_MODE_TRANSPORT is not set

# CONFIG_INET_XFRM_MODE_TUNNEL is not set

# CONFIG_INET_XFRM_MODE_BEET is not set

CONFIG_INET_DIAG=y

CONFIG_INET_TCP_DIAG=y

# CONFIG_TCP_CONG_ADVANCED is not set

CONFIG_TCP_CONG_CUBIC=y

CONFIG_DEFAULT_TCP_CONG="cubic"

# CONFIG_TCP_MD5SIG is not set

CONFIG_IPV6=y

# CONFIG_IPV6_PRIVACY is not set

# CONFIG_IPV6_ROUTER_PREF is not set

# CONFIG_INET6_AH is not set

# CONFIG_INET6_ESP is not set

# CONFIG_INET6_IPCOMP is not set

# CONFIG_IPV6_MIP6 is not set

# CONFIG_INET6_XFRM_TUNNEL is not set

# CONFIG_INET6_TUNNEL is not set

# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set

# CONFIG_INET6_XFRM_MODE_TUNNEL is not set

# CONFIG_INET6_XFRM_MODE_BEET is not set

# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set

CONFIG_IPV6_SIT=y

# CONFIG_IPV6_TUNNEL is not set

# CONFIG_IPV6_MULTIPLE_TABLES is not set

# CONFIG_NETWORK_SECMARK is not set

# CONFIG_NETFILTER is not set

#

# DCCP Configuration (EXPERIMENTAL)

#

# CONFIG_IP_DCCP is not set

#

# SCTP Configuration (EXPERIMENTAL)

#

# CONFIG_IP_SCTP is not set

#

# TIPC Configuration (EXPERIMENTAL)

#

# CONFIG_TIPC is not set

# CONFIG_ATM is not set

# CONFIG_BRIDGE is not set

# CONFIG_VLAN_8021Q is not set

# CONFIG_DECNET is not set

# CONFIG_LLC2 is not set

# CONFIG_IPX is not set

# CONFIG_ATALK is not set

# CONFIG_X25 is not set

# CONFIG_LAPB is not set

# CONFIG_ECONET is not set

# CONFIG_WAN_ROUTER is not set

#

# QoS and/or fair queueing

#

# CONFIG_NET_SCHED is not set

#

# Network testing

#

# CONFIG_NET_PKTGEN is not set

# CONFIG_NET_TCPPROBE is not set

# CONFIG_HAMRADIO is not set

# CONFIG_IRDA is not set

# CONFIG_BT is not set

# CONFIG_IEEE80211 is not set

```

What's causing this, is it related to the fact that rpc.statd hangs indefinitely when trying to start, and how do I fix it?

thanks,

poly-p man

----------

## poly_poly-man

More issues discovered..  :Sad: 

Apparently, the reason why samba is taking so long to come up is because 127.0.0.1 is literally broken. Trying to ping localhost(which maps to 127.0.0.1) or 127.0.0.1 itself doesn't work - it doesn't answer any of the pings. Logs show that samba can't reach localhost:631 (to get the printer to share)

```
Mar 24 10:54:03 penguin smbd[5539]:   Unable to connect to CUPS server localhost:631 - Network is unreachable
```

Also, I can see that sshd isn't working either: 

```
Mar 24 10:57:14 penguin sshd[7074]: Server listening on 0.0.0.0 port 22.

Mar 24 10:57:14 penguin sshd[7074]: error: Bind to port 22 on :: failed: Address already in use.
```

I started /etc/init.d/net.lo (again, with a few RTNETLINK... messages, and ifconfig doesn't show it, but ifconfig -a shows it, and ifconfig up lo moves it into regular ifconfig, at which point a ping to 127.0.0.1 is successful. (but still, eth0 has the same messages when restarting, for example).

 :Shocked: 

What's going on, and how do I fix it?

poly-p man

----------

## poly_poly-man

Okay, so I just got NFS to work - it requires that lo be actually up... but how do I make sure it comes up?

```
 * Starting lo

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

 *   Bringing up lo

 *     127.0.0.1/8

RTNETLINK answers: Invalid argument                                       [ ok ]

RTNETLINK answers: Invalid argument

 *   Adding routes

 *     127.0.0.0/8 ...    
```

That happens, however I still need to ifconfig lo up to get the interface to work. Before that:

```
lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          LOOPBACK  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:3771 (3.6 Kb)  TX bytes:3771 (3.6 Kb)

```

How do I get lo actually up?

poly-p man

----------

## to+

Perhaps a module-init-tools problem. It worked here after upgrading sys-apps/module-init-tools from 3.4 to 3.4-r1

----------

## poly_poly-man

 *to+ wrote:*   

> Perhaps a module-init-tools problem. It worked here after upgrading sys-apps/module-init-tools from 3.4 to 3.4-r1

 

hmmm... I seem to already have that version  :Sad: 

It's alright, I got by with this quick fix: 

```
start() {

        declare -r IFACE="${SVCNAME#*.}"

        einfo "Starting ${IFACE}"

        if [ "${IFACE}" = "lo" ]

        then

                /sbin/ifconfig lo 127.0.0.1 up

        else

                run "${IFACE}" start

        fi

}

stop() {

        declare -r IFACE="${SVCNAME#*.}"

        einfo "Stopping ${IFACE}"

        if [ "${IFACE}" = "lo" ]

        then

                /sbin/ifconfig lo down

        else

                run "${IFACE}" stop

        fi

}

```

Get's the job done, and now I even have a working NFS portage...

I still feel sooo dirty.... there must be a better way.

poly-p man

----------

## UberLord

Sounds like a problem with your iproute2 install, or iproute2 talking to your kernel.

----------

## poly_poly-man

 *UberLord wrote:*   

> Sounds like a problem with your iproute2 install, or iproute2 talking to your kernel.

 

Wait a minute - so you're saying that version 2.6.23.20071016 won't work with kernel 2.6.21.something?  :Embarassed: 

*facepalm*

As soon as this other compile is done, I'll fix that...

Thanks for catching that,

poly-p man

----------

## poly_poly-man

Solved, thanks: no more errors.

I'm stil going to leave the lo hack in there - too much work to remove.

thanks,

poly-p man

----------

