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

prebuilt binary crashes #51

Closed
jducifuentes opened this issue Oct 8, 2021 · 13 comments
Closed

prebuilt binary crashes #51

jducifuentes opened this issue Oct 8, 2021 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@jducifuentes
Copy link

I have downloaded prebuilt binary and ran on debian 11. Server gives message 404 page not found when I open browser at http://ip:8080

then a crash in server console outputs this:


2021/10/08 13:24:15 openssl x509 -in /etc/openvpn/easyrsa/pki/ca.crt -noout -enddate | awk -F "=" {'print $2'}
Bind: http://0.0.0.0:8080
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f055de9b298]

runtime stack:
runtime.throw({0x145830c, 0x7f0550000d53})
        /usr/local/go/src/runtime/panic.go:1198 +0x71
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:719 +0x396

goroutine 30 [syscall]:
runtime.cgocall(0x11487c0, 0xc00005cd90)
        /usr/local/go/src/runtime/cgocall.go:156 +0x5c fp=0xc00005cd68 sp=0xc00005cd30 pc=0x4040bc
net._C2func_getaddrinfo(0xc0003fe210, 0x0, 0xc0003e7110, 0xc0002b59e8)
        _cgo_gotypes.go:91 +0x56 fp=0xc00005cd90 sp=0xc00005cd68 pc=0x5b2056
net.cgoLookupIPCNAME.func1({0xc0003fe210, 0x0, 0x0}, 0x7ffeae6cede7, 0xc00005ce50)
        /usr/local/go/src/net/cgo_unix.go:163 +0x9f fp=0xc00005cde8 sp=0xc00005cd90 pc=0x5b391f
net.cgoLookupIPCNAME({0x142f028, 0x3}, {0x7ffeae6cede7, 0x0})
        /usr/local/go/src/net/cgo_unix.go:163 +0x16d fp=0xc00005cf38 sp=0xc00005cde8 pc=0x5b316d
net.cgoIPLookup(0x2228a30, {0x142f028, 0xc0003fe200}, {0x7ffeae6cede7, 0xc0000c7340})
        /usr/local/go/src/net/cgo_unix.go:220 +0x3b fp=0xc00005cfa8 sp=0xc00005cf38 pc=0x5b39db
net.cgoLookupIP·dwrap·25()
        /usr/local/go/src/net/cgo_unix.go:230 +0x36 fp=0xc00005cfe0 sp=0xc00005cfa8 pc=0x5b3e56
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00005cfe8 sp=0xc00005cfe0 pc=0x464aa1
created by net.cgoLookupIP
        /usr/local/go/src/net/cgo_unix.go:230 +0x125

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x7f055df18a18, 0x72)
        /usr/local/go/src/runtime/netpoll.go:229 +0x89
internal/poll.(*pollDesc).wait(0xc000354700, 0x417b06, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc000354700)
        /usr/local/go/src/internal/poll/fd_unix.go:402 +0x22c
net.(*netFD).accept(0xc000354700)
        /usr/local/go/src/net/fd_unix.go:173 +0x35
net.(*TCPListener).accept(0xc000368bd0)
        /usr/local/go/src/net/tcpsock_posix.go:140 +0x28
net.(*TCPListener).Accept(0xc000368bd0)
        /usr/local/go/src/net/tcpsock.go:262 +0x3d
net/http.(*Server).Serve(0xc0001042a0, {0x15f3948, 0xc000368bd0})
        /usr/local/go/src/net/http/server.go:3001 +0x394
net/http.(*Server).ListenAndServe(0xc0001042a0)
        /usr/local/go/src/net/http/server.go:2930 +0x7d
net/http.ListenAndServe(...)
        /usr/local/go/src/net/http/server.go:3184
main.main()
        /github/workspace/main.go:463 +0xe45

goroutine 6 [chan receive]:
k8s.io/klog/v2.(*loggingT).flushDaemon(0x0)
        /go/pkg/mod/k8s.io/klog/v2@v2.4.0/klog.go:1169 +0x6a
created by k8s.io/klog/v2.init.0
        /go/pkg/mod/k8s.io/klog/v2@v2.4.0/klog.go:417 +0xfb

goroutine 24 [sleep]:
time.Sleep(0x684ee1800)
        /usr/local/go/src/runtime/time.go:193 +0x12e
main.(*OvpnAdmin).updateState(0xc0000c7340)
        /github/workspace/main.go:496 +0x38
created by main.main
        /github/workspace/main.go:411 +0x265

goroutine 25 [IO wait]:
internal/poll.runtime_pollWait(0x7f055df18930, 0x72)
        /usr/local/go/src/runtime/netpoll.go:229 +0x89
internal/poll.(*pollDesc).wait(0xc000354780, 0xc0003a5000, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000354780, {0xc0003a5000, 0x1000, 0x1000})
        /usr/local/go/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc000354780, {0xc0003a5000, 0x100000143f38a, 0x16})
        /usr/local/go/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0xc0002b5980, {0xc0003a5000, 0x7, 0xc0003e67e8})
        /usr/local/go/src/net/net.go:183 +0x45
net/http.(*connReader).Read(0xc0003e67e0, {0xc0003a5000, 0x1000, 0x1000})
        /usr/local/go/src/net/http/server.go:780 +0x16d
bufio.(*Reader).fill(0xc0003e2180)
        /usr/local/go/src/bufio/bufio.go:101 +0x103
bufio.(*Reader).ReadSlice(0xc0003e2180, 0x0)
        /usr/local/go/src/bufio/bufio.go:360 +0x2f
bufio.(*Reader).ReadLine(0xc0003e2180)
        /usr/local/go/src/bufio/bufio.go:389 +0x27
net/textproto.(*Reader).readLineSlice(0xc0003e6840)
        /usr/local/go/src/net/textproto/reader.go:57 +0x99
net/textproto.(*Reader).ReadLine(...)
        /usr/local/go/src/net/textproto/reader.go:38
net/http.readRequest(0xc0002b5980)
        /usr/local/go/src/net/http/request.go:1029 +0x79
net/http.(*conn).readRequest(0xc0003cc6e0, {0x15f7990, 0xc0002c7780})
        /usr/local/go/src/net/http/server.go:966 +0x225
net/http.(*conn).serve(0xc0003cc6e0, {0x15f7a38, 0xc0003e66f0})
        /usr/local/go/src/net/http/server.go:1855 +0x865
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:3033 +0x4e8

goroutine 26 [IO wait]:
internal/poll.runtime_pollWait(0x7f055df18848, 0x72)
        /usr/local/go/src/runtime/netpoll.go:229 +0x89
internal/poll.(*pollDesc).wait(0xc000354980, 0xc000401000, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000354980, {0xc000401000, 0x1000, 0x1000})
        /usr/local/go/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc000354980, {0xc000401000, 0x14385b5, 0xc00006d6b0})
        /usr/local/go/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0xc0002b5988, {0xc000401000, 0x6, 0xc0003e6908})
        /usr/local/go/src/net/net.go:183 +0x45
net/http.(*connReader).Read(0xc0003e6900, {0xc000401000, 0x1000, 0x1000})
        /usr/local/go/src/net/http/server.go:780 +0x16d
bufio.(*Reader).fill(0xc0003e21e0)
        /usr/local/go/src/bufio/bufio.go:101 +0x103
bufio.(*Reader).ReadSlice(0xc0003e21e0, 0xb)
        /usr/local/go/src/bufio/bufio.go:360 +0x2f
bufio.(*Reader).ReadLine(0xc0003e21e0)
        /usr/local/go/src/bufio/bufio.go:389 +0x27
net/textproto.(*Reader).readLineSlice(0xc0003e6930)
        /usr/local/go/src/net/textproto/reader.go:57 +0x99
net/textproto.(*Reader).ReadLine(...)
        /usr/local/go/src/net/textproto/reader.go:38
net/http.readRequest(0xc0002b5988)
        /usr/local/go/src/net/http/request.go:1029 +0x79
net/http.(*conn).readRequest(0xc0003cc780, {0x15f7990, 0xc0002c7840})
        /usr/local/go/src/net/http/server.go:966 +0x225
net/http.(*conn).serve(0xc0003cc780, {0x15f7a38, 0xc0003e66f0})
        /usr/local/go/src/net/http/server.go:1855 +0x865
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:3033 +0x4e8

goroutine 28 [select]:
net.(*Resolver).lookupIPAddr(0x2228a20, {0x15f79c8, 0xc000040098}, {0x142f028, 0x0}, {0x7ffeae6cede7, 0x9})
        /usr/local/go/src/net/lookup.go:302 +0x5c7
net.(*Resolver).internetAddrList(0x15f79c8, {0x15f79c8, 0xc000040098}, {0x142f028, 0x3}, {0x7ffeae6cede7, 0xe})
        /usr/local/go/src/net/ipsock.go:288 +0x67a
net.(*Resolver).resolveAddrList(0xc000040098, {0x15f79c8, 0xc000040098}, {0x142f356, 0x4}, {0x142f028, 0x0}, {0x7ffeae6cede7, 0xe}, {0x0, ...})
        /usr/local/go/src/net/dial.go:221 +0x41b
net.(*Dialer).DialContext(0xc00006ede8, {0x15f79c8, 0xc000040098}, {0x142f028, 0x80460}, {0x7ffeae6cede7, 0x2000000005b36b8})
        /usr/local/go/src/net/dial.go:406 +0x448
net.(*Dialer).Dial(...)
        /usr/local/go/src/net/dial.go:351
net.Dial({0x142f028, 0x3}, {0x7ffeae6cede7, 0x40ab35})
        /usr/local/go/src/net/dial.go:319 +0x7a
main.(*OvpnAdmin).mgmtGetActiveClients(0xc0000c7340)
        /github/workspace/main.go:1044 +0x139
main.(*OvpnAdmin).setState(0xc0000c7340)
        /github/workspace/main.go:488 +0x25
created by main.(*OvpnAdmin).updateState
        /github/workspace/main.go:501 +0x29

goroutine 29 [select]:
net.cgoLookupIP({0x15f7990, 0xc0002c7980}, {0x142f028, 0x9}, {0x7ffeae6cede7, 0xe})
        /usr/local/go/src/net/cgo_unix.go:231 +0x1b7
net.(*Resolver).lookupIP(0x2228a20, {0x15f7990, 0xc0002c7980}, {0x142f028, 0x3}, {0x7ffeae6cede7, 0x9})
        /usr/local/go/src/net/lookup_unix.go:97 +0x128
net.glob..func1({0x15f7990, 0xc0002c7980}, 0x7ffeae6cede7, {0x142f028, 0x7ffeae6cede7}, {0x7ffeae6cede7, 0xc00005ced8})
        /usr/local/go/src/net/hook.go:23 +0x3d
net.(*Resolver).lookupIPAddr.func1()
        /usr/local/go/src/net/lookup.go:296 +0x9f
internal/singleflight.(*Group).doCall(0x2228a30, 0xc0003de370, {0xc0003fe200, 0xd}, 0xc0000c7340)
        /usr/local/go/src/internal/singleflight/singleflight.go:95 +0x3b
created by internal/singleflight.(*Group).DoChan
        /usr/local/go/src/internal/singleflight/singleflight.go:88 +0x2f1

launch command:

./ovpn-admin --debug --ovpn.network="192.168.30.0/24" --master.sync-token="TOKEN" \
--easyrsa.path="/etc/openvpn/easyrsa" \
--easyrsa.index-path="/etc/openvpn/easyrsa/pki/index.txt" \
--ovpn.server="localhost:1195:udp" \
--auth.password \
--auth.db="/etc/openvpn/easyrsa/pki/users.db" \
--ccd --ccd.path="./ccd" --mgmt=localhost:5555

output of netstat :

root@SRV:~/ovpn-admin# netstat -tuenlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          12865      541/sshd: /usr/sbin
tcp        0      0 0.0.0.0:5555            0.0.0.0:*               LISTEN      0          13022      568/openvpn
tcp6       0      0 :::22                   :::*                    LISTEN      0          12876      541/sshd: /usr/sbin
tcp6       0      0 :::8080                 :::*                    LISTEN      0          16129      1036/./ovpn-admin
udp        0      0 0.0.0.0:1195            0.0.0.0:*                           0          13079      568/openvpn
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           110        12533      402/avahi-daemon: r
udp        0      0 0.0.0.0:52114           0.0.0.0:*                           110        12535      402/avahi-daemon: r
udp6       0      0 :::56439                :::*                                110        12536      402/avahi-daemon: r
udp6       0      0 :::5353                 :::*                                110        12534      402/avahi-daemon: r

It's curious that server opens in tcp6 even when I tried to disable globally ipv6 en /etc/systcl.conf but nevermind because other services still starts in ipv6 as you can see en netstat output.

@pashcovich
Copy link
Contributor

i cant reproduce you problem.
could you please provide output for this command
uname -siprom

@pashcovich
Copy link
Contributor

@jducifuentes please try with version 1.7.3

@jducifuentes
Copy link
Author

i cant reproduce you problem. could you please provide output for this command uname -siprom

Linux 5.10.0-8-amd64 x86_64 unknown unknown GNU/Linux

@pashcovich
Copy link
Contributor

great. closing

@jducifuentes jducifuentes changed the title prebuilt binary gives 404 page not found and crashes then prebuilt binary crashes Oct 15, 2021
@jducifuentes jducifuentes changed the title prebuilt binary crashes prebuilt binary gives message 404 then crashes Oct 15, 2021
@jducifuentes
Copy link
Author

jducifuentes commented Oct 15, 2021

Sorry to reopen but crashes after a while..... web gui starts ok and can make some operations but seems to crash randomly.

crash log:

2021/10/15 11:09:20 openssl x509 -in /etc/openvpn/easyrsa/pki/ca.crt -noout -enddate | awk -F "=" {'print $2'}
Bind: http://0.0.0.0:8080
2021/10/15 11:09:31 date +%Y-%m-%d\ %H:%M:%S && cd /etc/openvpn/easyrsa && easyrsa build-client-full loko nopass
2021/10/15 11:09:32 2021-10-15 11:09:31
Using SSL: openssl OpenSSL 1.1.1k  25 Mar 2021
Generating a RSA private key
................................................................+++++
..........................................................................................................+++++
writing new private key to '/etc/openvpn/easyrsa/pki/easy-rsa-72447.cycH5e/tmp.JrzCuf'
-----
Using configuration from /etc/openvpn/easyrsa/pki/easy-rsa-72447.cycH5e/tmp.9kUQzQ
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :ASN.1 12:'loko'
Certificate is to be certified until Jan 18 09:09:32 2024 GMT (825 days)

Write out database with 1 new entries
Data Base Updated


2021/10/15 11:09:32 openvpn-user create --db.path /etc/openvpn/easyrsa/pki/users.db --user loko --password pruebas
2021/10/15 11:09:32 exit status 127 : bash: line 1: openvpn-user: command not found

2021/10/15 11:09:48 openssl x509 -in /etc/openvpn/easyrsa/pki/ca.crt -noout -enddate | awk -F "=" {'print $2'}
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f71ac254298]

runtime stack:
runtime.throw({0x145ac32, 0x7f719c000d53})
        /usr/local/go/src/runtime/panic.go:1198 +0x71
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:719 +0x396

goroutine 37 [syscall]:
runtime.cgocall(0x114aa80, 0xc00005fd90)
        /usr/local/go/src/runtime/cgocall.go:156 +0x5c fp=0xc00005fd68 sp=0xc00005fd30 pc=0x4040bc
net._C2func_getaddrinfo(0xc000442090, 0x0, 0xc00043c1b0, 0xc0002c8050)
        _cgo_gotypes.go:91 +0x56 fp=0xc00005fd90 sp=0xc00005fd68 pc=0x5b21d6
net.cgoLookupIPCNAME.func1({0xc000442090, 0x46292e, 0x4196a5}, 0x7fff744167e4, 0xc00005fe50)
        /usr/local/go/src/net/cgo_unix.go:163 +0x9f fp=0xc00005fde8 sp=0xc00005fd90 pc=0x5b3a9f
net.cgoLookupIPCNAME({0x14317a8, 0x3}, {0x7fff744167e4, 0xc00005ff80})
        /usr/local/go/src/net/cgo_unix.go:163 +0x16d fp=0xc00005ff38 sp=0xc00005fde8 pc=0x5b32ed
net.cgoIPLookup(0x22a2a70, {0x14317a8, 0xc000442080}, {0x7fff744167e4, 0x0})
        /usr/local/go/src/net/cgo_unix.go:220 +0x3b fp=0xc00005ffa8 sp=0xc00005ff38 pc=0x5b3b5b
net.cgoLookupIP·dwrap·25()
        /usr/local/go/src/net/cgo_unix.go:230 +0x36 fp=0xc00005ffe0 sp=0xc00005ffa8 pc=0x5b3fd6
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00005ffe8 sp=0xc00005ffe0 pc=0x464b01
created by net.cgoLookupIP
        /usr/local/go/src/net/cgo_unix.go:230 +0x125

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x7f71ac2d3358, 0x72)
        /usr/local/go/src/runtime/netpoll.go:229 +0x89
internal/poll.(*pollDesc).wait(0xc00035c700, 0x203000, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc00035c700)
        /usr/local/go/src/internal/poll/fd_unix.go:402 +0x22c
net.(*netFD).accept(0xc00035c700)
        /usr/local/go/src/net/fd_unix.go:173 +0x35
net.(*TCPListener).accept(0xc000370be8)
        /usr/local/go/src/net/tcpsock_posix.go:140 +0x28
net.(*TCPListener).Accept(0xc000370be8)
        /usr/local/go/src/net/tcpsock.go:262 +0x3d
net/http.(*Server).Serve(0xc00011c2a0, {0x166ba48, 0xc000370be8})
        /usr/local/go/src/net/http/server.go:3001 +0x394
net/http.(*Server).ListenAndServe(0xc00011c2a0)
        /usr/local/go/src/net/http/server.go:2930 +0x7d
net/http.ListenAndServe(...)
        /usr/local/go/src/net/http/server.go:3184
main.main()
        /github/workspace/main.go:463 +0xe45

goroutine 6 [chan receive]:
k8s.io/klog/v2.(*loggingT).flushDaemon(0x0)
        /go/pkg/mod/k8s.io/klog/v2@v2.4.0/klog.go:1169 +0x6a
created by k8s.io/klog/v2.init.0
        /go/pkg/mod/k8s.io/klog/v2@v2.4.0/klog.go:417 +0xfb

goroutine 24 [sleep]:
time.Sleep(0x684ee1800)
        /usr/local/go/src/runtime/time.go:193 +0x12e
main.(*OvpnAdmin).updateState(0xc0000c9290)
        /github/workspace/main.go:496 +0x38
created by main.main
        /github/workspace/main.go:411 +0x265

goroutine 25 [IO wait]:
internal/poll.runtime_pollWait(0x7f71ac2d3270, 0x72)
        /usr/local/go/src/runtime/netpoll.go:229 +0x89
internal/poll.(*pollDesc).wait(0xc00035c780, 0xc0003b1000, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc00035c780, {0xc0003b1000, 0x1000, 0x1000})
        /usr/local/go/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc00035c780, {0xc0003b1000, 0x6871a0, 0xc0003dc8a8})
        /usr/local/go/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0xc0002c99d0, {0xc0003b1000, 0x0, 0xc00039d3b8})
        /usr/local/go/src/net/net.go:183 +0x45
net/http.(*connReader).Read(0xc00039d3b0, {0xc0003b1000, 0x1000, 0x1000})
        /usr/local/go/src/net/http/server.go:780 +0x16d
bufio.(*Reader).fill(0xc0003f4180)
        /usr/local/go/src/bufio/bufio.go:101 +0x103
bufio.(*Reader).ReadSlice(0xc0003f4180, 0x0)
        /usr/local/go/src/bufio/bufio.go:360 +0x2f
bufio.(*Reader).ReadLine(0xc0003f4180)
        /usr/local/go/src/bufio/bufio.go:389 +0x27
net/textproto.(*Reader).readLineSlice(0xc00039d410)
        /usr/local/go/src/net/textproto/reader.go:57 +0x99
net/textproto.(*Reader).ReadLine(...)
        /usr/local/go/src/net/textproto/reader.go:38
net/http.readRequest(0xc0002c99d0)
        /usr/local/go/src/net/http/request.go:1029 +0x79
net/http.(*conn).readRequest(0xc0003dc820, {0x166fad0, 0xc0002d5780})
        /usr/local/go/src/net/http/server.go:966 +0x225
net/http.(*conn).serve(0xc0003dc820, {0x166fb78, 0xc00039d2c0})
        /usr/local/go/src/net/http/server.go:1855 +0x865
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:3033 +0x4e8

goroutine 35 [select]:
net.(*Resolver).lookupIPAddr(0x22a2a60, {0x166fb08, 0xc000040098}, {0x14317a8, 0x0}, {0x7fff744167e4, 0x9})
        /usr/local/go/src/net/lookup.go:302 +0x5c7
net.(*Resolver).internetAddrList(0x166fb08, {0x166fb08, 0xc000040098}, {0x14317a8, 0x3}, {0x7fff744167e4, 0xe})
        /usr/local/go/src/net/ipsock.go:288 +0x67a
net.(*Resolver).resolveAddrList(0xc000040098, {0x166fb08, 0xc000040098}, {0x1431ad6, 0x4}, {0x14317a8, 0x0}, {0x7fff744167e4, 0xe}, {0x0, ...})
        /usr/local/go/src/net/dial.go:221 +0x41b
net.(*Dialer).DialContext(0xc00006dde8, {0x166fb08, 0xc000040098}, {0x14317a8, 0x0}, {0x7fff744167e4, 0x500000000000000})
        /usr/local/go/src/net/dial.go:406 +0x448
net.(*Dialer).Dial(...)
        /usr/local/go/src/net/dial.go:351
net.Dial({0x14317a8, 0x0}, {0x7fff744167e4, 0x0})
        /usr/local/go/src/net/dial.go:319 +0x7a
main.(*OvpnAdmin).mgmtGetActiveClients(0xc0000c9290)
        /github/workspace/main.go:1043 +0x139
main.(*OvpnAdmin).setState(0xc0000c9290)
        /github/workspace/main.go:488 +0x25
created by main.(*OvpnAdmin).updateState
        /github/workspace/main.go:501 +0x29

goroutine 36 [select]:
net.cgoLookupIP({0x166fad0, 0xc0002d4000}, {0x14317a8, 0x9}, {0x7fff744167e4, 0xc0003856c0})
        /usr/local/go/src/net/cgo_unix.go:231 +0x1b7
net.(*Resolver).lookupIP(0x22a2a60, {0x166fad0, 0xc0002d4000}, {0x14317a8, 0x3}, {0x7fff744167e4, 0x9})
        /usr/local/go/src/net/lookup_unix.go:97 +0x128
net.glob..func1({0x166fad0, 0xc0002d4000}, 0x7f71ac2d3188, {0x14317a8, 0xc0003851e0}, {0x7fff744167e4, 0x40644d})
        /usr/local/go/src/net/hook.go:23 +0x3d
net.(*Resolver).lookupIPAddr.func1()
        /usr/local/go/src/net/lookup.go:296 +0x9f
internal/singleflight.(*Group).doCall(0x22a2a70, 0xc0003ee000, {0xc000442080, 0xd}, 0x0)
        /usr/local/go/src/internal/singleflight/singleflight.go:95 +0x3b
created by internal/singleflight.(*Group).DoChan
        /usr/local/go/src/internal/singleflight/singleflight.go:88 +0x2f1

notice this error:

2021/10/15 11:09:32 exit status 127 : bash: line 1: openvpn-user: command not found

@pashcovich
Copy link
Contributor

pashcovich commented Oct 15, 2021

if you really need password auth you have to install openvpn-user - just make it available throw PATH variables and dont forget about execution rights on the binary or dont use flags --auth

@pashcovich pashcovich reopened this Oct 15, 2021
@jducifuentes
Copy link
Author

jducifuentes commented Oct 15, 2021

if you really need password auth you have to install openvpn-user - just make it available throw PATH variables and dont forget about execution rights on the binary or dont use flags --auth

great thanks, i'm getting crazy searching for distro binaries :) You could make reference in readme....

now I didn't get openvpn-user error but still crashing:

2021/10/15 11:22:08 openssl x509 -in /etc/openvpn/easyrsa/pki/ca.crt -noout -enddate | awk -F "=" {'print $2'}
Bind: http://0.0.0.0:8080
2021/10/15 11:22:20 date +%Y-%m-%d\ %H:%M:%S && cd /etc/openvpn/easyrsa && easyrsa build-client-full lucasio nopass
2021/10/15 11:22:20 2021-10-15 11:22:20
Using SSL: openssl OpenSSL 1.1.1k  25 Mar 2021
Generating a RSA private key
.......................................................................................................+++++
....................................+++++
writing new private key to '/etc/openvpn/easyrsa/pki/easy-rsa-72702.9YHX0t/tmp.Gd5yaU'
-----
Using configuration from /etc/openvpn/easyrsa/pki/easy-rsa-72702.9YHX0t/tmp.jk8Zh6
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :ASN.1 12:'lucasio'
Certificate is to be certified until Jan 18 09:22:20 2024 GMT (825 days)

Write out database with 1 new entries
Data Base Updated


2021/10/15 11:22:20 openvpn-user create --db.path /etc/openvpn/easyrsa/pki/users.db --user lucasio --password cagarrio
2021/10/15 11:22:20 User lucasio created

2021/10/15 11:22:33 date +%Y-%m-%d\ %H:%M:%S && cd /etc/openvpn/easyrsa && echo yes | easyrsa revoke lucas && easyrsa gen-crl
2021/10/15 11:22:33 openvpn-user revoke --db-path /etc/openvpn/easyrsa/pki/users.db --user lucas
2021/10/15 11:22:36 date +%Y-%m-%d\ %H:%M:%S && cd /etc/openvpn/easyrsa && echo yes | easyrsa revoke lucasio && easyrsa gen-crl
2021/10/15 11:22:36 openssl x509 -in /etc/openvpn/easyrsa/pki/ca.crt -noout -enddate | awk -F "=" {'print $2'}
2021/10/15 11:22:36 openvpn-user revoke --db-path /etc/openvpn/easyrsa/pki/users.db --user lucasio
2021/10/15 11:22:37 date +%Y-%m-%d\ %H:%M:%S && cd /etc/openvpn/easyrsa && echo yes | easyrsa revoke loko && easyrsa gen-crl
2021/10/15 11:22:37 openvpn-user revoke --db-path /etc/openvpn/easyrsa/pki/users.db --user loko
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7fc82d225298]

runtime stack:
runtime.throw({0x145ac32, 0x7fc818000d53})
        /usr/local/go/src/runtime/panic.go:1198 +0x71
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:719 +0x396

goroutine 49 [syscall]:
runtime.cgocall(0x114aa80, 0xc00005fd90)
        /usr/local/go/src/runtime/cgocall.go:156 +0x5c fp=0xc00005fd68 sp=0xc00005fd30 pc=0x4040bc
net._C2func_getaddrinfo(0xc00044fa40, 0x0, 0xc00041e660, 0xc0002c6108)
        _cgo_gotypes.go:91 +0x56 fp=0xc00005fd90 sp=0xc00005fd68 pc=0x5b21d6
net.cgoLookupIPCNAME.func1({0xc00044fa40, 0x46292e, 0x4196a5}, 0x7ffd473f77e4, 0xc00005fe50)
        /usr/local/go/src/net/cgo_unix.go:163 +0x9f fp=0xc00005fde8 sp=0xc00005fd90 pc=0x5b3a9f
net.cgoLookupIPCNAME({0x14317a8, 0x3}, {0x7ffd473f77e4, 0xc00005ff80})
        /usr/local/go/src/net/cgo_unix.go:163 +0x16d fp=0xc00005ff38 sp=0xc00005fde8 pc=0x5b32ed
net.cgoIPLookup(0x22a2a70, {0x14317a8, 0xc00044fa30}, {0x7ffd473f77e4, 0x0})
        /usr/local/go/src/net/cgo_unix.go:220 +0x3b fp=0xc00005ffa8 sp=0xc00005ff38 pc=0x5b3b5b
net.cgoLookupIP·dwrap·25()
        /usr/local/go/src/net/cgo_unix.go:230 +0x36 fp=0xc00005ffe0 sp=0xc00005ffa8 pc=0x5b3fd6
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00005ffe8 sp=0xc00005ffe0 pc=0x464b01
created by net.cgoLookupIP
        /usr/local/go/src/net/cgo_unix.go:230 +0x125

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x7fc82d2a4318, 0x72)
        /usr/local/go/src/runtime/netpoll.go:229 +0x89
internal/poll.(*pollDesc).wait(0xc00035a780, 0x203000, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc00035a780)
        /usr/local/go/src/internal/poll/fd_unix.go:402 +0x22c
net.(*netFD).accept(0xc00035a780)
        /usr/local/go/src/net/fd_unix.go:173 +0x35
net.(*TCPListener).accept(0xc00036cc00)
        /usr/local/go/src/net/tcpsock_posix.go:140 +0x28
net.(*TCPListener).Accept(0xc00036cc00)
        /usr/local/go/src/net/tcpsock.go:262 +0x3d
net/http.(*Server).Serve(0xc00011c2a0, {0x166ba48, 0xc00036cc00})
        /usr/local/go/src/net/http/server.go:3001 +0x394
net/http.(*Server).ListenAndServe(0xc00011c2a0)
        /usr/local/go/src/net/http/server.go:2930 +0x7d
net/http.ListenAndServe(...)
        /usr/local/go/src/net/http/server.go:3184
main.main()
        /github/workspace/main.go:463 +0xe45

goroutine 6 [chan receive]:
k8s.io/klog/v2.(*loggingT).flushDaemon(0x0)
        /go/pkg/mod/k8s.io/klog/v2@v2.4.0/klog.go:1169 +0x6a
created by k8s.io/klog/v2.init.0
        /go/pkg/mod/k8s.io/klog/v2@v2.4.0/klog.go:417 +0xfb

goroutine 24 [sleep]:
time.Sleep(0x684ee1800)
        /usr/local/go/src/runtime/time.go:193 +0x12e
main.(*OvpnAdmin).updateState(0xc0000c9290)
        /github/workspace/main.go:496 +0x38
created by main.main
        /github/workspace/main.go:411 +0x265

goroutine 25 [IO wait]:
internal/poll.runtime_pollWait(0x7fc82d2a4230, 0x72)
        /usr/local/go/src/runtime/netpoll.go:229 +0x89
internal/poll.(*pollDesc).wait(0xc00035a800, 0xc0003ad000, 0x0)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc00035a800, {0xc0003ad000, 0x1000, 0x1000})
        /usr/local/go/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc00035a800, {0xc0003ad000, 0x6871a0, 0xc0003d6948})
        /usr/local/go/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0xc0002c79d8, {0xc0003ad000, 0x0, 0xc000399478})
        /usr/local/go/src/net/net.go:183 +0x45
net/http.(*connReader).Read(0xc000399470, {0xc0003ad000, 0x1000, 0x1000})
        /usr/local/go/src/net/http/server.go:780 +0x16d
bufio.(*Reader).fill(0xc0003f2120)
        /usr/local/go/src/bufio/bufio.go:101 +0x103
bufio.(*Reader).ReadSlice(0xc0003f2120, 0x0)
        /usr/local/go/src/bufio/bufio.go:360 +0x2f
bufio.(*Reader).ReadLine(0xc0003f2120)
        /usr/local/go/src/bufio/bufio.go:389 +0x27
net/textproto.(*Reader).readLineSlice(0xc0003994d0)
        /usr/local/go/src/net/textproto/reader.go:57 +0x99
net/textproto.(*Reader).ReadLine(...)
        /usr/local/go/src/net/textproto/reader.go:38
net/http.readRequest(0xc0002c79d8)
        /usr/local/go/src/net/http/request.go:1029 +0x79
net/http.(*conn).readRequest(0xc0003d68c0, {0x166fad0, 0xc0002d3800})
        /usr/local/go/src/net/http/server.go:966 +0x225
net/http.(*conn).serve(0xc0003d68c0, {0x166fb78, 0xc000399380})
        /usr/local/go/src/net/http/server.go:1855 +0x865
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:3033 +0x4e8

goroutine 47 [select]:
net.(*Resolver).lookupIPAddr(0x22a2a60, {0x166fb08, 0xc000040098}, {0x14317a8, 0x0}, {0x7ffd473f77e4, 0x9})
        /usr/local/go/src/net/lookup.go:302 +0x5c7
net.(*Resolver).internetAddrList(0x166fb08, {0x166fb08, 0xc000040098}, {0x14317a8, 0x3}, {0x7ffd473f77e4, 0xe})
        /usr/local/go/src/net/ipsock.go:288 +0x67a
net.(*Resolver).resolveAddrList(0xc000040098, {0x166fb08, 0xc000040098}, {0x1431ad6, 0x4}, {0x14317a8, 0x0}, {0x7ffd473f77e4, 0xe}, {0x0, ...})
        /usr/local/go/src/net/dial.go:221 +0x41b
net.(*Dialer).DialContext(0xc00006dde8, {0x166fb08, 0xc000040098}, {0x14317a8, 0xa}, {0x7ffd473f77e4, 0x50000c00005ee00})
        /usr/local/go/src/net/dial.go:406 +0x448
net.(*Dialer).Dial(...)
        /usr/local/go/src/net/dial.go:351
net.Dial({0x14317a8, 0x50}, {0x7ffd473f77e4, 0x1})
        /usr/local/go/src/net/dial.go:319 +0x7a
main.(*OvpnAdmin).mgmtGetActiveClients(0xc0000c9290)
        /github/workspace/main.go:1043 +0x139
main.(*OvpnAdmin).setState(0xc0000c9290)
        /github/workspace/main.go:488 +0x25
created by main.(*OvpnAdmin).updateState
        /github/workspace/main.go:501 +0x29

goroutine 48 [select]:
net.cgoLookupIP({0x166fad0, 0xc0002d2140}, {0x14317a8, 0x9}, {0x7ffd473f77e4, 0xc000381520})
        /usr/local/go/src/net/cgo_unix.go:231 +0x1b7
net.(*Resolver).lookupIP(0x22a2a60, {0x166fad0, 0xc0002d2140}, {0x14317a8, 0x3}, {0x7ffd473f77e4, 0x9})
        /usr/local/go/src/net/lookup_unix.go:97 +0x128
net.glob..func1({0x166fad0, 0xc0002d2140}, 0x7fc82d2a4148, {0x14317a8, 0x0}, {0x7ffd473f77e4, 0x40640a})
        /usr/local/go/src/net/hook.go:23 +0x3d
net.(*Resolver).lookupIPAddr.func1()
        /usr/local/go/src/net/lookup.go:296 +0x9f
internal/singleflight.(*Group).doCall(0x22a2a70, 0xc0003ea820, {0xc00044fa30, 0xd}, 0x0)
        /usr/local/go/src/internal/singleflight/singleflight.go:95 +0x3b
created by internal/singleflight.(*Group).DoChan
        /usr/local/go/src/internal/singleflight/singleflight.go:88 +0x2f1


@pashcovich
Copy link
Contributor

i will try to check it some later

@pashcovich pashcovich self-assigned this Oct 15, 2021
@pashcovich pashcovich added the bug Something isn't working label Oct 15, 2021
@jducifuentes jducifuentes changed the title prebuilt binary gives message 404 then crashes prebuilt binary crashes Oct 15, 2021
@pashcovich
Copy link
Contributor

I can't reproduce your error. do you still have them?

@jducifuentes
Copy link
Author

Yes I don't know what is causing the problem. I'm not used with go language and don't know what to try. I'm working right now with docker flavour and having some issues also but I think I'll go with this route and try to make it usable.

@pashcovich
Copy link
Contributor

@jducifuentes have you tried with latest version?

@jducifuentes
Copy link
Author

jducifuentes commented Dec 1, 2021

Not yet, finally I build form source and it's working so.... if it works don't touch it.... :)

@pashcovich
Copy link
Contributor

ok, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants