Yesterday, I upgraded packages on my Arch Linux system. Today, I noticed that the VPN refused to connect. There were no error messages, but the dialog to enter the password didn’t appear. I discovered that Arch Linux (and possibly most modern Linux distributions) no longer uses `/var/log/syslog` or `/var/log/messages`.
To debug, I used the following command (https://wiki.archlinux.org/title/Systemd/Journal#Filtering_output):
journalctl --since "2 min ago"
I found the error:
Jan 10 15:45:56 myarch NetworkManager[487]: <warn> ... secrets: failed to request VPN secrets #3: No agents were available for this request.
I searched Google for the error and came across these helpful links:
- Unix Stack Exchange: Failed to request VPN secrets #3
- Arch Linux Forums: Failed to request VPN secrets
The solution I found was to "Store the password for all users." In my case, this translates to the following steps:
1. Open Network Settings.
2. Edit the VPN connection.
3. Go to the Identity section.
4. Click the dropdown to the right of the password field.
5. Select Store the password for all users.
Additionally, I discovered that logs specific to NetworkManager can be viewed with:
journalctl -u NetworkManager
I also found that I can see all NetworkManager connections using nmcli command or listing the content of the directory /etc/NetworkManager/system-connections/. Then try to start that connection:
nmcli conn up <my-vpn-config>
Then I saw this message
You need to authenticate to access the Virtual Private Network “my-vpn-config”.
Warning: password for 'vpn.secrets.password' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
Error: Connection activation failed: No valid secrets
Hint: use 'journalctl -xe NM_CONNECTION=453a0f43-dc10-4557-b524-a762c99833d4 + NM_DEVICE=wlp3s0' to get more details.
Thus
nmcli conn up <my-vpn-config> --ask
also solved the issue.
A more general solution
sudo pacman -S gnome-keyring