You are not logged in.

#1 2016-12-17 15:17:33

Zzipo
Member
From: North Spain
Registered: 2013-01-07
Posts: 61

Netctl / dhcpcd

Good afternoon,

If I do:

$ sudo dhcpcd enp2s0

enp2s0: waiting for carrier
enp2s0: carrier acquired
enp2s0: adding address fe--5ab4:c6f4:f794:-----
DUID 00:01:00:----:22:7b:14:9c:5c:8e:---------
enp2s0: IAID 8e:---------
enp2s0: rebinding lease of 192.168.------
enp2s0: probing address 192.168.------/2-
enp2s0: soliciting an IPv6 router
enp2s0: leased 192.168.------ for 43200 seconds
enp2s0: adding route to 192.168.-------/2-
enp2s0: adding default route via 192.168.-------
forked to background, child pid 3---9

But If I do:

$ sudo netctl status eth5_dhcp

● netctl@eth5_dhcp.service - Networking for netctl profile eth5_dhcp
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2016-12-17 --------;-min ago
     Docs: man:netctl.profile(5)
  Process: 1--3 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
 Main PID: 1--3 (code=exited, status=1/FAILURE)

Dec 17  systemd[1]: Starting Networking for netctl profile eth5_dhcp...
Dec 17  network[1983]: Starting network profile 'eth5_dhcp'...
Dec 17   network[1983]: No connection found on interface 'enp2s0' (timeout)
Dec 17   network[1983]: Failed to bring the network up for profile 'eth5_dhcp'
Dec 17   systemd[1]: netctl@eth5_dhcp.service: Main process exited, code=exited, status=1/FAILURE
Dec 17   systemd[1]: Failed to start Networking for netctl profile eth5_dhcp.
Dec 17  systemd[1]: netctl@eth5_dhcp.service: Unit entered failed state.
Dec 17  asu systemd[1]: netctl@eth5_dhcp.service: Failed with result 'exit-code'.

What is it failing?

This is the profile:

Description='A basic dhcp ethernet connection'
Interface=enp2s0
Connection=ethernet
IP=dhcp
DNS=('192.168.31.11' '192.168.31.3'')
Timeout=15
# Timeout: really slow in home
DHCPClient="dhcpcd"
DhcpcdOptions="-r 192.168.31.3"

(I put 31.X just to show something).

Before I execute the netctl I do

sudo ip link set enp2s0 down

How can I get better verbose messages of what is failing with the netctl command?

I never had problems, suddenly today.

Offline

#2 2016-12-17 15:34:10

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: Netctl / dhcpcd

Use journalctl.

Offline

#3 2016-12-17 17:02:06

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: Netctl / dhcpcd

And, if you would, please post the output of systemctl --type=service --no-pager


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2016-12-17 18:32:53

Zzipo
Member
From: North Spain
Registered: 2013-01-07
Posts: 61

Re: Netctl / dhcpcd

$ journalctl -xe

Dec 17 19:24:32  systemd[1]: Starting Networking for netctl profile eth5_dhcp...
-- Subject: Unit netctl@eth5_dhcp.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit netctl@eth5_dhcp.service has begun starting up.
Dec 17 19:24:32  network[15345]: Starting network profile 'eth5_dhcp'...
Dec 17 19:24:32  kernel: r8169 0000:02:00.0 enp2s0: link down
Dec 17 19:24:32  kernel: r8169 0000:02:00.0 enp2s0: link down
Dec 17 19:24:32  kernel: IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
Dec 17 19:24:37  network[15345]: No connection found on interface 'enp2s0' (timeout)
Dec 17 19:24:37  network[15345]: Failed to bring the network up for profile 'eth5_dhcp'
Dec 17 19:24:37  systemd[1]: netctl@eth5_dhcp.service: Main process exited, code=exited, status=1/FAILURE
Dec 17 19:24:37  systemd[1]: Failed to start Networking for netctl profile eth5_dhcp.
-- Subject: Unit netctl@eth5_dhcp.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit netctl@eth5_dhcp.service has failed.
--
-- The result is failed.
Dec 17 19:24:37  systemd[1]: netctl@eth5_dhcp.service: Unit entered failed state.
Dec 17 19:24:37  systemd[1]: netctl@eth5_dhcp.service: Failed with result 'exit-code'.
Dec 17 19:24:37  sudo[15339]: pam_unix(sudo:session): session closed for user root

The enp2s0 link is not ready. I tried with it up, but then it gives the previous error:

 
$ sudo ip link set enp2s0 up

Dec 17 19:24:13  network[14610]: The interface of network profile 'eth5_dhcp' is already up
$ systemctl --type=service --no-pager

  UNIT                                                   LOAD   ACTIVE SUB     DESCRIPTION
  dbus.service                                           loaded active running D-Bus System Message Bus
  kmod-static-nodes.service                              loaded active exited  Create list of required static device nodes for the cu
● netctl@eth5_dhcp.service                               loaded failed failed  Networking for netctl profile eth5_dhcp
  polkit.service                                         loaded active running Authorization Manager
  rtkit-daemon.service                                   loaded active running RealtimeKit Scheduling Policy Service
  ...
  # nothing more failed

By the way, while doing

sudo dhcpcd enp2s0

:

2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 9c:5c:8e:--:--:-- brd ff:ff:ff:ff:ff:ff

And while trying (and failing) with netctl:

2: enp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 9c:5c:8e:--:--:-- brd ff:ff:ff:ff:ff:ff

Offline

#5 2016-12-17 18:56:41

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: Netctl / dhcpcd

# nothing more failed

So, I guess I'll never find out what services are enabled and are interfering with netctl.  C'est la vie.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2016-12-17 19:35:32

Zzipo
Member
From: North Spain
Registered: 2013-01-07
Posts: 61

Re: Netctl / dhcpcd

Sorry, I thought you wanted to see only the failed ones.

Let's go:

  UNIT                                                   LOAD   ACTIVE SUB     DESCRIPTION
  dbus.service                                           loaded active running D-Bus System Message Bus
  kmod-static-nodes.service                              loaded active exited  Create list of required static device nodes for the cu
● netctl@eth5_dhcp.service                               loaded failed failed  Networking for netctl profile eth5_dhcp
  polkit.service                                         loaded active running Authorization Manager
  rtkit-daemon.service                                   loaded active running RealtimeKit Scheduling Policy Service
  sddm.service                                           loaded active running Simple Desktop Display Manager
  systemd-backlight@backlight:intel_backlight.service    loaded active exited  Load/Save Screen Backlight Brightness of backlight:int
  systemd-fsck@dev-disk-by\x2duuid-398b1a32\x-----0\x2d4959\x2da3de\x--------------.service loaded active exited  File System Check on /dev/disk/by-uuid/39-------0eb0-4
  systemd-journal-flush.service                          loaded active exited  Flush Journal to Persistent Storage
  systemd-journald.service                               loaded active running Journal Service
  systemd-logind.service                                 loaded active running Login Service
  systemd-random-seed.service                            loaded active exited  Load/Save Random Seed
  systemd-remount-fs.service                             loaded active exited  Remount Root and Kernel File Systems
  systemd-sysctl.service                                 loaded active exited  Apply Kernel Variables
  systemd-timesyncd.service                              loaded active running Network Time Synchronization
  systemd-tmpfiles-setup-dev.service                     loaded active exited  Create Static Device Nodes in /dev
  systemd-tmpfiles-setup.service                         loaded active exited  Create Volatile Files and Directories
  systemd-udev-trigger.service                           loaded active exited  udev Coldplug all Devices
  systemd-udevd.service                                  loaded active running udev Kernel Device Manager
  systemd-update-utmp.service                            loaded active exited  Update UTMP about System Boot/Shutdown
  systemd-user-sessions.service                          loaded active exited  Permit User Sessions
  systemd-vconsole-setup.service                         loaded active exited  Setup Virtual Console
  udisks2.service                                        loaded active running Disk Manager
  upower.service                                         loaded active running Daemon for power management
  user@1000.service                                      loaded active running User Manager for UID 1000

Offline

#7 2016-12-17 19:54:24

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: Netctl / dhcpcd

Okay, that looks good.  Sorry for my sarcasm.  A common error is to enable other network services that interfere with the operation on netctl (dhcpcd.service, for example) 

Have you enabled the dhcpcd service and restarted?  I am looking for a clean slate where nothing has been started by hand.
Also, I understand the desire to obfuscate network addresses, MACs, and DNS names -- but... I think you may be getting a bit carried away trying to obfuscate 192.168.x.x/24 addresses; they are of absolutely no use to anyone outside of your private network and, by doing so, you may be hiding configuration errors that would otherwise could be detected by your readers here.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2016-12-17 20:20:56

Zzipo
Member
From: North Spain
Registered: 2013-01-07
Posts: 61

Re: Netctl / dhcpcd

jajajaja, thanks.

Yep, I thought about the 192.168.X.Y too, but I don't know enough about security to know what is "possible" nowadays. Sure, that private network should be nothing.

By the way, I like your quotes.

No, I just executed by hand the dhcpcd enp2s0. I didn't use any service (systemctl).

I don't know if an option to show verbose netctl messages is possible. I would like to see what is receiving netctl from the dhcpcd DHCPClient program, or at least executing netctl in foreground (like I do with dhcpcd enp2s0).

Description='A basic dhcp ethernet connection (business)'
Interface=enp2s0
Connection=ethernet
IP=dhcp
DNS=('192.168.1.19' '192.168.1.1')
DNSDomain='bus'
DNSSearch='bus'
Timeout=15
# Timeout: really slow in home because of long wires and hops
#IP6=dhcp
#IP6=stateless
DHCPClient="dhcpcd"
DhcpcdOptions="-r 192.168.1.19"

Thanks for your efforts.

Last edited by Zzipo (2016-12-17 20:22:14)

Offline

#9 2016-12-25 09:46:43

Zzipo
Member
From: North Spain
Registered: 2013-01-07
Posts: 61

Re: Netctl / dhcpcd

Hello,

I continue with the problem.

Today, when doing

sudo dhcpcd enp2s0

I need a bit more time and it printed more logs:

% sudo dhcpcd enp2s0

enp2s0: waiting for carrier
enp2s0: carrier acquired
enp2s0: adding address fe80::5ab4:c6f4:f794:
DUID 00:01:00:01:1f:22:7b:14:9c:5c:8e:21:
enp2s0: IAID 8e:21:
enp2s0: soliciting an IPv6 router
enp2s0: soliciting a DHCP lease
enp2s0: carrier lost
enp2s0: deleting address fe80::5ab4:c6f4:f794:
enp2s0: carrier acquired
enp2s0: adding address fe80::5ab4:c6f4:f794:
enp2s0: IAID 8e:21:
enp2s0: soliciting a DHCP lease
enp2s0: soliciting an IPv6 router
enp2s0: carrier lost
enp2s0: deleting address fe80::5ab4:c6f4:f794:
enp2s0: carrier acquired
enp2s0: adding address fe80::5ab4:c6f4:f794:
enp2s0: IAID 8e:21:
enp2s0: soliciting an IPv6 router
enp2s0: soliciting a DHCP lease
enp2s0: offered 192.168.1.16 from 192.168.1.1
enp2s0: probing address 192.168.1.16/26
enp2s0: Router Advertisement from fe80::da61:94ff:feb3:
enp2s0: adding default route via fe80::da61:94ff:feb3:
enp2s0: requesting DHCPv6 information
enp2s0: leased 192.168.1.16 for 43200 seconds
enp2s0: adding route to 192.168.1.0/26
enp2s0: adding default route via 192.168.1.1
forked to background, child pid 12442

Last edited by Zzipo (2016-12-25 09:47:03)

Offline

Board footer

Powered by FluxBB