# Network is not starting [SOLVED]

## vark

I had today the bad surprise the see the next error when my system boots, and is about starting the netowrk services:

Starting eth0

No usable addresses families found

socket: no such file or directory

*eth0 does not exist

Could someone give me an advice?Last edited by vark on Tue Jul 25, 2006 5:38 pm; edited 1 time in total

----------

## mamac

Hello,

First read https://forums.gentoo.org/viewtopic-p-2990710.html

----------

## vark

thank you for the information but the problem is that my NIC driver is compiled as built-in not as a module. and a funny thing is that, when i run dhcpcd eth0 i have internet connection. but i can't restart the network interface because it says:

varky init.d # /etc/init.d/net.eth0 restart

 * Starting eth0

No usable address families found.

socket: No such file or directory

No usable address families found.

socket: No such file or directory

 *   Bringing up eth0

 *     dhcp

No usable address families found.

socket: No such file or directory

 *       eth0 does not exist

No usable address families found.

socket: No such file or directory

Another advice?

----------

## mamac

Do you have /etc/init.d/net.eth0 ?

----------

## vark

yes, of course i have it.

----------

## mamac

Is /etc/init.d/net.eth0 linked to /etc/init.d/net.lo?

What do you have in /etc/conf.d/net?

Did this problem occure after doing any change on your computer?

----------

## vark

how can i see if it is linked?

----------

## mamac

```
ls -l /etc/init.d/net*
```

----------

## vark

yes, it is linked

varky adrian # ls -l /etc/init.d/net*

lrwxrwxrwx 1 root root     6 Jun 27 23:06 /etc/init.d/net.eth0 -> net.lo

lrwxrwxrwx 1 root root     8 Mar 18 21:30 /etc/init.d/net.eth1 -> net.eth0

-rwxr-xr-x 1 root root 24324 Jun 27 23:06 /etc/init.d/net.lo

-rwxr-xr-x 1 root root  3046 Jun 27 23:06 /etc/init.d/netmount

----------

## mamac

What do you have in /etc/conf.d/net?

Did this problem occure after doing any change on your computer?

----------

## vark

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth0=( "dhcp" )

#dhcp_eth0="nodns nontp nonis"

config_eth1=( "10.0.0.2 netmask 255.255.255.0 brd 10.0.0.255" )

I didn't made any modification in my system.

----------

## mamac

Maybe try

```

emerge -e dhcpcd

```

----------

## vark

nope, the same thing is happening

----------

## mamac

Did you read this : http://www.linuxforums.org/forum/linux-networking/54961-eth0-does-not-exist-gentoo.html

What is the output of: 

```
lspci
```

What is the output of 

```
dmesg |grep eth0
```

----------

## vark

varky boot # lspci

00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333]

00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP]

00:09.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 30)

00:0a.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 30)

00:0b.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)

00:0b.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)

00:0c.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)

00:11.0 ISA bridge: VIA Technologies, Inc. VT8233 PCI to ISA Bridge

00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

00:11.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1b)

00:11.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1b)

00:11.4 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1b)

00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 30)

01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev b2)

varky boot # dmesg |grep eth0

eth0:  setting full-duplex.

eth0:  setting full-duplex is shown only if i run firstly dhcpcd eth0. if not, there is no output.

----------

## mamac

What is the output of 

```
rc-update -s|grep net
```

----------

## vark

# rc-update -s|grep net

               local |      default nonetwork

         net.eth0 |     default

              net.lo |     default

          net.eth1|     default

----------

## mamac

Here is what I have:

```

genbox jean-marc # rc-update -s|grep net

               local |      default nonetwork

            net.eth0 |      default

              net.lo | boot

            netmount |      default

```

Try to change net.lo to boot

----------

## vark

i did what you said and I added netmount too. but no result. could be something related to sysctl?

----------

## vark

maybe there could be a problem with network init scripts. how can i rebuild them?

----------

## mamac

Please read https://forums.gentoo.org/viewtopic-t-481593-highlight-eth0+exist.html

I guess you should emerge -e baselayout

----------

## vark

it's not working, too. it says clearly that i don't have an eth0 and eth1. don't know where the hell are them  :Rolling Eyes: 

----------

## mamac

That's weird...you did nothing on your system and suddenly the network doesn't work anymore...I don't have any other clue for the moment...

----------

## vark

maybe this can help:

varky adrian # cat /proc/net/protocols

protocol  size sockets  memory press maxhdr  slab module     cl co di ac io in de sh ss gs se re sp bi br ha uh gp em

PACKET     340     -1      -1   NI       0   no   kernel      n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n

UNIX       344     -1      -1   NI       0   yes  kernel      n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n

RAW        436     -1      -1   NI       0   yes  kernel      y  y  y  n  y  y  n  n  y  y  y  y  n  y  y  y  y  n  n

UDP        444     -1      -1   NI       0   yes  kernel      y  y  y  n  y  n  y  n  y  y  y  y  y  n  y  y  y  y  n

TCP       1020     40      20   no     208   yes  kernel      y  y  y  y  y  y  y  y  y  y  y  y  n  n  y  y  y  y  y

NETLINK    344     -1      -1   NI       0   no   kernel      n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n  n

----------

## mamac

I though about these files but I can't see any useful info here...

----------

## mamac

Do you have something in /var/log ?

What does the system say when you try

```

ifconfig eth0 up

```

----------

## vark

same response:

# ifconfig eth0 up

No usable address families found.

socket: No such file or directory

someone told me to use this command:

# strace -f ifconfig eth0

execve("/sbin/ifconfig", ["ifconfig", "eth0"], [/* 61 vars */]) = 0

uname({sys="Linux", node="varky", ...}) = 0

brk(0)                                  = 0x8057000

access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)

open("/etc/ld.so.cache", O_RDONLY)      = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=90931, ...}) = 0

mmap2(NULL, 90931, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fbf000

close(3)                                = 0

open("/lib/libc.so.6", O_RDONLY)        = 3

read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\200"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=1209816, ...}) = 0

mmap2(0x49cc3000, 1146076, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x49cc30

00

madvise(0x49cc3000, 1146076, MADV_SEQUENTIAL|0x1) = 0

mmap2(0x49dd5000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11

2) = 0x49dd5000

mmap2(0x49dd9000, 7388, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =

 0x49dd9000

close(3)                                = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fbe000

mprotect(0x49dd5000, 4096, PROT_READ)   = 0

mprotect(0x494a2000, 4096, PROT_READ)   = 0

set_thread_area({entry_number:-1 -> 6, base_addr:0xb7fbea90, limit:1048575, seg_32bit:1, co

ntents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0

munmap(0xb7fbf000, 90931)               = 0

open("/dev/urandom", O_RDONLY)          = 3

read(3, "\255\361\247\210", 4)          = 4

close(3)                                = 0

brk(0)                                  = 0x8057000

brk(0x8078000)                          = 0x8078000

uname({sys="Linux", node="varky", ...}) = 0

access("/proc/net", R_OK)               = 0

access("/proc/net/unix", R_OK)          = 0

socket(PF_FILE, SOCK_DGRAM, 0)          = 3

socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4

access("/proc/net/if_inet6", R_OK)      = -1 ENOENT (No such file or directory)

access("/proc/net/ax25", R_OK)          = -1 ENOENT (No such file or directory)

access("/proc/net/rose", R_OK)          = -1 ENOENT (No such file or directory)

access("/proc/net/ipx", R_OK)           = -1 ENOENT (No such file or directory)

access("/proc/net/appletalk", R_OK)     = -1 ENOENT (No such file or directory)

access("/proc/sys/net/econet", R_OK)    = -1 ENOENT (No such file or directory)

access("/proc/sys/net/ash", R_OK)       = -1 ENOENT (No such file or directory)

access("/proc/net/x25", R_OK)           = -1 ENOENT (No such file or directory)

write(2, "No usable address families found"..., 34No usable address families found.

) = 34

write(2, "socket: No such file or director"..., 34socket: No such file or directory

) = 34

exit_group(1)                           = ?

Process 9107 detached

is for any help?

----------

## mamac

 *vark wrote:*   

> access("/proc/net/if_inet6", R_OK)      = -1 ENOENT (No such file or directory)
> 
> access("/proc/net/ax25", R_OK)          = -1 ENOENT (No such file or directory)
> 
> access("/proc/net/rose", R_OK)          = -1 ENOENT (No such file or directory)
> ...

 

and if you look at 'man ifconfig' you'll see that it depends on files :

      /proc/net/socket

       /proc/net/dev

       /proc/net/if_inet6

Here the file I have:

```

genbox jean-marc # ll /proc/net/

total 0

-r--r--r-- 1 root root 0 jui 25 07:12 arp

-r--r--r-- 1 root root 0 jui 25 07:12 dev

-r--r--r-- 1 root root 0 jui 25 07:12 dev_mcast

-r--r--r-- 1 root root 0 jui 25 07:12 netlink

-r--r--r-- 1 root root 0 jui 25 07:12 netstat

-r--r--r-- 1 root root 0 jui 25 07:12 packet

-r--r--r-- 1 root root 0 jui 25 07:12 protocols

-r--r--r-- 1 root root 0 jui 25 07:12 raw

-r--r--r-- 1 root root 0 jui 25 07:12 route

-r--r--r-- 1 root root 0 jui 25 07:12 rt_cache

-r--r--r-- 1 root root 0 jui 25 07:12 snmp

-r--r--r-- 1 root root 0 jui 25 07:12 sockstat

-r--r--r-- 1 root root 0 jui 25 07:12 softnet_stat

dr-xr-xr-x 2 root root 0 jui 25 07:12 stat

-r--r--r-- 1 root root 0 jui 25 07:12 tcp

-r--r--r-- 1 root root 0 jui 25 07:12 tr_rif

-r--r--r-- 1 root root 0 jui 25 07:12 udp

-r--r--r-- 1 root root 0 jui 25 07:12 unix

-r--r--r-- 1 root root 0 jui 25 07:12 wireless

genbox jean-marc # ll /proc/sys

sys/           sysrq-trigger  sysvipc/

genbox jean-marc # ll /proc/sys/net/

total 0

dr-xr-xr-x 2 root root 0 jui 25 07:12 core

dr-xr-xr-x 2 root root 0 jui 25 07:12 ethernet

dr-xr-xr-x 5 root root 0 jui 25 07:12 ipv4

dr-xr-xr-x 2 root root 0 jui 25 07:12 token-ring

dr-xr-xr-x 2 root root 0 jui 25 07:12 unix

```

I don't have the file mentioned in your log but I have no problem...why does ifconfig call all these inexistant files?

----------

## vark

man, thank you for the cooperation. i've resolved it. i've reemerged net-tools and now everything is ok.

----------

## mamac

Weldone!

----------

