You are not logged in.

#1 2013-09-05 06:43:09

zech
Member
Registered: 2013-09-05
Posts: 8

[solved] netctl problem with open wireless

Here is the profile generated by wifi-menu when I was installing Arch:

$ cat ucb
Description='Automatically generated profile by wifi-menu'
Interface=wlp0s26f7u3
Connection=wireless
Security=none
ESSID=UCB\ Wireless
IP=dhcp

$ sudo netctl start ucb
Job for netctl@ucb.service failed. See 'systemctl status netctl@ucb.service' and 'journalctl -xn' for details.

$ journalctl -xn
Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.
-- Logs begin at Tue 2013-09-03 23:33:50 MDT, end at Thu 2013-09-05 00:23:24 MDT. --
Sep 04 13:04:02 abraham su[31037]: (to zech) zech on none
Sep 04 13:04:02 abraham su[31037]: pam_unix(su:session): session opened for user root by (uid=1000)
Sep 04 13:04:43 abraham su[31037]: pam_unix(su:session): session closed for user root
-- Reboot --
Sep 04 20:50:09 abraham dhcpcd[668]: dhcpcd will not work correctly unless run as root
Sep 04 20:50:16 abraham dhcpcd[669]: enp0s25: if_init: Permission denied
Sep 04 20:50:17 abraham dhcpcd[669]: enp0s25: if_init: Permission denied
Sep 04 21:48:29 abraham sudo[22162]: pam_unix(sudo:auth): conversation failed
Sep 05 00:22:44 abraham su[29452]: (to zech) zech on none
Sep 05 00:22:44 abraham su[29452]: pam_unix(su:session): session opened for user root by (uid=1000)
Sep 05 00:23:24 abraham su[29452]: pam_unix(su:session): session closed for user root

$ systemctl status netctl@ucb.service
netctl@ucb.service - Networking for netctl profile ucb
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: failed (Result: exit-code) since Thu 2013-09-05 00:41:01 MDT; 1min 13s ago
     Docs: man:netctl.profile(5)
  Process: 4777 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

What's the problem with it? thanks for any help.

Last edited by zech (2013-09-06 01:22:00)

Offline

#2 2013-09-05 06:50:42

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] netctl problem with open wireless

I don't know that the delimited space is allowed in netctl's profiles.  All options are sent to wpa_supplicant as quoted anyway.  See the netctl.profile man page for more info.  In particular, go nearly to the end of the page to see the special quoting rules and an explanation for why it is that way.

Offline

#3 2013-09-05 06:59:03

zech
Member
Registered: 2013-09-05
Posts: 8

Re: [solved] netctl problem with open wireless

The profile is auto generated, so it's unlikely wrong. And it's the same error even if I changed essid to "UCB Wireless".

One thing I don't understand is why this message "enp0s25: if_init: Permission denied". It should be only related to the wireless interface - wlp0s26f7u3, not the eth0 one.

Offline

#4 2013-09-05 07:03:12

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] netctl problem with open wireless

Just because the profile is auto-generated doesn't mean that it is not necessarily wrong.  If you spend any mount of time around these forums, you will see that there are still some bugs to work out with some of the things that wifi-menu generates.  But I also see you tried with standard quoting.

Looking over that output again, are you also trying to run dhcpcd separately (either from the command line or by starting/enabling dhcpcd.service)?  If so, this will defintiely cause conflicts.  On top of that, it seems that dhcpcd is somehow being run as a normal user, which will definitely not give it the necessary permissions to access the devices.

Offline

#5 2013-09-05 07:25:29

zech
Member
Registered: 2013-09-05
Posts: 8

Re: [solved] netctl problem with open wireless

I did run "sudo dhcpcd" to get eth0 connection. but stopping it makes no difference. what do you suggest to do? thanks.

Offline

#6 2013-09-05 15:50:32

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] netctl problem with open wireless

Make sure that the only thing trying to handle your network is netctl.  That is, don't use anything like dhcpcd manually.  Netctl is just a set of shell scripts that are meant to handle your cennection to wireless or wired interfaces.  But you cannot use dhcp on both of them at once, as this will cause conflict in what wants to write the info in /etc/resolv.conf which tells the system what nameservers (DNS) to use.

So try doing only the netctl part.  I would recommend hand writing the config.  Copy the appropriate example from /etc/netctl/examples to /etc/netctl/<whatever> (where <whatever> is the name of your profile, which can be anything you want... but try to avoid dashes '-').  Then fill it out and then do only netctl start <whatever>.  Then if it doesn't work, post the journal's output.

Since netctl is just a wrapper around a few basic tools, it is often a good debugging tactic to use those tools directly to get a better idea of what is failing.  So if you go to the Arch Wiki's wireless page, there should be info about how to use wpa_supplicant/wpa_passphrase and dhcpcd (or dhclient) directly.  So you should be able to pretty easily go through those steps and get some really good output at the point of failure.  If failure occurs, post the results here.  Include the exact error messages (the first post's journalctl -xn output was nice).

Offline

#7 2013-09-05 19:36:01

zech
Member
Registered: 2013-09-05
Posts: 8

Re: [solved] netctl problem with open wireless

I stopped dhcpd and rewrite the profile:

$ cat ucb2
Description='ucb wireless'
Interface=wlp0s26f7u3
Connection=wireless
Security=none
ESSID='UCB Wireless'
IP=dhcp
# Uncomment this if your ssid is hidden
#Hidden=yes

still no luck. the journalctl report is irrelevant

$ journalctl -xn
Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.
-- Logs begin at Tue 2013-09-03 23:33:50 MDT, end at Thu 2013-09-05 12:36:48 MDT. --
Sep 04 20:50:17 abraham dhcpcd[669]: enp0s25: if_init: Permission denied
Sep 04 21:48:29 abraham sudo[22162]: pam_unix(sudo:auth): conversation failed
Sep 05 00:22:44 abraham su[29452]: (to zech) zech on none
Sep 05 00:22:44 abraham su[29452]: pam_unix(su:session): session opened for user root by (uid=1000)
Sep 05 00:23:24 abraham su[29452]: pam_unix(su:session): session closed for user root
Sep 05 00:54:10 abraham sudo[9870]: pam_unix(sudo:auth): authentication failure; logname= uid=1000 euid=0 tty=/dev/pts/0 ruser=zech rhost=  user=zech
Sep 05 01:53:19 abraham xscreensaver[1116]: pam_unix(xscreensaver:auth): conversation failed
Sep 05 01:53:19 abraham xscreensaver[1116]: pam_unix(xscreensaver:auth): auth could not identify password for [zech]
Sep 05 12:36:48 abraham xscreensaver[1116]: pam_unix(xscreensaver:auth): conversation failed
Sep 05 12:36:48 abraham xscreensaver[1116]: pam_unix(xscreensaver:auth): auth could not identify password for [zech]

Here is the systemctl status:

$ systemctl status netctl@ucb2.service
netctl@ucb2.service - Networking for netctl profile ucb2
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static)
   Active: failed (Result: exit-code) since Thu 2013-09-05 12:57:03 MDT; 2min 40s ago
     Docs: man:netctl.profile(5)
  Process: 31118 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

Then I went thru manual setup following the Arch wireless wiki. I am able to connect

$ iw wlp0s26f7u3 connect "UCB Wireless"
$ iw wlp0s26f7u3 set type managed  # should I used managed mode here? or monitor, wds, ibss? I am pretty ignorant on network
$ dhcpcd wlp0s26f7u3

Just curious,  why there are no wifi statistics reported by this command?

$ iw dev wlp0s26f7u3 station dump
$

Last edited by zech (2013-09-05 20:47:05)

Offline

#8 2013-09-05 23:27:21

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] netctl problem with open wireless

Your Journal wrote:

$ journalctl -xn
Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.

This is probably why you are not getting relevant information from your journal output.  You need to either have your user in the systemd-journal group, or you need to run the command as root.

Offline

#9 2013-09-06 01:06:27

zech
Member
Registered: 2013-09-05
Posts: 8

Re: [solved] netctl problem with open wireless

You're right - here is the log

$ sudo journalctl -xn
-- Logs begin at Tue 2013-09-03 21:18:59 MDT, end at Thu 2013-09-05 18:27:07 MDT. --
Sep 05 18:27:02 abraham systemd[1]: Starting Networking for netctl profile ucb2...
-- Subject: Unit netctl@ucb2.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit netctl@ucb2.service has begun starting up.
Sep 05 18:27:02 abraham network[32160]: Starting network profile 'ucb2'...
Sep 05 18:27:02 abraham network[32160]: /usr/lib/network/globals: line 66: wpa_supplicant: command not found
Sep 05 18:27:03 abraham network[32160]: The WPA supplicant did not start for interface 'wlp0s26f7u3'
Sep 05 18:27:03 abraham network[32160]: Failed to bring the network up for profile 'ucb2'
Sep 05 18:27:03 abraham systemd[1]: netctl@ucb2.service: main process exited, code=exited, status=1/FAILURE
Sep 05 18:27:03 abraham systemd[1]: Failed to start Networking for netctl profile ucb2.
-- Subject: Unit netctl@ucb2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
-- 
-- Unit netctl@ucb2.service has failed.
-- 
-- The result is failed.
Sep 05 18:27:03 abraham systemd[1]: Unit netctl@ucb2.service entered failed state.
Sep 05 18:27:03 abraham sudo[32154]: pam_unix(sudo:session): session closed for user root
Sep 05 18:27:07 abraham sudo[32222]: zech : TTY=pts/0 ; PWD=/etc/netctl ; USER=root ; COMMAND=/usr/bin/journalctl -xn

It seems netctl depends on wpa_supplicant? if so why it's not installed when I install netctl?

Offline

#10 2013-09-06 01:16:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] netctl problem with open wireless

Check the output of pacman -Qi wpa_supplicant.  Is it there? 

I just checked, and wpa_supplicant is an optional dependency as it is only required in order to use wireless networking.  I guess netctl can potentially connect to a wired network with a static IP with only the default dpendencies.  I am pretty sure it used to be a hard dep, but I guess it actually does make more sense set up this way.

So install it!

Offline

#11 2013-09-06 01:20:54

zech
Member
Registered: 2013-09-05
Posts: 8

Re: [solved] netctl problem with open wireless

I just did it. It seems working now. thanks a lot for your help. I appreciate it.

Offline

#12 2013-09-06 01:22:17

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] netctl problem with open wireless

Neato!  Please mark the thread as [Solved].  You can do this by editing the first post.

I am going to lodge into the back of my brain the fact that wpa_spplicant is now an optional dep.

Offline

Board footer

Powered by FluxBB