Home Antergos How To Fix “job for netctl service failed” Error In Arch Linux
Fix job for netctl service failed Error In Arch Linux

How To Fix “job for netctl service failed” Error In Arch Linux

By sk
1792 Views

Sometimes, I configure my tablet PC as wifi hotspot to use Internet in my Arch Linux desktop. Yesterday, I messed up with wireless network card's settings, and my hotspot stopped working. I was able to connect with hostpot, but Internet didn't work in my Arch Linux desktop. I tried to start my wifi network profile using command:

$ sudo netctl start wlp9s0-sktab

Here, wlp9s0-sktab is my wifi network profile name. I got the following error message while I trying to start the network profile.

Job for [email protected]\x2dsktab.service failed because the control process exited with error code.
See "systemctl status "[email protected]\\x2dsktab.service"" and "journalctl -xe" for details.

While searching through the Arch Linux wiki, someone has pointed out that this problem might occur if you use hyphen in your network profile's name. So, I deleted my old wifi network profile (i.e wlp9s0-sktab):

$ sudo rm /etc/netctl/wlp9s0-sktab

And then created a new one with name "wlp9s0sktab" (without hyphen) using "wifi-menu" command. But, no luck! I still got the same problem, and Internet doesn't work.

I ran the following command to know the status of my wifi network profile.

$ sudo netctl status wlp9s0sktab

Here, wlp9s0sktab is my wifi hotspot name.

Sample output:

[email protected] - Automatically generated profile by wifi-menu
 Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: disabled)
 Active: failed (Result: exit-code) since Sun 2017-03-12 12:25:25 IST; 1min 40s ago
 Docs: man:netctl.profile(5)
 Process: 390 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
 Main PID: 390 (code=exited, status=1/FAILURE)

Mar 12 12:25:24 sk systemd[1]: Starting Automatically generated profile by wifi-menu...
Mar 12 12:25:25 sk network[390]: Starting network profile 'wlp9s0sktab'...
Mar 12 12:25:25 sk network[390]: The interface of network profile 'wlp9s0sktab' is already up
Mar 12 12:25:25 sk systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Mar 12 12:25:25 sk systemd[1]: Failed to start Automatically generated profile by wifi-menu.
Mar 12 12:25:25 sk systemd[1]: [email protected]: Unit entered failed state.
Mar 12 12:25:25 sk systemd[1]: [email protected]: Failed with result 'exit-code'.While searching through Arch Wiki, someone has pointed out that we shouldn't hypen (-) in network profile name. So, Have deleted the existing network profile as shown below.

I have no idea what I have misconfigured in the network settings. After digging a little bit in the Arch Linux forums, I found that systemd causes this problem. I was testing and configuring a local DHCP server, so I had enabled dhcpcd.service. This is why my wifi hotspot didn't work. If you ever encountered this problem, just follow these steps given below to fix it.

How To Fix "job for netctl service failed" Error In Arch Linux

Disable dhcpcd.service using command:

$ sudo systemctl stop dhcpcd.service
$ sudo systemctl disable dhcpcd.service

Next, Remove old DHCP leases. The following directory contains all dhcp leases.

$ ls /var/lib/dhcpcd/

Sample output:

 dhcpcd-enp0s29u1u2.lease dhcpcd-wlp9s0-BlNi-QWtzaHU.lease
 dhcpcd-enp5s0.lease dhcpcd-wlp9s0-Buew-c3VkaGFu.lease
 dhcpcd-wlp9s0-AFFLIENCE.lease dhcpcd-wlp9s0-BVof-QWJp.lease
 dhcpcd-wlp9s0-AFFLIENCE.lease6 'dhcpcd-wlp9s0-Ostechnix\040Tech\040Service.lease'
 dhcpcd-wlp9s0-AndroidAP.lease 'dhcpcd-wlp9s0-Ostechnix\040Tech\040Service.lease6'
 dhcpcd-wlp9s0-B12B-amFjb2Jzb3duZGFyMw.lease dhcpcd-wlp9s0-Dev9376.lease
 dhcpcd-wlp9s0-Bcof-R2luZW91cw.lease dhcpcd-wlp9s0-Dev9376.lease6
 dhcpcd-wlp9s0-Bed6-cmFteWE.lease dhcpcd-wlp9s0-ostechnix.lease
 dhcpcd-wlp9s0-BGD4-cmVudWdhcmFndW5hdGhhbg.lease dhcpcd-wlp9s0-Pratheesh.lease
 dhcpcd-wlp9s0-BGec-TGVub3ZvIEs1MGE0MA.lease dhcpcd-wlp9s0-Raja.lease
 dhcpcd-wlp9s0-BgXq-QWtzaHU.lease dhcpcd-wlp9s0-sktab.lease
 dhcpcd-wlp9s0-BJNQ-bWFkaGFubGF2YTk1.lease dhcpcd-wlp9s0-Sklab.lease
 dhcpcd-wlp9s0-BKTt-RWxh.lease dhcpcd-wlp9s0-mynet.lease

Just delete all of them or delete only your preferred dhcp leases.

I deleted all DHCP leases of my wif network profiles as shown below.

$ sudo rm -fr /var/lib/dhcpcd/dhcpcd-wlp9s0*

Then, delete all unnecessary and previously enabled services from systemd using command:

$ sudo rm /etc/systemd/system/multi-user.target.wants/netctl*

Finally, delete all connected wifi network profiles. As you may know, all network profiles will be found under /etc/netctl/ directory.

$ sudo rm -fr /etc/netctl/wlp9s0*

Reboot the system.

Once you logged in, create a new network profile for your wifi network.

To do so, run:

$ sudo wifi-menu

Select your wifi network name:

Avoid using hyphen in wifi network names. Click OK to save the profile.

Now, check the status of the newly created wifi network profile using command:

$ sudo netctl status wlp9s0sktab

Sample output:

[email protected] - Automatically generated profile by wifi-menu
 Loaded: loaded (/etc/systemd/system/[email protected]; static; vendor preset: disabled)
 Active: active (exited) since Sun 2017-03-12 13:26:33 IST; 2min 20s ago
 Docs: man:netctl.profile(5)
 Process: 851 ExecStart=/usr/lib/network/network start %I (code=exited, status=0/SUCCESS)
 Main PID: 851 (code=exited, status=0/SUCCESS)
 Tasks: 2 (limit: 4915)
 CGroup: /system.slice/system-netctl.slice/[email protected]
 ├─860 wpa_supplicant -q -B -P /run/wpa_supplicant_wlp9s0.pid -i wlp9s0 -D nl80211,wext -c/run/network/wpa_supplicant_wlp9s0
 └─909 dhcpcd -4 -q -t 30 -L wlp9s0

Mar 12 13:26:24 sk network[851]: Starting network profile 'wlp9s0sktab'...
Mar 12 13:26:26 sk dhcpcd[903]: DUID 00:01:00:01:20:57:b7:1b:c0:18:85:50:47:4f
Mar 12 13:26:26 sk dhcpcd[903]: wlp9s0: IAID 85:50:47:4f
Mar 12 13:26:27 sk dhcpcd[903]: wlp9s0: rebinding lease of 192.168.43.193
Mar 12 13:26:27 sk dhcpcd[903]: wlp9s0: probing address 192.168.43.193/24
Mar 12 13:26:32 sk dhcpcd[903]: wlp9s0: leased 192.168.43.193 for 43200 seconds
Mar 12 13:26:32 sk dhcpcd[903]: wlp9s0: adding route to 192.168.43.0/24
Mar 12 13:26:32 sk dhcpcd[903]: wlp9s0: adding default route via 192.168.43.1
Mar 12 13:26:33 sk network[851]: Started network profile 'wlp9s0sktab'
Mar 12 13:26:33 sk systemd[1]: Started Automatically generated profile by wifi-menu.

Voila! It worked!!

Additional note: If Internet still doesn't work on your system, you need to update the nameserver details in your /etc/resolv.conf file. In my case, I have added 192.168.43.1 as nameserver and Internet worked just fine!


Suggested read:


Hope this helps.

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

14 comments

Jane Doe March 14, 2017 - 3:15 am

Very helpful post.
Thank you sir! 🙂

Reply
Maxi Barreneche July 3, 2017 - 9:53 am

¡Gracias che! 🙂

Reply
B.Max July 30, 2017 - 3:47 am

What if the dialog showed “Connecting failed” and the status is still “Active: failed” ?

Reply
Rubén Darío Salgado August 9, 2017 - 12:16 am

Mi idolo, gracias me acabas de sacar de un apuro.

Reply
Bradley Stuart Kirton November 17, 2017 - 5:05 pm

Thank you so much!

Reply
PrometheusDarko January 3, 2018 - 8:12 pm

Cheers, mate, this was exactly what I needed.

Reply
Rbed February 21, 2018 - 1:22 pm

Oh man…. thank you so much! You are a saint! I was reading through the docs trying to figure out how to tackle this. Saved me a lot ton of time I’m sure! I’m new to arch so stuff like this can take a while.

Reply
Sammy July 18, 2018 - 10:37 pm

Thank you, that helped!

Reply
Magnus Sörensen September 14, 2018 - 4:13 am

Thanks a hundred.

Reply
Tomer November 17, 2018 - 8:07 pm

Thank you so much, that was super helpful!!

Reply
Julik May 18, 2019 - 10:11 am

Thank you
My issue was more complex, after kernel update it tried unexisting version of firmware. With renaming and coppying I managed to load older driver, but still netctl was failing. Folowing your steps, removed old leases profiles and so on, but still netctl was complaining that interface is already up. So just set it down and tried to start netctl again and it worked!

Reply
Chris June 10, 2019 - 4:17 am

Cheers man,
Where most others posts/articles/etc were incomplete,
you have been able to provide a clear and exhaustive solution that worked.
Many thanks

Reply
Shreyansh Kuntal August 4, 2019 - 5:25 am

Thankyou sir. Your blog solved two problems for me. First, job for netctl… And second, Pacman could not resolve host. Thankyou very much sir. 🙂

Reply
Mat July 20, 2020 - 12:34 pm

Still works on July2020/Arch Linux, not even the wiki helped me on this one!, Thanks.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More