Issues installing client on sierra wireless wp7611

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
ofirule
OpenVpn Newbie
Posts: 6
Joined: Thu Aug 09, 2018 1:09 pm

Issues installing client on sierra wireless wp7611

Post by ofirule » Sun Dec 17, 2023 1:39 pm

I am trying to install an openvpn client on sierra wireless wp7611 https://www.sierrawireless.com/iot-modu ... es/wp7611/
but I see a weird error.

Device info:

Code: Select all

# uname -a
Linux swi-mdm9x28-wp 3.18.140 #1 PREEMPT Thu Dec 7 09:52:21 UTC 2023 armv7l GNU/Linux
This is my client config file, which is creating a good conection on my X86_64 pc:

Code: Select all

# cat /etc/openvpn/my_client.conf 
client
dev tun0
port 1194
proto tcp

remote my.server.com 1194
resolv-retry infinite

user nobody
group nogroup

persist-key
persist-tun

key /etc/openvpn/pki/my_client/my.key
ca /etc/openvpn/pki/my_client/ca.crt
cert /etc/openvpn/pki/my_client/my.crt

remote-cert-tls server
cipher AES-256-CBC

verb 4
I am trying to use it on the wp but with no success. Tried both on opevvpn ver 2.3.18 and 2.4.4.

On openvpn version 2.3.18 I see the following:

OpenVPN info:

Code: Select all

# openvpn --version
OpenVPN 2.3.18 arm-poky-linux-gnueabi [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Dec 12 2023
library versions: OpenSSL 1.0.2p  14 Aug 2018, LZO 2.10
Originally developed by James Yonan
Copyright (C) 2002-2017 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dependency_tracking=no enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_http_proxy=yes enable_iproute2=yes enable_libtool_lock=yes enable_lzo=yes enable_lzo_stub=no enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_pedantic=no enable_pf=yes enable_pkcs11=no enable_plugin_auth_pam=no enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_silent_rules=no enable_small=no enable_socks=yes enable_ssl=yes enable_static=no enable_strict=no enable_strict_options=no enable_systemd=no enable_win32_dll=yes enable_x509_alt_username=no with_aix_soname=aix with_broken_putenv=no with_crypto_library=openssl with_gnu_ld=yes with_libtool_sysroot=/home/notraffic-jig/dev/wpb/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/openvpn/2.3.18-r0/recipe-sysroot with_mem_check=no with_plugindir='$(libdir)/openvpn/plugins'
After a while the service prints the following error indefinitely:

Code: Select all

Tue Dec 12 20:06:02 2023 us=531010 read TCPv4_CLIENT: Invalid argument (code=22)
Added strace info for this error:

Code: Select all

poll([{fd=3, events=POLLIN|POLLPRI}], 1, 1237) = 1 ([{fd=3, revents=POLLIN}])
gettimeofday({tv_sec=1702404362, tv_usec=528240}, NULL) = 0
recv(3, 0x7f620120, 1563, MSG_NOSIGNAL) = -1 EINVAL (Invalid argument)
gettimeofday({tv_sec=1702404362, tv_usec=531010}, NULL) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=121, ...}) = 0
write(1, "Tue Dec 12 20:06:02 2023 us=5310"..., 81Tue Dec 12 20:06:02 2023 us=531010 read TCPv4_CLIENT: Invalid argument (code=22)
) = 81
Added ltrace info for this error:

Code: Select all

fflush(0xb6cc9d98)                                                                                                            = 0
free(0x7f62f3f0)                                                                                                              = <void>
free(0x7f62eee8)                                                                                                              = <void>
free(0x7f62e9e0)                                                                                                              = <void>
free(0x7f61b148)                                                                                                              = <void>
ERR_clear_error(0, 0xbed8fa50, 0x7f5ded8c, 0xaa861f00)                                                                        = 0
time(nil)                                                                                                                     = 1702406446
memcmp(0x7f60adc4, 0x7f5f54c4, 8, 0x7f5f4a40)                                                                                 = 96
time(nil)                                                                                                                     = 1702406446
BIO_read(0x7f60d868, 0x7f60e7a0, 2048, 0x7f60e7a0)                                                                            = -1
BIO_test_flags(0x7f60d868, 8, 0, 0)                                                                                           = 8
time(nil)                                                                                                                     = 1702406446
time(nil)                                                                                                                     = 1702406446
time(nil)                                                                                                                     = 1702406446
poll(0x7f6096a8, 1, 1094, 6057)                                                                                               = 1
time(nil)                                                                                                                     = 1702406446
recv(3, 0x7f6200c8, 1563, 0x4000)                                                                                             = -1
__errno_location()                                                                                                            = 0xb6f17920
__errno_location()                                                                                                            = 0xb6f17920
malloc(260)                                                                                                                   = 0x7f61b148
strerror(22)                                                                                                                  = "Invalid argument"
__vsnprintf_chk(0x7f61b14c, 256, 1, -1)                                                                                       = 16
strlen("Invalid argument")                                                                                                    = 16
__errno_location()                                                                                                            = 0xb6f17920
malloc(1284)                                                                                                                  = 0x7f62e9e0
malloc(1284)                                                                                                                  = 0x7f62eee8
__vsnprintf_chk(0x7f62e9e4, 1280, 1, -1)                                                                                      = 45
malloc(68)                                                                                                                    = 0x7f62f3f0
gettimeofday(0xbed8f18c, nil)                                                                                                 = 0
ctime(0xbed8f184)                                                                                                             = "Tue Dec 12 20:40:46 2023\n"
__vsnprintf_chk(0x7f62f3f4, 64, 1, -1)                                                                                        = 25
strlen("Tue Dec 12 20:40:46 2023\n")                                                                                          = 25
__vsnprintf_chk(0x7f62f40c, 40, 1, -1)                                                                                        = 10
strlen(" us=866956")                                                                                                          = 10
__fprintf_chk(0xb6cc9d98, 1, 0x7f5c3990, 0x7f62f3f4Tue Dec 12 20:40:46 2023 us=866956 read TCPv4_CLIENT: Invalid argument (code=22)

On openvpn version 2.4.4 I see a very similar pattern:

OpenVPN info:

Code: Select all

# openvpn --version
OpenVPN 2.4.4 arm-poky-linux-gnueabi [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Dec 17 2023
library versions: OpenSSL 1.0.2p  14 Aug 2018, LZO 2.10
Originally developed by James Yonan
Copyright (C) 2002-2017 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_async_push=no enable_comp_stub=no enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dependency_tracking=no enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_iproute2=yes enable_libtool_lock=yes enable_lz4=yes enable_lzo=yes enable_management=yes enable_multihome=yes enable_pam_dlopen=no enable_pedantic=no enable_pf=yes enable_pkcs11=no enable_plugin_auth_pam=no enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_silent_rules=no enable_small=no enable_static=no enable_strict=no enable_strict_options=no enable_systemd=no enable_werror=no enable_win32_dll=yes enable_x509_alt_username=no with_aix_soname=aix with_broken_putenv=no with_crypto_library=openssl with_gnu_ld=yes with_libtool_sysroot=/home/notraffic-jig/dev/wpb/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/openvpn/2.4.4-r0/recipe-sysroot with_mem_check=no
After a while the service prints the following error indefinitely:

Code: Select all

Sun Dec 17 14:42:20 2023 us=593690 read TCP_CLIENT: Invalid argument (code=22)
Added strace info for this error:

Code: Select all

gettimeofday({tv_sec=1702816940, tv_usec=651993}, NULL) = 0
gettimeofday({tv_sec=1702816940, tv_usec=652647}, NULL) = 0
gettimeofday({tv_sec=1702816940, tv_usec=653174}, NULL) = 0
gettimeofday({tv_sec=1702816940, tv_usec=653929}, NULL) = 0
gettimeofday({tv_sec=1702816940, tv_usec=654123}, NULL) = 0
gettimeofday({tv_sec=1702816940, tv_usec=654625}, NULL) = 0
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 1129) = 1 ([{fd=3, revents=POLLIN}])
gettimeofday({tv_sec=1702816940, tv_usec=655093}, NULL) = 0
recv(3, 0x7f63ac24, 1626, MSG_NOSIGNAL) = -1 EINVAL (Invalid argument)
gettimeofday({tv_sec=1702816940, tv_usec=656162}, NULL) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=121, ...}) = 0
write(1, "Sun Dec 17 14:42:20 2023 us=6561"..., 79Sun Dec 17 14:42:20 2023 us=656162 read TCP_CLIENT: Invalid argument (code=22)
Added ltrace info for this error:

Code: Select all

fflush(0xb6d3dd98)                                                                                                            = 0
free(0x7f64a028)                                                                                                              = <void>
free(0x7f649b20)                                                                                                              = <void>
free(0x7f649618)                                                                                                              = <void>
ERR_clear_error(0xbec5a17c, 0, 0xbec5a12c, 0x6d56200)                                                                         = 0
time(nil)                                                                                                                     = 1702817068
memcmp(0x7f620db4, 0x7f60d59c, 8, 0x7f60c9e4)                                                                                 = 82
time(nil)                                                                                                                     = 1702817068
BIO_read(0x7f61e850, 0x7f61f9f0, 2048, 0x7f61f9f0)                                                                            = -1
BIO_test_flags(0x7f61e850, 8, 0, 0)                                                                                           = 8
time(nil)                                                                                                                     = 1702817068
time(nil)                                                                                                                     = 1702817068
time(nil)                                                                                                                     = 1702817068
poll(0x7f627440, 1, 1175, 0x2bf0)                                                                                             = 1
time(nil)                                                                                                                     = 1702817068
recv(3, 0x7f63ac24, 1626, 0x4000)                                                                                             = -1
__errno_location()                                                                                                            = 0xb6f8b920
__errno_location()                                                                                                            = 0xb6f8b920
strerror(22)                                                                                                                  = "Invalid argument"
__errno_location()                                                                                                            = 0xb6f8b920
malloc(1284)                                                                                                                  = 0x7f649618
malloc(1284)                                                                                                                  = 0x7f649b20
__vsnprintf_chk(0x7f64961c, 1280, 1, -1)                                                                                      = 43
malloc(68)                                                                                                                    = 0x7f64a028
gettimeofday(0xbec5a0cc, nil)                                                                                                 = 0
ctime(0xbec5a0c4)                                                                                                             = "Sun Dec 17 14:44:28 2023\n"
__vsnprintf_chk(0x7f64a02c, 64, 1, -1)                                                                                        = 25
strlen("Sun Dec 17 14:44:28 2023\n")                                                                                          = 25
__vsnprintf_chk(0x7f64a044, 40, 1, -1)                                                                                        = 10
strlen(" us=614117")                                                                                                          = 10
__fprintf_chk(0xb6d3dd98, 1, 0x7f5d91fc, 0x7f64a02cSun Dec 17 14:44:28 2023 us=614117 read TCP_CLIENT: Invalid argument (code=22)
)                                                                          = 79
To my understanding from looking at the strace and ltrace output the problem is that the process is trying to receive a message from a socket but for some reason it passes invalid arguments.
I am not sure how to proceed.

I am compiling openvpn as part of a yocto project using the following .bb file:
https://github.com/legatoproject/meta-o ... n_2.4.4.bb

any help fixing/debugging would be appreciated.
thanks,

Post Reply