panic: runtime error: invalid memory address or nil pointer dereference #24
Closed
Description
When running example krakend.json we get following error
[GIN-debug] Listening and serving HTTP on XXXX
[GIN-debug] [ERROR] listen tcp: address XXXX: missing port in address
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x45d3279]
goroutine 1 [running]:
github.com/luraproject/lura/v2/router/gin.ginRouter.Run({{0xc00037d040, {0x0, 0x0, 0x0}, 0xc0003f39c0, {0x47e9440, 0xc000460840}, {0x47fea60, 0xc000427bf0}, 0x0}, ...}, ...)
/Users/rajan/.gvm/pkgsets/go1.17/global/pkg/mod/github.com/luraproject/lura/v2@v2.0.0/router/gin/router.go:111 +0x219
main.main()
/Users/rajan/Desktop/projects/krakend-martian/example/main.go:51 +0x6f8
exit status 2
I updated the krakend.json
version to following
"version": 3,
Go version: go1.17
OS: MacOS 12.1
When I run the go file using go run example/main.go -c example/krakend.json -d -p 8080
I get above error.
EDIT:
I also tried to checkout v1.4.0
and tried running the old version but it did not work either and failed with the same error.