You are not logged in.

#1 2013-04-23 19:10:24

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

[SOLVED] netctl - can't reconnect after the line goes down

hi to everybody,

is there any way to make netctl resistant against line loss?

I have a very weak ADSL line and usually I lose the signal; when this happens the router "reboot" and just 5 secs after all is OK
this is the router+line side; the pc side can't instead establish a new connection (ethernet+dhcp) and I get this in my journal:
when the signal is lost:

Apr 23 21:04:44 arch-dekstop dhcpcd[787]: eth0: carrier lost
Apr 23 21:04:45 arch-dekstop ifplugd[321]: Link beat lost.
Apr 23 21:04:51 arch-dekstop ifplugd[321]: Executing '/etc/ifplugd/netctl.action eth0 down'.
Apr 23 21:04:51 arch-dekstop ifplugd[321]: client: Stopping network profile 'ethernet-dhcp'...
Apr 23 21:04:51 arch-dekstop dhcpcd[1925]: sending signal 1 to pid 787
Apr 23 21:04:51 arch-dekstop dhcpcd[787]: received SIGHUP, releasing
Apr 23 21:04:51 arch-dekstop dhcpcd[787]: eth0: removing interface
Apr 23 21:04:51 arch-dekstop dhcpcd[1925]: waiting for pid 787 to exit
Apr 23 21:04:51 arch-dekstop ifplugd[321]: client: Stopped network profile 'ethernet-dhcp'
Apr 23 21:04:51 arch-dekstop ifplugd[321]: Program executed successfully.

when netctl+ifplugd try to restore the connection

Apr 23 21:07:14 arch-dekstop ifplugd[321]: Link beat detected.
Apr 23 21:07:15 arch-dekstop ifplugd[321]: Executing '/etc/ifplugd/netctl.action eth0 up'.
Apr 23 21:07:15 arch-dekstop ifplugd[321]: client: up
Apr 23 21:07:15 arch-dekstop ifplugd[321]: client: Reading profile 'ethernet-dhcp'
Apr 23 21:07:15 arch-dekstop ifplugd[321]: client: Starting network profile 'ethernet-dhcp'...
Apr 23 21:07:15 arch-dekstop dhcpcd[1987]: version 5.6.7 starting
Apr 23 21:07:15 arch-dekstop dhcpcd[1987]: all: configured as a router, not a host
Apr 23 21:07:15 arch-dekstop dhcpcd[1987]: eth0: rebinding lease of 10.32.212.75
Apr 23 21:07:20 arch-dekstop dhcpcd[1987]: eth0: broadcasting for a lease
Apr 23 21:07:25 arch-dekstop dhcpcd[1987]: eth0: carrier lost
Apr 23 21:07:26 arch-dekstop dhcpcd[1987]: timed out
Apr 23 21:07:26 arch-dekstop ifplugd[321]: client: DHCP IP lease attempt failed on interface 'eth0'
Apr 23 21:07:26 arch-dekstop ifplugd[321]: client: Failed to bring the network up for profile 'ethernet-dhcp'
Apr 23 21:07:26 arch-dekstop ifplugd[321]: Program execution failed, return value is 1.
Apr 23 21:07:26 arch-dekstop ifplugd[321]: Link beat lost.
Apr 23 21:07:28 arch-dekstop ifplugd[321]: Link beat detected.
Apr 23 21:07:32 arch-dekstop ifplugd[321]: Link beat lost.
Apr 23 21:07:34 arch-dekstop ifplugd[321]: Link beat detected.

while if I unplug and replug manually the ethernet cable, netctl magically recognize the connection and everything work...

Apr 23 21:09:41 arch-dekstop ifplugd[321]: Link beat lost.
Apr 23 21:09:47 arch-dekstop ifplugd[321]: Executing '/etc/ifplugd/netctl.action eth0 down'.
Apr 23 21:09:47 arch-dekstop ifplugd[321]: Program execution failed, return value is 1.
Apr 23 21:09:54 arch-dekstop ifplugd[321]: Link beat detected.
Apr 23 21:09:55 arch-dekstop ifplugd[321]: Executing '/etc/ifplugd/netctl.action eth0 up'.
Apr 23 21:09:55 arch-dekstop ifplugd[321]: client: up
Apr 23 21:09:55 arch-dekstop ifplugd[321]: client: Reading profile 'ethernet-dhcp'
Apr 23 21:09:55 arch-dekstop ifplugd[321]: client: Starting network profile 'ethernet-dhcp'...
Apr 23 21:09:55 arch-dekstop dhcpcd[2120]: version 5.6.7 starting
Apr 23 21:09:55 arch-dekstop dhcpcd[2120]: all: configured as a router, not a host
Apr 23 21:09:55 arch-dekstop dhcpcd[2120]: eth0: rebinding lease of 10.32.212.75
Apr 23 21:09:56 arch-dekstop dhcpcd[2120]: eth0: acknowledged 10.32.212.75 from 10.32.212.72
Apr 23 21:09:56 arch-dekstop dhcpcd[2120]: eth0: checking for 10.32.212.75
Apr 23 21:10:00 arch-dekstop dhcpcd[2120]: eth0: leased 10.32.212.75 for 1800 seconds
Apr 23 21:10:00 arch-dekstop dhcpcd[2120]: forked to background, child pid 2213
Apr 23 21:10:00 arch-dekstop ifplugd[321]: client: Started network profile 'ethernet-dhcp'
Apr 23 21:10:00 arch-dekstop ifplugd[321]: Program executed successfully.

this is very annoying problem! help!

Last edited by nTia89 (2013-05-02 10:49:10)


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#2 2013-04-23 21:32:29

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [SOLVED] netctl - can't reconnect after the line goes down

I'd say, fix your cable/modem/..., because for me netctl+ifplugd (netctl-ifplugd@.service) handles connection loss just fine. But I have an ethernet, not ADSL line.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#3 2013-04-24 17:35:09

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] netctl - can't reconnect after the line goes down

my PC is connected via ethernet to my router/modem
and I can't fix the problem because is ISP-side ....


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#4 2013-04-24 20:22:06

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] netctl - can't reconnect after the line goes down

my PC is connected via ethernet to my router/modem
and I can't fix the problem because is ISP-side ....

EDIT: I don't know exactly if it's a netctl or ifplugd or dhcpd problem;
but I think I can solve the problem if program would try to relaunch itself even if it has exited with an error (my case)
how can I do this?

Last edited by nTia89 (2013-04-24 20:22:14)


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#5 2013-04-30 17:05:37

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] netctl - can't reconnect after the line goes down

heeelp


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#6 2013-05-01 23:42:50

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [SOLVED] netctl - can't reconnect after the line goes down

Looks like dhcpcd is your issue. I have also had issues with dhcpcd and auto profiles on my wlan0 interface. I would recommend switching to dhclient.

# pacman -S dhclient
# echo "DHCPClient='dhclient'" >> /etc/netctl/ethernet-dhcp
# systemctl restart netctl@eth0

If that doesn't help, let's see the new output from the logfiles.

Last edited by ub1quit33 (2013-05-01 23:43:18)

Offline

#7 2013-05-02 10:48:04

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] netctl - can't reconnect after the line goes down

ub1quit33 wrote:

Looks like dhcpcd is your issue. I have also had issues with dhcpcd and auto profiles on my wlan0 interface. I would recommend switching to dhclient.

# pacman -S dhclient
# echo "DHCPClient='dhclient'" >> /etc/netctl/ethernet-dhcp
# systemctl restart netctl@eth0

If that doesn't help, let's see the new output from the logfiles.

thank you very much, this is what I need!

switching to dhclient magically works; this is the log:

May 02 11:31:40 arch-dekstop ifplugd[325]: Link beat lost.
May 02 11:31:46 arch-dekstop ifplugd[325]: Executing '/etc/ifplugd/netctl.action eth0 down'.
May 02 11:31:46 arch-dekstop ifplugd[325]: client: Stopping network profile 'ethernet-dhcp'...
May 02 11:31:46 arch-dekstop ifplugd[325]: client: Stopped network profile 'ethernet-dhcp'
May 02 11:31:46 arch-dekstop ifplugd[325]: Program executed successfully.
May 02 11:32:03 arch-dekstop ifplugd[325]: Link beat detected.
May 02 11:32:04 arch-dekstop ifplugd[325]: Executing '/etc/ifplugd/netctl.action eth0 up'.
May 02 11:32:04 arch-dekstop ifplugd[325]: client: up
May 02 11:32:04 arch-dekstop ifplugd[325]: client: Reading profile 'ethernet-dhcp'
May 02 11:32:04 arch-dekstop ifplugd[325]: client: Starting network profile 'ethernet-dhcp'...
May 02 11:32:04 arch-dekstop dhclient[1291]: DHCPREQUEST on eth0 to 255.255.255.255 port 67
May 02 11:32:11 arch-dekstop dhclient[1291]: DHCPREQUEST on eth0 to 255.255.255.255 port 67
May 02 11:32:22 arch-dekstop dhclient[1291]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
May 02 11:32:25 arch-dekstop dhclient[1291]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
May 02 11:32:30 arch-dekstop dhclient[1291]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
May 02 11:32:37 arch-dekstop dhclient[1291]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
May 02 11:32:49 arch-dekstop dhclient[1291]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
May 02 11:32:52 arch-dekstop slim[343]: (kupfer.py:862): Wnck-WARNING **: Unhandled action type _OB_WM_ACTION_UNDECORATE
May 02 11:33:01 arch-dekstop dhclient[1291]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21
May 02 11:33:22 arch-dekstop dhclient[1291]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 1
May 02 11:33:23 arch-dekstop dhclient[1291]: DHCPREQUEST on eth0 to 255.255.255.255 port 67
May 02 11:33:23 arch-dekstop dhclient[1291]: DHCPOFFER from 10.32.212.72
May 02 11:33:23 arch-dekstop dhclient[1291]: DHCPACK from 10.32.212.72
May 02 11:33:23 arch-dekstop dhclient[1291]: bound to 10.32.212.74 -- renewal in 834 seconds.
May 02 11:33:23 arch-dekstop ifplugd[325]: client: Started network profile 'ethernet-dhcp'
May 02 11:33:23 arch-dekstop ifplugd[325]: Program executed successfully.

the problem is solved, now I'm going to investigate why dhcpcd doesn't work....
I discover new options in the netctl script which can help me!

PS: I can't restart the netctl service and I don't know why:

# systemctl restart netctl@eth0

return me:

netctl@eth0.service - Networking for netctl profile eth0
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: failed (Result: exit-code) since Thu 2013-05-02 11:26:27 CEST; 1min 12s ago
     Docs: man:netctl.profile(5)
  Process: 1639 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

May 02 11:26:27 arch-dekstop systemd[1]: Starting Networking for netctl profile eth0...
May 02 11:26:27 arch-dekstop network[1639]: Profile 'eth0' does not exist or is not readable
May 02 11:26:27 arch-dekstop systemd[1]: netctl@eth0.service: main process exited, code=exited, status=1/FAILURE
May 02 11:26:27 arch-dekstop systemd[1]: Failed to start Networking for netctl profile eth0.
May 02 11:26:27 arch-dekstop systemd[1]: MESSAGE=Unit netctl@eth0.service entered failed state.

+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#8 2013-05-02 15:46:01

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [SOLVED] netctl - can't reconnect after the line goes down

My bad, I meant to write the restart syntax as

# systemctl restart netctl@ethernet-dhcp

Unless your profile is actually named 'eth0', it's expected that the command I gave you would fail.

Offline

#9 2013-05-02 18:32:50

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] netctl - can't reconnect after the line goes down

ub1quit33 wrote:

My bad, I meant to write the restart syntax as

# systemctl restart netctl@ethernet-dhcp

Unless your profile is actually named 'eth0', it's expected that the command I gave you would fail.

I thought it was a general service....

because I'm using it with ifplugd the right command is:

sudo systemctl restart netctl-ifplugd@eth0

thank you again


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#10 2013-05-02 18:42:03

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [SOLVED] netctl - can't reconnect after the line goes down

Of course, you are correct. Glad everything is working!

Offline

#11 2013-05-02 18:59:12

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] netctl - can't reconnect after the line goes down

reading in DHCPCD feature page http://roy.marples.name/projects/dhcpcd … cdFeatures
I can see the item: Link carrier detection

do you think it's the feature which provides ifplugd?


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#12 2013-05-02 20:39:47

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [SOLVED] netctl - can't reconnect after the line goes down

I don't know a whole lot about the guts of dhcpcd or ifplugd, but AFAIK there's no reason ifplugd shouldn't be working with dhclient. Are you having difficulty with that?

Offline

#13 2013-05-02 20:49:54

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] netctl - can't reconnect after the line goes down

ub1quit33 wrote:

I don't know a whole lot about the guts of dhcpcd or ifplugd, but AFAIK there's no reason ifplugd shouldn't be working with dhclient. Are you having difficulty with that?

nono, I don't have any type of issue.

my question was: "Link carrier detection" of dhcpcd is equal to feature provided by ifplugd ???


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#14 2013-05-02 20:54:31

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [SOLVED] netctl - can't reconnect after the line goes down

Ah. Unfortunately, I have no answer to that question, as I'm unsure of exactly what "link carrier detection" is.

Offline

#15 2013-05-03 08:31:19

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] netctl - can't reconnect after the line goes down

I'll do some tests


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

Board footer

Powered by FluxBB