Mullvad VPN system service can't be contacted

Hello,
I installed Mullvad VPN on my Plasma (Wayland) after a certain time I’ve been using it with big satisfaction.

First I tried the package “mullvad-vpn 2024.1-1” from AUR, but I had an error of compilation I couldn’t solve, so I tried “mullvad-vpn-bin 2024.1-1” and the compilation got completed.

But now when I start the app, it is stuck on the classic “Mullvad Vpn Connecting to Mullvad system service. Unable to contact the Mullvad system service, your connection might be unsecure”.

Of course I started the service by:

$ sudo systemctl enable mullvad-daemon.service

$ sudo systemctl start mullvad-daemon.service

On the site of Mullvad for this kind of error I find a:

$ sudo /usr/bin/mullvad-daemon -v
or

shell script mullvad-vpn
/opt/Mullvad VPN/mullvad-vpn" %U

But still no success.

When I:

$ sudo systemctl status mullvad-daemon.service

I got

● mullvad-daemon.service - Mullvad VPN daemon
     Loaded: loaded (/usr/lib/systemd/system/mullvad-daemon.service; enabled; preset: disabled)
     Active: active (running) since Fri 2024-04-19 14:20:44 CEST; 52min ago
   Main PID: 680 (mullvad-daemon)
      Tasks: 13 (limit: 11798)
     Memory: 16.9M (peak: 17.7M)
        CPU: 69ms
     CGroup: /system.slice/mullvad-daemon.service
             └─680 /usr/bin/mullvad-daemon -v --disable-stdout-timestamps

avril 19 14:21:00 End mullvad-daemon[680]: Caused by: Network is unreachable (os error 101)
avril 19 14:21:00 End mullvad-daemon[680]: [mullvad_daemon::api][INFO] A new API access method has been select>
avril 19 14:21:00 End mullvad-daemon[680]: [mullvad_daemon::management_interface][DEBUG] Broadcasting access m>
avril 19 14:21:00 End mullvad-daemon[680]: [mullvad_daemon::management_interface][DEBUG] Broadcasting access m>
avril 19 14:21:06 End mullvad-daemon[680]: [mullvad_api::access][DEBUG] Fetching access token for an account
avril 19 14:21:06 End mullvad-daemon[680]: [mullvad_api::availability][DEBUG] Resuming background API requests
avril 19 14:21:07 End mullvad-daemon[680]: [mullvad_relay_selector::updater][DEBUG] Writing relays cache to /v>
avril 19 14:21:07 End mullvad-daemon[680]: [mullvad_relay_selector][INFO] Updated relay inventory has 664 rela>
avril 19 14:21:07 End mullvad-daemon[680]: [mullvad_daemon::management_interface][DEBUG] Broadcasting new rela>
avril 19 14:35:49 End mullvad-daemon[680]: [mullvad_api::rest][DEBUG] Fetched new API address 45.83.223.196:44>
lines 1-20/20 (END)

So the daemon is enabled and started.

Since I see that many of you use Mullvad VPN with satisfaction, would you please help me to understand where I’m failing?

Thank you for your help.

By any chance, is your firewall blocking connections?

How can I check It?
Should I disable it?

Just use the “mullvad-vpn-bin”, that doesn’t require any compiling.

I did it.
But it is interesting the question about the firewall as prospected by @flyingcakes

I guess I misread part of your post. If you are using the default firewall configuration it isn’t configured to block outgoing connections.

You mean that the firewall is not the problem here?

I’m saying if you are using the default firewall configuration on EndeavourOS, then the firewall on your local installation isn’t the problem. You can still just verify it by stopping your firewall and then try connect to Mullvad vpn again.

Ok, I check right now. How can I just stop the firewall? By terminal?

Yes.
sudo systemctl stop firewalld

You were right. The firewall is not a problem.
You have an idea of what it could be?

If you have working internet connection your installation, maybe your Maybe your ISP is blocking connections going towards Mullvad vpn servers. What you could do is trying to connect mobile phone with a hotspot and see if you are able to setup a vpn connection then.

Thank you for helping.
It’s not my ISP.
Even with the line given by the hotspot of my phone the app doesn’t work.

What happens when you try to create a secure connection using the Mullvad app from EndeavorOS?

I don’t understand I’m sorry.
I start the app and is kind of frozen on unable to connect.
I have no line, and even if I close the app, I have no line. I need to restart the system to have again line.

Delete your Mullvad config and disable the service.

From the Mullvad website (current method):

How do I enable the kill switch? #

The app has a built in kill switch that is enabled by default and cannot be disabled. This is to prevent your traffic from leaking outside of the VPN tunnel if your network suddenly stops working or if the tunnel fails for any reason. Mullvad automatically protects your data until your connection is reestablished.

And furthermore: (from 2019)

Fourth (4): Traffic can go outside our VPN tunnel ONLY if you are disconnected. However, if you activated the “block when disconnected” setting, no traffic will leave your device (except connection attempts to establish a VPN connection), even if you turn off the app! Change your default settings for constant privacy.

In other words, once the service is enabled, you must use Mullvad to connect to the internet. It is a recent-ish change. Been over a year, I think.

Ok I try.
Where are the files of the configuration?
I disable the daemon of the service?
After that I reopen the app?
Thank you

Under $HOME/.config/Mullvad VPN, so if you delete the “Mullvad VPN” directory under $HOME/.config you will have deleted the Mullvad config.

If I start the script “mullvad-vpn” in “/opt/Mullvad VPN” by the console, I get a bad output.

I think here is the problem, but I can’t understand, because I’m technically limited:


[2024-04-19 20:03:06.015][verbose] Chromium sandbox is enabled
[2024-04-19 20:03:06.016][info] Running version 2024.1
[2024-04-19 20:03:06.264][info] Detected locale: en
[2024-04-19 20:03:06.443][info] Connected to the daemon
[2024-04-19 20:03:06.613][error] Cannot deserialize the daemon event: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:06.615][warning] Failed to fetch account data. Retrying in 8000 ms
[2024-04-19 20:03:06.616][warning] Failed to update device info: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:06.618][verbose] GRPC Channel connectivity state changed to 0
[2024-04-19 20:03:06.621][info] Disconnected from the daemon
[2024-04-19 20:03:06.627][error] Failed to fetch relay locations: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:07.415][error] Failed to check autostart file: ENOENT: no such file or directory, access ‘/ho
me/palanoleroy/.config/autostart/mullvad-vpn.desktop’
[2024-04-19 20:03:09.627][info] Connected to the daemon
[2024-04-19 20:03:09.645][error] Cannot deserialize the daemon event: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:09.646][warning] Failed to fetch account data. Retrying in 8000 ms
[2024-04-19 20:03:09.646][warning] Failed to update device info: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:09.646][verbose] GRPC Channel connectivity state changed to 0
[2024-04-19 20:03:09.647][info] Disconnected from the daemon
[2024-04-19 20:03:09.648][error] Failed to fetch relay locations: 1 CANCELLED: Call cancelled
[3426:0419/200311.145381:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed f
or 1 times!
[2024-04-19 20:03:12.649][info] Connected to the daemon
[2024-04-19 20:03:12.671][error] Cannot deserialize the daemon event: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:12.672][warning] Failed to fetch account data. Retrying in 8000 ms
[2024-04-19 20:03:12.672][warning] Failed to update device info: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:12.672][verbose] GRPC Channel connectivity state changed to 0
[2024-04-19 20:03:12.673][info] Disconnected from the daemon
[2024-04-19 20:03:12.674][error] Failed to fetch relay locations: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:15.674][info] Connected to the daemon
[2024-04-19 20:03:15.692][error] Cannot deserialize the daemon event: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:15.692][warning] Failed to fetch account data. Retrying in 8000 ms
[2024-04-19 20:03:15.692][warning] Failed to update device info: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:15.693][verbose] GRPC Channel connectivity state changed to 0
[2024-04-19 20:03:15.693][info] Disconnected from the daemon
[2024-04-19 20:03:15.694][error] Failed to fetch relay locations: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:18.696][info] Connected to the daemon
[2024-04-19 20:03:18.714][error] Cannot deserialize the daemon event: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:18.715][warning] Failed to fetch account data. Retrying in 8000 ms
[2024-04-19 20:03:18.715][warning] Failed to update device info: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:18.715][verbose] GRPC Channel connectivity state changed to 0
[2024-04-19 20:03:18.716][info] Disconnected from the daemon
[2024-04-19 20:03:18.717][error] Failed to fetch relay locations: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:21.718][info] Connected to the daemon
[2024-04-19 20:03:21.734][error] Cannot deserialize the daemon event: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:21.734][warning] Failed to fetch account data. Retrying in 8000 ms
[2024-04-19 20:03:21.734][warning] Failed to update device info: 1 CANCELLED: Call cancelled
[2024-04-19 20:03:21.735][verbose] GRPC Channel connectivity state changed to 0
[2024-04-19 20:03:21.735][info] Disconnected from the daemon
[2024-04-19 20:03:21.736][error] Failed to fetch relay locations: 1 CANCELLED: Call cancelled
(node:3387) UnhandledPromiseRejectionWarning: Error: No connection established to daemon
at Object. (/opt/Mullvad VPN/resources/app.asar/build/src/main/daemon-rpc.js:41:27)
at Module._compile (node:internal/modules/cjs/loader:1271:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1326:10)
at Module.load (node:internal/modules/cjs/loader:1126:32)
at Module._load (node:internal/modules/cjs/loader:967:12)
at l._load (node:electron/js2c/asar_bundle:2:13642)
at Module.require (node:internal/modules/cjs/loader:1150:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object. (/opt/Mullvad VPN/resources/app.asar/build/src/main/index.js:46:22)
at Module._compile (node:internal/modules/cjs/loader:1271:14)
(Use mullvad-gui --trace-warnings ... to show where the warning was created)
(node:3387) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by thro
wing inside of an async function without a catch block, or by rejecting a promise which was not handled with .c
atch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections= strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
[2024-04-19 20:03:31.736][error] Failed to connect to daemon: Failed to connect before the deadline
[2024-04-19 20:03:31.736][error] Failed to reconnect - Error: Failed to connect before the deadline
[3426:0419/200337.547498:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed f
or 2 times!
[2024-04-19 20:03:44.739][error] Failed to connect to daemon: Failed to connect before the deadline
[2024-04-19 20:03:44.740][error] Failed to reconnect - Error: Failed to connect before the deadline
[2024-04-19 20:03:57.741][error] Failed to connect to daemon: Failed to connect before the deadline
[2024-04-19 20:03:57.742][error] Failed to reconnect - Error: Failed to connect before the deadline
[2024-04-19 20:04:10.743][error] Failed to connect to daemon: Failed to connect before the deadline
[2024-04-19 20:04:10.743][error] Failed to reconnect - Error: Failed to connect before the deadline


What do you think?

What if you install the Mullvad app on your phone, connect to your home wifi and then try to connect to Mullvad VPN, what happens then?