Nordvpn 3.16.5 has a sock problem  [Solved]

Message
Author
bitfikler
Posts: 83
Joined: Tue Mar 06, 2018 7:04 pm

Nordvpn 3.16.5 has a sock problem  [Solved]

#1 Post by bitfikler »

Hi all!

Lately I have had a great time trying to educate support at NordVPN. For one thing they do not know anything (it seems) about MX Linux.

It all started when i got the dreaded error

Code: Select all

Whoops! /run/nordvpn/nordvpnd.sock not found.
The strange thing is that this happened every time I reboot my computer and try to connect to NordVPN.

So I reported this to NordVPN support and they kept suggesting turning of this and turning off that by cut'n paste from their support pages. And they don't get it that MX is not running under systemd...
I repeatedly informed them about that but in vain.

Finally I got fed up at checked MX Forum and found I could run

Code: Select all

sudo service nordvpn restart
Now I got somewhere! I got an error message as follows:

Code: Select all

Restarting /usr/sbin/nordvpnd: nordvpn/etc/init.d/nordvpn: line 41: /var/log/nordvpn/daemon.log: No such file or directory
failed!
So I checked etc/init.d/nordvpn and /var/log/
I had no folder /var/log/nordvpn and no file daemon.log

So I checked the /etc/init.d/nordvpn and foud that in line 41 the script tries to write to the file /var/log/nordvpn/daemon.log
here's the first lines of the script

Code: Select all

#!/usr/bin/env bash

### BEGIN INIT INFO
# Provides:          nordvpn
# Required-Start:    $network $local_fs $remote_fs
# Required-Stop:     $network $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Protect your privacy online and access media content with no regional restrictions. Strong encryption and no-log policy with 3000+ servers in 60+ countries.
### END INIT INFO

NAME=nordvpn
PIDFILE=/run/$NAME/$NAME.pid
DAEMON=/usr/sbin/${NAME}d
LOGFILE=/var/log/nordvpn/daemon.log
SOCKET_DIR=/run/$NAME
NORDVPN_GROUP="nordvpn"

[ -f /lib/init/vars.sh ] && . /lib/init/vars.sh
[ -f /lib/lsb/init-functions ] && . /lib/lsb/init-functions

create_socket_dir() {
  if [[ -d "$SOCKET_DIR" ]]; then
    return
  fi
  mkdir -m 0750 "$SOCKET_DIR"
  chown root:"$NORDVPN_GROUP" "$SOCKET_DIR"
}

#
# Function that starts the daemon
#
start() {
  create_socket_dir
  # Return
  #   0 if daemon has been started
  #   1 if daemon was already running
  #   2 if daemon could not be started
  start-stop-daemon --start --quiet -g "$NORDVPN_GROUP" --pidfile $PIDFILE --exec $DAEMON \
    --background --make-pidfile --no-close --test > /dev/null || return 1
  start-stop-daemon --start --quiet -g "$NORDVPN_GROUP" --pidfile $PIDFILE --exec $DAEMON \
    --background --make-pidfile --no-close >> $LOGFILE 2>&1 || return 2
}

The script fails because it does not check (or test) to see if the LOGFILE=/var/log/nordvpn/daemon.log exist.

As soon as I created the /nordvpn and the daemon.log - file the command

Code: Select all

sudo service nordvpn restart
exited without error and I could connect to NordVPN server!

NordVPN support does not listen to this and seemingly refuse to involve development so I have made myself a script to create the required folder and file if I need to.

Internet is full of great examples and solutions!


My system info:

Code: Select all

Snapshot created on: 20230618_1152
System:    Kernel: 5.16.0-5mx-amd64 [5.16.14-1~mx21+1] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.16.0-5mx-amd64 root=UUID=<filter> ro quiet 
           Desktop: Xfce 4.18.1 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.18.0 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.3_x64 Wildflower June 18  2023 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: LENOVO product: 20BHS04T05 v: ThinkPad W540 serial: <filter> 
           Chassis: type: 10 serial: <filter> 
           Mobo: LENOVO model: 20BHS04T05 v: 0B98401 Pro serial: <filter> UEFI-[Legacy]: LENOVO 
           v: GNET61WW (2.09 ) date: 02/18/2014 
Battery:   ID-1: BAT0 charge: 41.7 Wh (96.1%) condition: 43.4/56.2 Wh (77.4%) volts: 12.1 
           min: 10.8 model: SANYO 45N1769 type: Li-ion serial: <filter> status: Not charging 
           Device-1: hidpp_battery_0 model: Logitech Marathon Mouse/Performance Plus M705 
           serial: <filter> charge: 55% (should be ignored) rechargeable: yes status: Discharging 
CPU:       Info: Quad Core model: Intel Core i7-4800MQ bits: 64 type: MT MCP arch: Haswell 
           family: 6 model-id: 3C (60) stepping: 3 microcode: 28 cache: L2: 6 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 43096 
           Speed: 2192 MHz min/max: 800/3700 MHz Core speeds (MHz): 1: 2192 2: 1913 3: 1420 
           4: 1408 5: 1671 6: 1115 7: 1845 8: 983 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Lenovo driver: i915 
           v: kernel bus-ID: 00:02.0 chip-ID: 8086:0416 class-ID: 0300 
           Device-2: NVIDIA GK107GLM [Quadro K1100M] vendor: Lenovo driver: N/A alternate: nouveau 
           bus-ID: 01:00.0 chip-ID: 10de:0ff6 class-ID: 0300 
           Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo bus-ID: 2-12:4 
           chip-ID: 04ca:7035 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.14 compositor: xfwm4 v: 4.18.0 driver: 
           loaded: modesetting unloaded: fbdev,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
           s-diag: 582mm (22.9") 
           Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 142 size: 344x193mm (13.5x7.6") 
           diag: 394mm (15.5") 
           OpenGL: renderer: Mesa Intel HD Graphics 4600 (HSW GT2) v: 4.6 Mesa 22.0.5 
           compat-v: 3.1 direct render: Yes 
Audio:     Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Lenovo 
           driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c class-ID: 0403 
           Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Lenovo 
           driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20 class-ID: 0403 
           Device-3: NVIDIA GK107 HDMI Audio vendor: Lenovo driver: snd_hda_intel v: kernel 
           bus-ID: 01:00.1 chip-ID: 10de:0e1b class-ID: 0403 
           Sound Server-1: ALSA v: k5.16.0-5mx-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Ethernet I217-LM vendor: Lenovo driver: e1000e v: kernel port: 5080 
           bus-ID: 00:19.0 chip-ID: 8086:153a class-ID: 0200 
           IF: eth0 state: down mac: <filter> 
           Device-2: Intel Centrino Advanced-N 6235 driver: iwlwifi v: kernel modules: wl 
           port: 4000 bus-ID: 03:00.0 chip-ID: 8086:088f class-ID: 0280 
           IF: wlan0 state: up mac: <filter> 
           IF-ID-1: nordlynx state: unknown speed: N/A duplex: N/A mac: N/A 
Bluetooth: Device-1: Intel Centrino Bluetooth Wireless Transceiver type: USB driver: btusb v: 0.8 
           bus-ID: 2-11:3 chip-ID: 8087:07da class-ID: e001 
           Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 2.1 lmp-v: 4.0 
           sub-v: fc00 hci-v: 4.0 rev: 1ebd 
           Info: acl-mtu: 310:10 sco-mtu: 64:8 link-policy: rswitch hold sniff park 
           link-mode: slave accept service-classes: rendering, capturing, object transfer, audio 
Drives:    Local Storage: total: 2.04 TiB used: 955.22 GiB (45.8%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: SunEast model: SSD SE800 240GB size: 223.57 GiB 
           block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> 
           rev: KA.3 scheme: MBR 
           ID-2: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 870 EVO 2TB size: 1.82 TiB 
           block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> 
           rev: 2B6Q scheme: MBR 
Partition: ID-1: / raw-size: 78.12 GiB size: 76.35 GiB (97.73%) used: 52.8 GiB (69.2%) fs: ext4 
           dev: /dev/sdb1 maj-min: 8:17 
           ID-2: /home raw-size: 1.74 TiB size: 1.71 TiB (98.37%) used: 886.89 GiB (50.5%) 
           fs: ext4 dev: /dev/sdb3 maj-min: 8:19 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 9 MiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sdb2 
           maj-min: 8:18 
Sensors:   System Temperatures: cpu: 55.0 C mobo: N/A 
           Fan Speeds (RPM): fan-1: 2315 
Repos:     Packages: 2292 note: see --pkg apt: 2271 lib: 1131 flatpak: 21 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
           1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ bullseye main
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/megasync.list 
           1: deb [signed-by=/usr/share/keyrings/meganz-archive-keyring.gpg] https://mega.nz/linux/repo/Debian_11/ ./
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://ftp.acc.umu.se/mirror/mxlinux.org/packages/mx/repo/ bullseye main non-free
           2: deb http://ftp.acc.umu.se/mirror/mxlinux.org/packages/mx/repo/ bullseye ahs
           Active apt repos in: /etc/apt/sources.list.d/nordvpn.list 
           1: deb https://repo.nordvpn.com/deb/nordvpn/debian stable main
           Active apt repos in: /etc/apt/sources.list.d/opera-stable.list 
           1: deb https://deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases)
           Active apt repos in: /etc/apt/sources.list.d/signal-xenial-added-by-mxpi.list 
           1: deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main
           Active apt repos in: /etc/apt/sources.list.d/teamviewer.list 
           1: deb [signed-by=/usr/share/keyrings/teamviewer-keyring.gpg] https://linux.teamviewer.com/deb stable main
           Active apt repos in: /etc/apt/sources.list.d/vivaldi.list 
           1: deb [arch=amd64] https://repo.vivaldi.com/stable/deb/ stable main
Info:      Processes: 311 Uptime: 1h 42m wakeups: 6 Memory: 15.27 GiB used: 4.86 GiB (31.8%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: BIOS (legacy, CSM, MBR)
Greetings from

Bitfikler

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: Nordvpn 3.16.5 has a sock problem

#2 Post by fehlix »

bitfikler wrote: Sun Sep 10, 2023 4:23 pm

Code: Select all

Restarting /usr/sbin/nordvpnd: nordvpn/etc/init.d/nordvpn: line 41: /var/log/nordvpn/daemon.log: No such file or directory
failed!
So I checked etc/init.d/nordvpn and /var/log/
I had no folder /var/log/nordvpn and no file daemon.log
Thanks, for the report. We may fix the issue within MXPI->Populare package .. -> NordVPN by creating the missing log-directory before installing. So no need to bother to fix the failing sysvinit-script provided by NordVPN.

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: Nordvpn 3.16.5 has a sock problem

#3 Post by fehlix »

Just checked within MX-23 and MX-21.3.
Installing with MXPI->Populare Packages -> Network -> NordVPN
gives me in both cases a successful install and a running nordvpn daemon.

Code: Select all

$ nordvpn --version
NordVPN Version 3.16.5

$ sudo service nordvpn status
nordvpn is running.

$ sudo service nordvpn restart
Restarting /usr/sbin/nordvpnd: nordvpn.

$ sudo service nordvpn status
nordvpn is running.
The logfile is also created.:

Code: Select all

$ ll -d /var/log/nordvpn/
drwxr-x--- 2 root nordvpn 60 Sep 11 01:47 /var/log/nordvpn/

$ sudo ls -l /var/log/nordvpn/
total 4
-rw-r--r-- 1 root root 3944 Sep 11 01:47 daemon.log
So not sure, maybe you have not used MXPI but something else?

bitfikler
Posts: 83
Joined: Tue Mar 06, 2018 7:04 pm

Re: Nordvpn 3.16.5 has a sock problem

#4 Post by bitfikler »

Hi again!
Yes - I use only MXPI.
Still - when rebooting /var/log/nordvpn/ was somehow deleted. Not once but every time.

Have you tried installing - rebooting - checking for daemon.log in /var/log ?
Greetings from

Bitfikler

User avatar
fehlix
Developer
Posts: 12740
Joined: Wed Apr 11, 2018 5:09 pm

Re: Nordvpn 3.16.5 has a sock problem

#5 Post by fehlix »

bitfikler wrote: Mon Sep 11, 2023 3:43 am Hi again!
Yes - I use only MXPI.
Still - when rebooting /var/log/nordvpn/ was somehow deleted. Not once but every time.

Have you tried installing - rebooting - checking for daemon.log in /var/log ?
After reboot Nordvpn is here running and keeps the log:

Code: Select all

sudo service nordvpn status
nordvpn is running.

sudo find /var/log/nordvpn/ -ls
   370015      0 drwxr-x---   1 root     nordvpn        20 Sep 11 15:12 /var/log/nordvpn/
   370024     16 -rw-r--r--   1 root     root        12663 Sep 11 15:15 /var/log/nordvpn/daemon.log

User avatar
FinalFox420
Posts: 30
Joined: Mon Aug 14, 2023 10:06 pm

Re: Nordvpn 3.16.5 has a sock problem

#6 Post by FinalFox420 »

Strong encryption and no-log policy with 3000+ servers in 60+ countries.
lol
I don't know if "removing" the package clears out all the related files and configs (purge/autopurge maybe?)

Code: Select all

man apt
Removing a package removes all packaged data, but leaves usually
small (modified) user configuration files behind, in case the
remove was an accident. Just issuing an installation request for
the accidentally removed package will restore its function as
before in that case. On the other hand you can get rid of these
leftovers by calling purge even on already removed packages. Note
that this does not affect any data or configuration stored in your
home directory.

Code: Select all

apt purge nordvpn
reboot (prob not needed) then reinstall with MXPI.

You could also try changing the owner and permissions on the folder and files and setting the "sticky-bit" which allows files to be written to but not deleted.
This is a bandaid only should be used if above doesn't work.

Code: Select all

man chmod
RESTRICTED DELETION FLAG OR STICKY BIT
The restricted deletion flag or sticky bit is a single bit, whose in‐
terpretation depends on the file type. For directories, it prevents
unprivileged users from removing or renaming a file in the directory
unless they own the file or the directory; this is called the re‐
stricted deletion flag for the directory, and is commonly found on
world-writable directories like /tmp. For regular files on some older
systems, the bit saves the program's text image on the swap device so
it will load more quickly when run; this is called the sticky bit.
After creating files that get it to work.

Code: Select all

chmod a+t /var/log/nordvpn/
chown root -r /var/log/nordvpn/ 
That should make the sticky bit act right, allowing writes but not deletes.
:dancingfox: No systemd! nosystemd.org
:penguin: Choose freedom for your system with free software FSF.org GNU.org

"The more Linux changes, the the more I run BSD"
RIP ifconfig, iptables, init, etc

bitfikler
Posts: 83
Joined: Tue Mar 06, 2018 7:04 pm

Re: Nordvpn 3.16.5 has a sock problem

#7 Post by bitfikler »

Hi again!

Thank you all for great suggestions and input to my post! I really appreciate it!

For some reason /var/log/nordvpn/daemon.log was not removed at last reboot.

Does this output give any clues?

Code: Select all

 sudo find /var/log/nordvpn/ -ls
  1061979      4 drwxr-x---   2 root     nordvpn      4096 Sep 10 21:42 /var/log/nordvpn/
  1062586     84 -rw-r--r--   1 root     root        78242 Sep 12 08:29 /var/log/nordvpn/daemon.log
Greetings from

Bitfikler

Post Reply

Return to “Software / Configuration”