[bug] listen endpoint panic but program still run
zhyass opened this issue · 2 comments
zhyass commented
The config json file:
"server": {
"endpoint": "test-krypton-1.test-krypton.default:8801"
},
When the container start, get error logs:
2021/04/16 03:18:29.911339 trace.go:32: [WARNING] FOLLOWER[ID:test-krypton-1.test-krypton.default:8801, V:0, E:0].state.init
2021/04/16 03:18:29.913554 server.go:186: [PANIC] server.rpc.start.error[listen tcp: lookup test-krypton-1.test-krypton.default on 10.96.0.10:53: no such host
xbase/xrpc.(*Service).Start
/go/src/github.com/radondb/xenon/src/xbase/xrpc/xrpc.go:54
server.(*Server).Start
/go/src/github.com/radondb/xenon/src/server/server.go:185
main.main
/go/src/github.com/radondb/xenon/src/xenon/xenon.go:79
runtime.main
/usr/local/go/src/runtime/proc.go:203
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1357]
According to normal logic, the program should exit at this time. Actually xenon still run because of the code recover() , but we cannot listen the endpoint.
zhyass commented
Currently we want to use the publishNotReadyAddresses
parameter in kubernetes to be able to access pods even if the pod is not ready. From this kubernetes/kubernetes#92559 , even if this parameter is used, we may still need to wait 30s after pod creation. So we add retrys 30s for set the listener.
andyli029 commented
Good job.