ovpn-admin icon indicating copy to clipboard operation
ovpn-admin copied to clipboard

panic: runtime error: index out of range [3] with length 3

Open BZ-ramzi opened this issue 1 year ago • 10 comments

time="2023-12-11T18:49:29Z" level=info msg="123.25.12.18:38318 /api/user/config/show" panic: runtime error: index out of range [3] with length 3

goroutine 2154 [running]: main.(*OvpnAdmin).mgmtConnectedUsersParser(0xc0002b40c0, {0xc0003be000, 0x83c4}, {0x15fb551, 0x4}) /app/main.go:1311 +0xa6f main.(*OvpnAdmin).mgmtGetActiveClients(0xc0002b40c0) /app/main.go:1344 +0x1dc main.(*OvpnAdmin).setState(0xc0002b40c0) /app/main.go:612 +0x25 created by main.(*OvpnAdmin).updateState /app/main.go:626 +0x29

Any idea ??

BZ-ramzi avatar Dec 11 '23 19:12 BZ-ramzi

which version of the openvpn server did you use? and what version of the status do you have in the configuration for it?

pashcovich avatar Dec 12 '23 07:12 pashcovich

how i can check ?

BZ-ramzi avatar Dec 13 '23 00:12 BZ-ramzi

which version of the openvpn server did you use? and what version of the status do you have in the configuration for it?

for openvpn-user i'm using 1.0.4

BZ-ramzi avatar Dec 15 '23 09:12 BZ-ramzi

great, but I'm more interested in the OpenVPN server version and its configuration.

Could you tell us a little more about your installation? have you installed ovpn-admin as a binary file for your existing openvpn server, or have you used the docker-compose option from this repository?

pashcovich avatar Dec 15 '23 09:12 pashcovich

i installed with docker-compose Ubuntu 22.04.3 LTS CPU 28 cores root@server:~# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 56 On-line CPU(s) list: 0-55 Vendor ID: GenuineIntel Model name: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz CPU family: 6 Model: 79 Thread(s) per core: 2 Core(s) per socket: 14 Socket(s): 2 Stepping: 1 CPU max MHz: 3300.0000 CPU min MHz: 1200.0000

RAM 128 Gb

there is docker details root@server:~# docker version Client: Version: 24.0.5 API version: 1.43 Go version: go1.20.3 Git commit: 24.0.5-0ubuntu1~22.04.1 Built: Mon Aug 21 19:50:14 2023 OS/Arch: linux/amd64 Context: default

Server: Engine: Version: 24.0.5 API version: 1.43 (minimum version 1.12) Go version: go1.20.3 Git commit: 24.0.5-0ubuntu1~22.04.1 Built: Mon Aug 21 19:50:14 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.2 GitCommit: runc: Version: 1.1.7-0ubuntu1~22.04.1 GitCommit: docker-init: Version: 0.19.0 GitCommit:

BZ-ramzi avatar Dec 15 '23 15:12 BZ-ramzi

i think the problem is CPU threads, it used only 1 threads but my server is 56 threads how i can use all threads ?

BZ-ramzi avatar Dec 17 '23 21:12 BZ-ramzi

It may be a flag issue in the ovpn-admin binary file. By any chance, did you put values into each of the three indices HOST, PORT, and PROTOCOL in the --ovpn.server=HOST:PORT:PROTOCOL flag?

Leeeuijooo avatar Jan 17 '24 07:01 Leeeuijooo

It may be a flag issue in the ovpn-admin binary file. By any chance, did you put values into each of the three indices HOST, PORT, and PROTOCOL in the --ovpn.server=HOST:PORT:PROTOCOL flag?

yes, i set Host

but i try with new install without change any settings only 1 thread is used

BZ-ramzi avatar Jan 17 '24 12:01 BZ-ramzi

What command did you run ovpn-admin with?

Leeeuijooo avatar Jan 24 '24 05:01 Leeeuijooo

with start.sh

BZ-ramzi avatar Jan 24 '24 22:01 BZ-ramzi