Closed rhyslbw closed 4 years ago
Agreed. I have on the TODO list to make the log better. Now it's simply logging this as an "UnknownException" whereas this is a perfectly known and expected scenario.
I'll use that ticket for tracking the work :+1:
Would be good to present the root URL since it's serving as a landing page. It's not actually working for me though; the health check is just reporting File not found
Interesting. The health check is actually an HTTP server serving some static files which are "mounted" at compile-time. So in principle, if the files are missing, it simply does not compile. I cannot reproduce on my side. Passing an invalid socket path gives me:
ogmios_1 | [ogmios:Info:4] [2020-09-30 14:15:03.74 UTC] OgmiosLookupEnv (LookupUserDefinedNetwork {using = ("testnet",NetworkMagic {unNetworkMagic = 1097911063})})
ogmios_1 | [ogmios:Error:13] [2020-09-30 14:15:03.74 UTC] OgmiosUnknownException {exception = Network.Socket.connect: <socket: 13>: does not exist (No such file or directory)}
ogmios_1 | [ogmios:Warning:4] [2020-09-30 14:15:03.74 UTC] OgmiosSocketNotFound {path = "/patate"}
ogmios_1 | [ogmios:Info:4] [2020-09-30 14:15:03.74 UTC] OgmiosStarted {host = "0.0.0.0", port = 1337}
And then:
$ curl http://localhost:1337/health | jq
{
"runtimeStats": {
"productivity": 0.62,
"maxHeapSize": 209
},
"lastTipUpdate": null,
"lastKnownTip": "origin",
"totalConnections": 0,
"sessionsDuration": {
"max": 0,
"mean": null,
"min": 0
},
"activeConnections": 0
}
which is pretty much what I'd expect.
@rhyslbw could it be that you have another service listening on :1337 ?
40c7a9259b921dbfe9f5f0e901485b43d57db78f should improve the error message and the behavior of the health application when it can't connects to the node.
@KtorZ Ah :facepalm: There's no issue here, I was just using the wrong build. Will add some more information to the README in #4
What Git revision are you using?
bc8872b594c5ec1d34fa919705962eb248d2b587
What operating system are you using, and which version?
Describe what the problem is?
Since
cardano-node
doesn't immediately create the socket, and Ogmios doesn't log further status after reporting the warning, it's not clear from the outside if it's performing a retry.What should be the expected behavior?
Ogmios finds the socket after the node creates it, and the health check returns the success response.