flant / ovpn-admin

Simple web UI to manage OpenVPN users.
Apache License 2.0
1.39k stars 261 forks source link

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

Open BZ-ramzi opened 10 months ago

BZ-ramzi commented 10 months ago

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 ??

pashcovich commented 10 months ago

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

BZ-ramzi commented 10 months ago

how i can check ?

BZ-ramzi commented 10 months ago

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

pashcovich commented 10 months ago

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?

BZ-ramzi commented 10 months ago

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 commented 10 months ago

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

Leeeuijooo commented 9 months ago

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?

BZ-ramzi commented 9 months ago

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

Leeeuijooo commented 8 months ago

What command did you run ovpn-admin with?

BZ-ramzi commented 8 months ago

with start.sh