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

Nil pointer on starting vpn-client #1134

Closed
ersonp opened this issue Mar 16, 2022 · 0 comments
Closed

Nil pointer on starting vpn-client #1134

ersonp opened this issue Mar 16, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ersonp
Copy link
Contributor

ersonp commented Mar 16, 2022

Describe the bug
invalid memory address or nil pointer dereference panic is seen in vpn-client when starting. This seems to happen when the connection to dmsg is lost

Environment information:

  • OS: docker image
  • Platform: k8s
2022/03/16 13:33:33 [lke31049-46687-60e7964454d2/DGadhYabIG-000124] "GET http://localhost:8000/api/visors/038932d71a4c065f6ed627a3f5e274cb5918fa0e9a59cf98781cef4d32a2d3c422/summary HTTP/1.1" from 127.0.0.1:57678 - 200 1790B in 26.368065ms
[2022-03-16T13:33:34Z] INFO [visor]: Changing vpn-client password to ""
[2022-03-16T13:33:34Z] INFO [visor:config]: Flushing config to file. config_version="v1.1.1" filepath="/etc/skywire/skywire-visor.json"
[2022-03-16T13:33:34Z] INFO [visor]: Updated vpn-client password
[2022-03-16T13:33:34Z] INFO [visor]: Changing vpn-client PK to "038932d71a4c065f6ed627a3f5e274cb5918fa0e9a59cf98781cef4d32a2d3c422"
[2022-03-16T13:33:34Z] INFO [visor:config]: Flushing config to file. config_version="v1.1.1" filepath="/etc/skywire/skywire-visor.json"
[2022-03-16T13:33:34Z] INFO [visor]: Updated vpn-client PK
2022/03/16 13:33:34 [lke31049-46687-60e7964454d2/DGadhYabIG-000125] "PUT http://localhost:8000/api/visors/038932d71a4c065f6ed627a3f5e274cb5918fa0e9a59cf98781cef4d32a2d3c422/apps/vpn-client HTTP/1.1" from 127.0.0.1:57678 - 200 83B in 31.226105ms
[2022-03-16T13:33:34Z] INFO [dmsg_trackers]: failed to re-create dmsgtracker client error="dmsg error 100 - entry is not found in discovery"
[2022-03-16T13:33:34Z] INFO [dmsg_trackers]: failed to re-create dmsgtracker client error="dmsg error 100 - entry is not found in discovery"
2022/03/16 13:33:34 [lke31049-46687-60e7964454d2/DGadhYabIG-000126] "GET http://localhost:8000/api/visors/038932d71a4c065f6ed627a3f5e274cb5918fa0e9a59cf98781cef4d32a2d3c422/summary HTTP/1.1" from 127.0.0.1:57678 - 200 1875B in 22.010837ms

 panic: runtime error: invalid memory address or nil pointer dereference
 
 -> github.com/skycoin/skywire/pkg/transport.(*Manager).STCPRRemoteAddrs
 ->   /skywire/pkg/transport/manager.go:463

    github.com/skycoin/skywire/pkg/visor.(*Visor).StartApp
      /skywire/pkg/visor/api.go:315
    github.com/skycoin/skywire/pkg/visor.(*Hypervisor).putApp.func1
      /skywire/pkg/visor/hypervisor.go:679
    github.com/skycoin/skywire/pkg/visor.(*Hypervisor).withCtx.func1
      /skywire/pkg/visor/hypervisor.go:1416
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5.(*ChainHandler).ServeHTTP
      /skywire/vendor/github.com/go-chi/chi/v5/chain.go:31
    github.com/go-chi/chi/v5.(*Mux).routeHTTP
      /skywire/vendor/github.com/go-chi/chi/v5/mux.go:444
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5/middleware.Timeout.func1.1
      /skywire/vendor/github.com/go-chi/chi/v5/middleware/timeout.go:45
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5.(*Mux).ServeHTTP
      /skywire/vendor/github.com/go-chi/chi/v5/mux.go:73
    github.com/go-chi/chi/v5.(*Mux).Mount.func1
      /skywire/vendor/github.com/go-chi/chi/v5/mux.go:316
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5.(*Mux).routeHTTP
      /skywire/vendor/github.com/go-chi/chi/v5/mux.go:444
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5.(*Mux).ServeHTTP
      /skywire/vendor/github.com/go-chi/chi/v5/mux.go:73
    github.com/go-chi/chi/v5.(*Mux).Mount.func1
      /skywire/vendor/github.com/go-chi/chi/v5/mux.go:316
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5.(*Mux).routeHTTP
      /skywire/vendor/github.com/go-chi/chi/v5/mux.go:444
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/skycoin/skywire-utilities/pkg/httputil.SetLoggerMiddleware.func1.1
      /skywire/vendor/github.com/skycoin/skywire-utilities/pkg/httputil/httputil.go:99
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5/middleware.Recoverer.func1
      /skywire/vendor/github.com/go-chi/chi/v5/middleware/recoverer.go:43
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5/middleware.RequestLogger.func1.1
      /skywire/vendor/github.com/go-chi/chi/v5/middleware/logger.go:57
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5/middleware.RealIP.func1
      /skywire/vendor/github.com/go-chi/chi/v5/middleware/realip.go:36
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5/middleware.RequestID.func1
      /skywire/vendor/github.com/go-chi/chi/v5/middleware/request_id.go:76
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2046
    github.com/go-chi/chi/v5.(*Mux).ServeHTTP
      /skywire/vendor/github.com/go-chi/chi/v5/mux.go:90
    net/http.serverHandler.ServeHTTP
      /usr/local/go/src/net/http/server.go:2878
    net/http.(*conn).serve
      /usr/local/go/src/net/http/server.go:1929
    created by net/http.(*Server).Serve
      /usr/local/go/src/net/http/server.go:3033
    
@ersonp ersonp added the bug Something isn't working label Mar 16, 2022
@jdknives jdknives closed this as completed Apr 6, 2022
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