You are not logged in.

#1 2015-02-06 22:56:22

rollypolio
Member
Registered: 2015-02-01
Posts: 25

[Solved] Cannot connect with wifi-menu after login

I can't connect to the internet after I login.  When I try to connect, it says:

Job for netctl@my\x2dnetwork.service failed. See "systemctl status 'netctl@my\x2dnetwork.service'" and "journalctl -xe" for details.

#systemctl status 'netctl@my\x2dnetwork.service'
● netctl@my\x2dnetwork.service - A simple WPA encrypted wireless connection
   Loaded: loaded (/etc/systemd/system/netctl@my\x2dnetwork.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2015-02-06 16:37:35 CST; 1min 23s ago
     Docs: man:netctl.profile(5)
  Process: 574 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
 Main PID: 574 (code=exited, status=1/FAILURE)

Feb 06 16:37:35 mac network[574]: Starting network profile 'my-network'...
Feb 06 16:37:35 mac network[574]: The interface of network profile 'my-network' is already up
Feb 06 16:37:35 mac systemd[1]: netctl@my\x2dnetwork.service: main process exited, code=exited, status=1/FAILURE
Feb 06 16:37:35 mac systemd[1]: Failed to start A simple WPA encrypted wireless connection.
Feb 06 16:37:35 mac systemd[1]: Unit netctl@my\x2dnetwork.service entered failed state.
Feb 06 16:37:35 mac systemd[1]: netctl@my\x2dnetwork.service failed.

#journalctl -xe
Feb 06 16:37:17 mac dbus[217]: [system] Activating via systemd: service name='org.freedesktop.UDisks2' unit='udisks2.service'
Feb 06 16:37:17 mac udisksd[436]: udisks daemon version 2.1.3 starting
Feb 06 16:37:17 mac dbus[217]: [system] Successfully activated service 'org.freedesktop.UDisks2'
Feb 06 16:37:17 mac udisksd[436]: Acquired the name org.freedesktop.UDisks2 on the system message bus
Feb 06 16:37:18 mac polkitd[271]: Registered Authentication Agent for unix-session:c2 (system bus name :1.29 [/usr/lib/polkit-gnome/polkit-gnome-authen
Feb 06 16:37:18 mac dbus[217]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
Feb 06 16:37:18 mac avahi-daemon[481]: Found user 'avahi' (UID 84) and group 'avahi' (GID 84).
Feb 06 16:37:18 mac avahi-daemon[481]: Successfully dropped root privileges.
Feb 06 16:37:18 mac avahi-daemon[481]: avahi-daemon 0.6.31 starting up.
Feb 06 16:37:18 mac avahi-daemon[481]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Feb 06 16:37:18 mac dbus[217]: [system] Successfully activated service 'org.freedesktop.Avahi'
Feb 06 16:37:18 mac avahi-daemon[481]: Successfully called chroot().
Feb 06 16:37:18 mac avahi-daemon[481]: Successfully dropped remaining capabilities.
Feb 06 16:37:18 mac avahi-daemon[481]: Loading service file /services/sftp-ssh.service.
Feb 06 16:37:18 mac avahi-daemon[481]: Loading service file /services/ssh.service.
Feb 06 16:37:18 mac avahi-daemon[481]: Network interface enumeration completed.
Feb 06 16:37:18 mac avahi-daemon[481]: Registering HINFO record with values 'X86_64'/'LINUX'.
Feb 06 16:37:18 mac avahi-daemon[481]: Server startup complete. Host name is mac.local. Local service cookie is 1997621208.
Feb 06 16:37:18 mac avahi-daemon[481]: Service "mac" (/services/ssh.service) successfully established.
Feb 06 16:37:18 mac avahi-daemon[481]: Service "mac" (/services/sftp-ssh.service) successfully established.
Feb 06 16:37:30 mac sudo[510]: mac : TTY=pts/0 ; PWD=/home/mac ; USER=root ; COMMAND=/usr/bin/wifi-menu
Feb 06 16:37:30 mac sudo[510]: pam_unix(sudo:session): session opened for user root by mac(uid=0)
Feb 06 16:37:35 mac network[574]: Starting network profile 'my-network'...
Feb 06 16:37:35 mac network[574]: The interface of network profile 'my-network' is already up
Feb 06 16:37:35 mac systemd[1]: netctl@my\x2dnetwork.service: main process exited, code=exited, status=1/FAILURE
Feb 06 16:37:35 mac systemd[1]: Failed to start A simple WPA encrypted wireless connection.
-- Subject: Unit netctl@my\x2dnetwork.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit netctl@my\x2dnetwork.service has failed.
-- 
-- The result is failed.
Feb 06 16:37:35 mac systemd[1]: Unit netctl@my\x2dnetwork.service entered failed state.
Feb 06 16:37:35 mac systemd[1]: netctl@my\x2dnetwork.service failed.
Feb 06 16:37:35 mac sudo[510]: pam_unix(sudo:session): session closed for user root
Feb 06 16:37:48 mac dbus[217]: [system] Activating via systemd: service name='org.freedesktop.NetworkManager' unit='dbus-org.freedesktop.NetworkManager
Feb 06 16:37:48 mac dbus[217]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.NetworkManager.service': Unit dbus-org.freedesktop
Feb 06 16:37:50 mac logger[626]: ACPI action undefined: PNP0C0A:00
Feb 06 16:38:31 mac logger[653]: ACPI action undefined: PNP0C0A:00
Feb 06 16:39:13 mac logger[657]: ACPI action undefined: PNP0C0A:00

When I ip link set ... down, I wifi-menu and it connects.  No need to ip link set ... up.

Here's my /etc/systemd/system/netctl\@my\\x2dnetwork.service as mentioned above.

.include /usr/lib/systemd/system/netctl@.service

[Unit]
Description=A simple WPA encrypted wireless connection
BindsTo=sys-subsystem-net-devices-wlp4s0.device
After=sys-subsystem-net-devices-wlp4s0.device

Not sure if this is relevant.  Also mentioned above.  This is /usr/lib/network/network.

#! /bin/bash

. /usr/lib/network/globals


## Check if a string represents a network interface
# $1: potential interface name
is_interface() {
    # Strip any old school alias specifier
    [[ -d "/sys/class/net/${1%%:?*}" ]]
}

## Add an interface
# $1: interface type
# $2: interface name
# $3: interface link (optional)
# $4...: additional arguments
interface_add() {
    local type="$1" name="$2" link="$3"
    do_debug ip link add ${link:+link "$link"} name "$name" type "$type" "${@:4}" || return
    if [[ -x "$PROFILE_DIR/interfaces/$name" ]]; then
        source "$PROFILE_DIR/interfaces/$name"
    fi
}

## Delete an interface
# $1: interface name
interface_delete() {
    bring_interface_down "$1"
    ip link delete "$1"
}

## Check if an interface is up
# $1: interface name
interface_is_up() {
    local flags
    read flags < "/sys/class/net/${1%%:?*}/flags"
    # IFF_UP is defined as 0x1 in linux/if.h
    (( flags & 0x1 ))
}

## Activate an interface
# $1: interface name
bring_interface_up() {
    local interface=$1
    ip link set dev "$interface" up &>/dev/null
    timeout_wait "${TimeoutUp:-5}" 'interface_is_up "$interface"'
}

## Deactivate an interface
# $1: interface name
bring_interface_down() {
    local interface=$1
    ip link set dev "$interface" down &>/dev/null
    # We reuse the up timeout (down normally is faster)
    timeout_wait "${TimeoutUp:-5}" '! interface_is_up "$interface"'
}


if [[ $# -ne 2 || $1 != @(start|stop) ]]; then
    exit_error "Usage: $0 {start|stop} <profile>"
fi
ensure_root netctl
# Ensure we are not in a transient directory
cd /

# Expose the profile name
Profile=$2
load_profile "$Profile"
case $1 in
  start)
    report_notice "Starting network profile '$Profile'..."
    if is_interface "$Interface" && interface_is_up "$Interface" && \
       ! is_yes "${ForceConnect:-no}"; then
        report_error "The interface of network profile '$Profile' is already up"
        exit 1
    fi
    if ! "${Connection}_up"; then
        report_error "Failed to bring the network up for profile '$Profile'"
        exit 1
    fi
    # JP: sandbox the eval
    if ! ( eval $ExecUpPost ); then
        report_error "ExecUpPost failed for network profile '$Profile'"
        # Failing ExecUpPost will take the connection down
        "${Connection}_down"
        exit 1
    fi
    report_notice "Started network profile '$Profile'"
  ;;
  stop)
    report_notice "Stopping network profile '$Profile'..."
    # JP: sandbox the eval
    if ! ( eval $ExecDownPre ); then
        report_error "ExecDownPre failed for network profile '$Profile'"
        # Failing ExecDownPre will leave the profile active
        exit 1
    fi
    if ! "${Connection}_down"; then
        report_error "Failed to bring the network down for profile '$Profile'"
        exit 1
    fi
    if is_interface "$Interface" && interface_is_up "$Interface" && \
       ! is_yes "${ForceConnect:-no}"; then
        report_error "The interface of network profile '$Profile' did not go down"
        exit 1
    fi
    report_notice "Stopped network profile '$Profile'"
  ;;
esac

Last edited by rollypolio (2015-02-07 16:37:01)

Offline

#2 2015-02-07 07:01:35

samtech09
Member
Registered: 2014-12-10
Posts: 50

Re: [Solved] Cannot connect with wifi-menu after login

Offline

#3 2015-02-07 11:26:54

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [Solved] Cannot connect with wifi-menu after login

rollypolio wrote:

Here's my /etc/systemd/system/netctl\@my\\x2dnetwork.service as mentioned above.

.include /usr/lib/systemd/system/netctl@.service

[Unit]
Description=A simple WPA encrypted wireless connection
BindsTo=sys-subsystem-net-devices-wlp4s0.device
After=sys-subsystem-net-devices-wlp4s0.device

How was this file generated?

Offline

#4 2015-02-07 15:34:40

rollypolio
Member
Registered: 2015-02-01
Posts: 25

Re: [Solved] Cannot connect with wifi-menu after login

Head_on_a_Stick wrote:
rollypolio wrote:

Here's my /etc/systemd/system/netctl\@my\\x2dnetwork.service as mentioned above.

.include /usr/lib/systemd/system/netctl@.service

[Unit]
Description=A simple WPA encrypted wireless connection
BindsTo=sys-subsystem-net-devices-wlp4s0.device
After=sys-subsystem-net-devices-wlp4s0.device

How was this file generated?

$cat /etc/systemd/system/netctl\@my\\x2dnetwork.service

Is that what you meant? Otherwise I don't rightly know.

Offline

#5 2015-02-07 15:50:00

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [Solved] Cannot connect with wifi-menu after login

rollypolio wrote:

Is that what you meant?

No.

How did you set up that netctl profile?

I have some netctl profiles on my system but they are under /etc/netctl/ with the .service file located at /usr/lib/systemd/system/netctl@.service

I haven't used netctl for a while so I could be mistaken here but I think you may have set it up wrongly.

https://wiki.archlinux.org/index.php/Ne … figuration

Offline

#6 2015-02-07 16:25:45

rollypolio
Member
Registered: 2015-02-01
Posts: 25

Re: [Solved] Cannot connect with wifi-menu after login

I honestly don't remember.  I believe I was trying to set up i3status dhcp at the time.  Could have been the DHCP configuration file I created at /etc/systemd/network that broke my netctl configuration.  I should have mentioned that first.  I broke the internet and walked away two days ago and it's slowly coming back to me.  I don't follow the relation between systemd, netctl, and dhcp configuration so I'm sorry if I'm not picking up on solutions provided in your links.

I commented the file out right after I started receiving those errors.

$cat /etc/systemd/network/MyDhcp.network
#[Match]
#Name=wlp4s0
#[Network]
#DHCP=v4

$ls -la /etc/systemd/network/MyDhcp.network
drwxr-xr-x 2 root root 4096 Feb  6 09:29 .
drwxr-xr-x 5 root root 4096 Feb  5 20:15 ..
-rw-r--r-- 1 root root   43 Feb  6 09:29 MyDhcp.network
$cat /etc/netctl/my-network
Description='A simple WPA encrypted wireless connection'
Interface=wlp4s0
Connection=wireless
Security=wpa
IP=dhcp
ESSID='ap_becca'
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='*********'
# Uncomment this if your ssid is hidden
#Hidden=yes
# Set a priority for automatic profile selection
#Priority=10
#cat /etc/netctl/wlp4s0-Nexxt_5F6CB8
Description='Automatically generated profile by wifi-menu'
Interface=wlp4s0
Connection=wireless
Security=none
ESSID=Nexxt_5F6CB8
IP=dhcp
#cat /etc/netctl/wlp4s0-SJBS
Description='Automatically generated profile by wifi-menu'
Interface=wlp4s0
Connection=wireless
Security=wpa
ESSID=SJBS
IP=dhcp
Key=********

I noticed the first profile does not require sudo.

$ ls -la
total 32
drwxr-xr-x  5 root root 4096 Feb  2 09:32 .
drwxr-xr-x 81 root root 4096 Feb  7 09:42 ..
drwxr-xr-x  2 root root 4096 Jan 31 22:50 examples
drwxr-xr-x  2 root root 4096 Jan 13 07:23 hooks
drwxr-xr-x  2 root root 4096 Jan 13 07:23 interfaces
-rw-r--r--  1 root root  422 Jan 31 22:52 my-network
-rw-------  1 root root  138 Feb  2 09:32 wlp4s0-Nexxt_5F6CB8
-rw-------  1 root root  145 Feb  2 06:36 wlp4s0-SJBS

I hope this helps.

Which one should I be looking at?:

$ls /usr/lib/systemd/system/ | grep netctl
netctl-auto@.service
netctl-ifplugd@.service
netctl.service
netctl@.service
netctl-sleep.service

To repeat myself, I can connect using wifi-menu after I ip link set wlp4s0 down.  I'm just looking for a fix so I can set up automatic connections.

EDIT: I deleted /etc/systemd/network/MyDhcp.network and now it works at startup.  Any idea why a commented out file would be having an adverse effect like this?

Last edited by rollypolio (2015-02-07 16:41:41)

Offline

#7 2015-02-07 16:53:35

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [Solved] Cannot connect with wifi-menu after login

I really cannot follow your reasoning in the post above; I recommend you read the wiki pages about netctl & systemd.

Files under /etc/systemd/network are used to set up systemd-networkd -- see man 5 systemd.networkd

Offline

#8 2015-03-25 05:26:32

rollypolio
Member
Registered: 2015-02-01
Posts: 25

Re: [Solved] Cannot connect with wifi-menu after login

My internet cut out altogether a few days ago, so I fiddled until, eureka! I started netctl-auto@wlp4s0 and presto, the internet! I enabled it and it's worked ever since.  I believe I was trying to

#systemctl start netctl-auto@wlp4s0-<profile>

in the past. When I dropped the "-<profile>" it worked. I have automatic profile selection between networks. Marking solved.

Offline

Board footer

Powered by FluxBB