You are not logged in.

#1 2007-06-19 09:18:08

MrFuji
Member
From: Germany
Registered: 2007-05-05
Posts: 26

(solved) Network Restart

I've recently discovered a new problem with arch...

The network daemon can't be restarted properly. Whenever I try a "/etc/rc.d/network restart" everything seems to be working fine but I don't have a functioning network afterwards. After a second restart, however, it suddenly works. First of all I thought it was a suspend issue but it also happens directly after a boot.
Don't know what could've caused it nor have I an idea how to solve it.

Help appreciated smile

Last edited by MrFuji (2007-06-20 18:11:22)

Offline

#2 2007-06-19 18:02:03

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: (solved) Network Restart

Just a shot in the dark, but could it be that your network hardware doesn't quite shutdown in time before it attempts to restart the network? 

I believe it's possible to adjust the wait period between the stop and start functions of the "restart" script. 

Open (as root) the network script in your favourite editor, for example:

# vim /etc/rc.d/network

Now look for a snippet towards the very bottom that looks like this:

    restart)
        $0 stop
        /bin/sleep 2
        $0 start
        ;;

I believe you can tweak the sleep value (e.g. set it to 3 or 4) to create a slightly longer pause between the stopping and restarting of the network. 

This may address the problem.


thayer williams ~ cinderwick.ca

Offline

#3 2007-06-19 18:46:03

MrFuji
Member
From: Germany
Registered: 2007-05-05
Posts: 26

Re: (solved) Network Restart

^Thanks for your reply smile
Sadly, that didn't solve it. Even higher values didn't do the trick...
The problem is, this issue started happening all of the sudden. The only "bigger" thing I've installed recently were the pm-utils which replaced powersave. Reverted that already but the network restart issue still occurs.

I've also tried the fallback image, but things aren't changing hmm

More information needed?

Offline

#4 2007-06-19 20:06:24

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: (solved) Network Restart

Hrmm, I'm at a loss...which isn't saying much smile

The only thing I could suggest is that you try the networkmanager daemon as an alternative to network. Not really a solution to your problem, but it might at least tell you if it's the network daemon itself or something else misbehaving.  Personally, I use networkmanager, so I don't have much experience with network.


thayer williams ~ cinderwick.ca

Offline

#5 2007-06-19 20:27:24

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: (solved) Network Restart

I posted this bug a while back....try and reopen it?
http://bugs.archlinux.org/task/6959

Offline

#6 2007-06-19 20:44:37

MrFuji
Member
From: Germany
Registered: 2007-05-05
Posts: 26

Re: (solved) Network Restart

^ Yeah, already found that thread wink
Also changed it according to the solution there...

But now it's not that dhcpcd variable isn't cleaned up, as that wouldn't explain why it works after a second restart.

@thayer.w: I have never managed to get the networkmanager working. Just tried it once more but still no luck ^^

Maybe hope and wait until an update eventually solves it...? Oh well...

Offline

#7 2007-06-20 11:58:00

Magician21
Member
Registered: 2007-03-23
Posts: 45

Re: (solved) Network Restart

Can you post the network portion of your rc.conf?

Offline

#8 2007-06-20 12:14:58

MrFuji
Member
From: Germany
Registered: 2007-05-05
Posts: 26

Re: (solved) Network Restart

^ Sure...

lo="lo 127.0.0.1"
eth0="dhcp"
ath0="dhcp"
wlan_ath0="ath0 essid FeelGood key s:XXXXXX"
WLAN_INTERFACES=(ath0)
INTERFACES=(lo !eth0 ath0)

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

But I've never changed it. It just stopped working last saturday... That's what makes it so.... annoying wink

Offline

#9 2007-06-20 12:54:34

Magician21
Member
Registered: 2007-03-23
Posts: 45

Re: (solved) Network Restart

When things "just stop" working, it's _really_ irritating sad

You only have ath0 uncommented, so you're only starting your wireless card, right?

Shutdown all your network interfaces.  Then from a command prompt, try running:
/usr/sbin/iwconfig ath0 essid FeelGood key s:XXXXXX (replace the key with your real one)

Does it work when you do that?  Does it work when given 30 seconds?

The above should be what a start / restart of the networking script is doing.

Offline

#10 2007-06-20 13:34:08

MrFuji
Member
From: Germany
Registered: 2007-05-05
Posts: 26

Re: (solved) Network Restart

Yep, you're perfectly right, only starting my wireless interface (madwifi btw) but...
nope, that didn't work....
But here's something that might be useful...
First restart

[sven@svenlap ~]$ sudo /etc/rc.d/network stop
:: Stopping Network                                                      [DONE] 
[sven@svenlap ~]$ sudo /etc/rc.d/network start
:: Starting Network                                                      [DONE] 
[sven@svenlap ~]$ iwconfig ath0
ath0      IEEE 802.11g  ESSID:"FeelGood"  Nickname:""
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:12:BF:A5:62:A4   
          Bit Rate:54 Mb/s   Tx-Power:16 dBm   Sensitivity=0/3  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=35/94  Signal level=-58 dBm  Noise level=-93 dBm
          Rx invalid nwid:7556  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[sven@svenlap ~]$ ifconfig ath0
ath0      Link encap:Ethernet  HWaddr 00:19:7D:33:F5:53  
          inet6 addr: fe80::219:7dff:fe33:f553/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:356 errors:0 dropped:0 overruns:0 frame:0
          TX packets:194 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:115759 (113.0 Kb)  TX bytes:48925 (47.7 Kb)

And the second one:

[sven@svenlap ~]$ sudo /etc/rc.d/network stop
:: Stopping Network                                                      [DONE] 
[sven@svenlap ~]$ sudo /etc/rc.d/network start
:: Starting Network                                                      [DONE] 
[sven@svenlap ~]$ iwconfig ath0
ath0      IEEE 802.11g  ESSID:"FeelGood"  Nickname:""
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:12:BF:A5:62:A4   
          Bit Rate:54 Mb/s   Tx-Power:16 dBm   Sensitivity=0/3  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=32/94  Signal level=-61 dBm  Noise level=-93 dBm
          Rx invalid nwid:9185  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[sven@svenlap ~]$ ifconfig ath0
ath0      Link encap:Ethernet  HWaddr 00:19:7D:33:F5:53  
          inet addr:192.168.2.101  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::219:7dff:fe33:f553/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:410 errors:0 dropped:0 overruns:0 frame:0
          TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:118887 (116.1 Kb)  TX bytes:50183 (49.0 Kb)

There doesn't seem to be something wrong with the iwconfig part but obviously I don't have an IP address after the first restart.
Then maybe misfit is right and it's still something wrong with the dhcpd variable?

edit: It has obviously something to do with dhcpcd because if I restart the network after a "killall dhcpcd" everything works fine....

Last edited by MrFuji (2007-06-20 13:47:13)

Offline

#11 2007-06-20 13:56:32

MrFuji
Member
From: Germany
Registered: 2007-05-05
Posts: 26

Re: (solved) Network Restart

It's working!

I've seen that I did not apply the whole patch for the dhcpcd issue. Don't know why it worked for so long without the whole patch, but anyways... Thanks for your help, all of you smile

Offline

Board footer

Powered by FluxBB