Open RdeWilde opened 2 years ago
Thanks for the detailed report. I'll see what we can do to handle the initial startup more elegantly
@rhyslbw same issue, after restart graphql, the running node index.js does not listen 3100 port at all!
root@a66dfb3debcf:/app/packages/server/dist# netstat -ntulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.11:34583 0.0.0.0:* LISTEN -
udp 0 0 127.0.0.11:58658 0.0.0.0:* -
root@a66dfb3debcf:/app/packages/server/dist# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 07:13 ? 00:00:01 node index.js
root 103 0 0 07:16 pts/0 00:00:00 /bin/bash
root 116 103 0 07:18 pts/0 00:00:00 ps -ef
Summary
When booting my node, it'll start syncing (after installing the snapshot) which will take some time. This results in sockets not being available yet etc. Therefore cardano-graphql will exit.
To get the graphql up and running I have to manually restart it after sync has completed.
How can I make it restart automatically or something like that? I hoped it already did, but after waiting an hour I gave up 😅
Steps to reproduce the bug
curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://localhost:3100/graphql
, it'll give you the 'actual result'docker restasrt cardano-graphql
Actual Result
Expected Result
Environment
Platform
Platform version
20.04
Runtime
Runtime version
20.10.17, build 100c701