Groups
Groups
Sign in
Groups
Groups
vert.x
Conversations
About
Send feedback
Help
How to test health checks?
80 views
Skip to first unread message
Konstantyn Smirnov
unread,
Oct 10, 2017, 9:18:46 AM
10/10/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vert.x
Hello all
I added the dependency:
compile 'io.vertx:vertx-health-check:3.4.2'
and the code to the start() method:
HealthChecks healthChecks = HealthChecks.create vertx
HealthCheckHandler hch = HealthCheckHandler.createWithHealthChecks healthChecks
hch.register( 'db' ){ Future<Status> future ->
try{
checksmth()
future.complete Status.OK()
}catch( Throwable t ){
future.complete Status.KO()
}
}
Router.router( vertx ).get( '/health' ).handler hch
When I try to curl
http://localhost/health
, it sez:
curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused.
What am I missing?
Message has been deleted
Alexander Lehmann
unread,
Oct 10, 2017, 11:42:19 AM
10/10/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vert.x
connection refused would indicate that the server is not listening, are you sure you are starting to listen with the server in the start() method?
Reply all
Reply to author
Forward
0 new messages