helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.5k stars 566 forks source link

Ping statement caused CompletionException #2607

Closed hantsy closed 3 years ago

hantsy commented 3 years ago

Environment Details

Step

Ping statement config:

db:
 statement:
   ping: "select 1" 

Updated to 2.1 from 2.0-m1, got 503 status and the java.util.concurrent.CompletionException in the response body when hinting /health endpoint.

{"ErrorClass":"java.util.concurrent.CompletionException",
"ErrorMessage":"org.postgresql.util.PSQLException: A result was returned when none was expected."}
tomas-langer commented 3 years ago

Hello, this should be fixed in 2.2.0 - the next release (we are preparing right now).

hantsy commented 3 years ago

@tomas-langer I updated to 2.2, but the same result.

curl http://localhost:8080/health
{"outcome":"DOWN","status":"DOWN","checks":[{"name":"deadlock","state":"UP","status":"UP"},{"name":"diskSpace","state":"UP","status":"UP","data":{"free":"103.36 GB","freeBytes":110985498624,"percentFree":"59.05%","total":"175.04 GB","totalBytes":187950952448}},{"name":"heapMemory","state":"UP","status":"UP","data":{"free":"229.78 MB","freeBytes":240944432,"max":"3.92 GB","maxBytes":4213178368,"percentFree":"99.45%","total":"252.00 MB","totalBytes":264241152}},{"name":"jdbc:postgresql","state":"DOWN","status":"DOWN","data":{"ErrorClass":"java.util.concurrent.CompletionException","ErrorMessage":"org.postgresql.util.PSQLException: A result was returned when none was expected."}}]}
hantsy commented 3 years ago

For the DB connection verification, I hope it is embedded in Helidon itself, each database could be different.