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

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

Open
BZ-ramzi opened this issue Dec 11, 2023 · 10 comments
Open

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

BZ-ramzi opened this issue Dec 11, 2023 · 10 comments

Comments

@BZ-ramzi
Copy link

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
Copy link
Contributor

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
Copy link
Author

how i can check ?

@BZ-ramzi
Copy link
Author

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 BZ-ramzi reopened this Dec 15, 2023
@pashcovich
Copy link
Contributor

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
Copy link
Author

BZ-ramzi commented Dec 15, 2023

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-0ubuntu122.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
Copy link
Author

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
Copy link

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
Copy link
Author

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
Copy link

What command did you run ovpn-admin with?

@BZ-ramzi
Copy link
Author

with start.sh

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