Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

** ERROR ** Failed preparing proxy: Error calling StartServiceByName for net.openvpn.v3.sessions: Launch helper exited with unknown return code 127 #97

Closed
madipietro opened this issue Jan 5, 2022 · 10 comments

Comments

@madipietro
Copy link

madipietro commented Jan 5, 2022

Hello guys!. I'm having an issue with the openvpn3 executable since the last update to openvpn3 17_beta-1 version of the package that is being built by AUR on Archlinux systems ( https://aur.archlinux.org/cgit/aur.git/commit/?h=openvpn3&id=e5d952db7d2ca627378faf39c8ea9ef6f7d6e473 ).

Basically I have this.

OS:

uname -arovi 
Linux Tesla 5.15.12-arch1-1 #1 SMP PREEMPT Wed, 29 Dec 2021 12:04:56 +0000 x86_64 GNU/Linux

Openvpn3 package version:

local/openvpn3 17_beta-1
    OpenVPN 3 Linux client

Openvpn3 version:

openvpn3 version
OpenVPN 3/Linux git:makepkg:079e9da7f66f5cca (openvpn3)
OpenVPN core 3.git:HEAD:7765540e linux x86_64 64-bit
Copyright (C) 2012-2020 OpenVPN Inc. All rights reserved.

I have two systemd units related to openvpn3 ( I'm not sure if this will change something )

-rw-r--r-- 1 root root  510 Jan  4 15:04  openvpn3-session@.service
-rw-r--r-- 1 root root  261 Jan  4 15:04  openvpn3-autoload.service

If I try to start the openvpn3-autoload.service unit I have the following error.

an 05 10:25:13 Tesla systemd[1]: Starting OpenVPN 3 Linux configuration auto loader and starter...
░░ Subject: A start job for unit openvpn3-autoload.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit openvpn3-autoload.service has begun execution.
░░ 
░░ The job identifier is 2633.
Jan 05 10:25:13 Tesla openvpn3-autoload[33869]: ** ERROR ** org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 127
Jan 05 10:25:13 Tesla systemd[1]: openvpn3-autoload.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit openvpn3-autoload.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 2.
Jan 05 10:25:13 Tesla systemd[1]: openvpn3-autoload.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit openvpn3-autoload.service has entered the 'failed' state with result 'exit-code'.
Jan 05 10:25:13 Tesla systemd[1]: Failed to start OpenVPN 3 Linux configuration auto loader and starter.
░░ Subject: A start job for unit openvpn3-autoload.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit openvpn3-autoload.service has finished with a failure.
░░ 
░░ The job identifier is 2633 and the job result is failed.

And trying to use openvpn3 as I used to do

 openvpn3 session-start --config pr.ovpn
** ERROR ** Failed preparing proxy: Error calling StartServiceByName for net.openvpn.v3.sessions: Launch helper exited with unknown return code 127

Gdb info:

gdb /usr/bin/openvpn3

GNU gdb (GDB) 11.1
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/openvpn3...
(No debugging symbols found in /usr/bin/openvpn3)
(gdb) run session-start --config  /home/max/work/n/pr.ovpn 
Starting program: /usr/bin/openvpn3 session-start --config  /home/max/work/n/pr.ovpn
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff713e640 (LWP 42426)]
[New Thread 0x7ffff693d640 (LWP 42427)]
** ERROR ** Failed preparing proxy: Error calling StartServiceByName for net.openvpn.v3.sessions: Launch helper exited with unknown return code 127
[Thread 0x7ffff693d640 (LWP 42427) exited]
[Thread 0x7ffff713e640 (LWP 42426) exited]
[Inferior 1 (process 42421) exited with code 011]
(gdb) 

Of course I can use the help and other related parameters

My latest working version of openvpn3 was openvpn3 15_beta-1 based on https://aur.archlinux.org/cgit/aur.git/commit/?h=openvpn3&id=d5c2650d913768ff351f153e480244ddc7fd7307

Thanks in advance!.

@dsommers
Copy link
Member

dsommers commented Jan 6, 2022

Can you please try to start your configuration using the openvpn2 command line? In this case you need have the configuration file present (ie, it can't be an imported configuration file).

Run it like this:

 $ openvpn2 --config $CONFIG_FILE --verb 6

The last --verb 6 is important and must come last. Then please provide the log output.

It would also be good if you could verify what the journalctl reports in the same timespan - in particular references to DBus calls.

Your gdb openvpn3 step won't really work in this context, as the openvpn3 is essentially just a D-Bus "client" which knows how to interact with the openvpn3-service-* backend processes/services over D-Bus. This error seems to be related to D-Bus not being allowed or able to start some of these backend services, or that it stops running at some point very early at the startup.

@madipietro
Copy link
Author

Can you please try to start your configuration using the openvpn2 command line? In this case you need have the configuration file present (ie, it can't be an imported configuration file).

Run it like this:

 $ openvpn2 --config $CONFIG_FILE --verb 6

The last --verb 6 is important and must come last. Then please provide the log output.

It would also be good if you could verify what the journalctl reports in the same timespan - in particular references to DBus calls.

Your gdb openvpn3 step won't really work in this context, as the openvpn3 is essentially just a D-Bus "client" which knows how to interact with the openvpn3-service-* backend processes/services over D-Bus. This error seems to be related to D-Bus not being allowed or able to start some of these backend services, or that it stops running at some point very early at the startup.

Hello @dsommers thanks for your help.

openvpn2 --config  pr.ovpn --verb 6

** ERROR ** org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 127
Jan 06 09:39:07 Tesla dbus-daemon[516]: [system] Activating service name='net.openvpn.v3.configuration' requested by ':1.78' (uid=1000 pid=3543 comm="/usr/bin/python3 /usr/bin/openvpn2 --config pr") (using servicehelper)
Jan 06 09:39:07 Tesla net.openvpn.v3.configuration[3545]: /usr/local/libexec/openvpn3-linux/openvpn3-service-configmgr: error while loading shared libraries: libjsoncpp.so.24: cannot open shared object file: No such file or directory
Jan 06 09:39:07 Tesla dbus-daemon[516]: [system] Activated service 'net.openvpn.v3.configuration' failed: Launch helper exited with unknown return code 127

So it seems to be a shared library problem am I right ?

If I look for the ibjsoncpp.so.24 lib, it doesn't exist on my OS.

[root@Tesla ~]# ls -ltr /usr/lib/libjsoncpp.so
lrwxrwxrwx 1 root root 16 Dec 20 18:37 /usr/lib/libjsoncpp.so -> libjsoncpp.so.25

But, if I do an ldd

[root@Tesla ~]# ldd /usr/bin/openvpn3
        linux-vdso.so.1 (0x00007fff82fba000)
        libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007fdb4aa46000)
        libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007fdb4a765000)
        libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007fdb4a5a5000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007fdb4a54b000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007fdb4a415000)
        libjsoncpp.so.25 => /usr/lib/libjsoncpp.so.25 (0x00007fdb4a3dd000)
        liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007fdb4a3b8000)
        libnl-genl-3.so.200 => /usr/lib/libnl-genl-3.so.200 (0x00007fdb4a3af000)
        libnl-3.so.200 => /usr/lib/libnl-3.so.200 (0x00007fdb4a38c000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fdb4a176000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fdb4a15b000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fdb4a13a000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fdb49f6c000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fdb49f65000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007fdb49f5e000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007fdb49f44000)
        libmount.so.1 => /usr/lib/libmount.so.1 (0x00007fdb49ee4000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007fdb49eca000)
        libffi.so.8 => /usr/lib/libffi.so.8 (0x00007fdb49ebc000)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007fdb49e45000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007fdb49d01000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fdb4ace8000)
        libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007fdb49cab000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007fdb49ca0000)

It tells me that needs libjsoncpp.so.25 and I have that lib on my system.

The problem seem to be in /usr/local/libexec/openvpn3-linux/openvpn3-service-sessionmgr

ldd /usr/local/libexec/openvpn3-linux/openvpn3-service-sessionmgr                                                                        
        linux-vdso.so.1 (0x00007ffcbf5cb000)
        libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007fa5c3960000)
        libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007fa5c367f000)
        libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007fa5c34bf000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007fa5c3465000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007fa5c332f000)
        libjsoncpp.so.24 => not found
        liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007fa5c330a000)
        libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007fa5c3301000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fa5c30eb000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007fa5c2fa7000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fa5c2f8c000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fa5c2f6b000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fa5c2d9d000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fa5c2d96000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007fa5c2d8f000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007fa5c2d75000)
        libmount.so.1 => /usr/lib/libmount.so.1 (0x00007fa5c2d15000)
        libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007fa5c2cfb000)
        libffi.so.8 => /usr/lib/libffi.so.8 (0x00007fa5c2ced000)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007fa5c2c76000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fa5c3a9e000)
        libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007fa5c2c20000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007fa5c2c15000)

And I think that exec file belongs to the same openvpn3 package

pacman -Qlq openvpn3 | grep -v '/$' | grep openvpn3-service-sessionmgr                                                                          
/usr/libexec/openvpn3-linux/openvpn3-service-sessionmgr
/usr/share/man/man8/openvpn3-service-sessionmgr.8.gz

Thanks!

@madipietro
Copy link
Author

Hello @dsommers for now I made it work with a quick and dirty fix

ln -s /usr/lib/libjsoncpp.so.25 /usr/lib/libjsoncpp.so.24

@dsommers
Copy link
Member

dsommers commented Jan 7, 2022

Okay, you need a rebuild of openvpn3-linux to be safe here. The reason you are in this situation is that the dependency tracking in this ArchLinux distro doesn't properly account for the jsoncpp dependency.

So when the jsoncpp library got updated with a new library version (24->25), the normal thing which normally would happen would be to rebuild all applications depending on jsoncpp (like openvpn3-linux and all other programs listing jsoncpp as a dependency).

Since this is a distribution issue and not an issue in openvpn3-linux (this is outside this projects control), I'm closing this issue.

@dsommers dsommers closed this as completed Jan 7, 2022
@madipietro
Copy link
Author

Okay, you need a rebuild of openvpn3-linux to be safe here. The reason you are in this situation is that the dependency tracking in this ArchLinux distro doesn't properly account for the jsoncpp dependency.

So when the jsoncpp library got updated with a new library version (24->25), the normal thing which normally would happen would be to rebuild all applications depending on jsoncpp (like openvpn3-linux and all other programs listing jsoncpp as a dependency).

Since this is a distribution issue and not an issue in openvpn3-linux (this is outside this projects control), I'm closing this issue.

Thanks a lot I will rebuild it!

@AckslD
Copy link

AckslD commented Apr 25, 2022

I had the same issue today but instead with protobuf.so, it tries to look for protobuf.so.30 but I have protobuf.so.31. Rebuilding seems to not help unfortunately.

net.openvpn.v3.sessions[2239]: /usr/libexec/openvpn3-linux/openvpn3-service-sessionmgr: error while loading shared libraries: libprotobuf.so.30: cannot open shared object file: No such file or directory

Is this something that needs to be updated here? For now I downgraded protobuf (and also usbguard since it needs latest protobuf).

@dsommers
Copy link
Member

dsommers commented Apr 25, 2022

@AckslD My best guess is that it's the old binary still being used, not the newly compiled one. You can verify if the binary you built (in src/sessionmgr/openvpn3-service-sessionmgr is the same as /usr/libexec/openvpn3-linux/openvpn3-service-sessionmgr) - using sha256sum, diff or related tools. You can also list the lib dependencies of a binary with ldd /usr/libexec/openvpn3-linux/openvpn3-service-sessionmgr)

Depending on the Linux distribution, you need to look if the --prefix is correct in ./configure. There might be other settings as well, which the "package building" sets on-the-fly as well, like the --sysconfdir path. Some of these paths varies slightly in different Linux distributions.

@AckslD
Copy link

AckslD commented Apr 25, 2022

Thanks a lot for your response @dsommers! From ldd /usr/libexec/openvpn3-linux/openvpn3-service-sessionmgr I see that it indeed depends on libprotobuf.so.30 instead of libprotobut.so31. I'm installing using yay and just tried to uninstall the package and install it again but still points to libprotobuf.so.30. Is maybe openvpn3 is not updated yet in AUR and one needs openvpn3-git?

Since I'm using yay I'm not sure what to compare /usr/libexec/openvpn3-linux/openvpn3-service-sessionmgr with, would that to check that it's the same as something in .cache/yay?

@dsommers
Copy link
Member

@AckslD I'm sorry, but I have no idea how Arch builds with yay is working, even less how the Arch distro packaging is happening.

@AckslD
Copy link

AckslD commented Apr 26, 2022

No problem @dsommers, thanks for the help anyway! :) For now it's at least working with lower version of protobuf. If I realise something later on I'll report back here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants