How do I debug what microservice is unhealthy in the JFrog platform

Matthew Wang
2023-01-22 11:09

-Run the below API which will have the router micro service return the status of the other microservices in the platform:
curl -s http://localhost:8046/router/api/v1/topology/health

Unhealthy Response:
503 SERVICE UNAVAILABLE
Content-Type: application/json
{
"router": {
"node_id": "dsf76s-f87df86sdf-kjhsdg329",
"state": "HEALTHY",
"message": "OK"
},
"services": [
{
"service_id": "jfrt@01ddqsvzvsyt1c1ntks8qt0na4",
"node_id": "ba8b710356ee6a97:-7197168a:16b73594a99:-8000",
"state": "UNHEALTHY_PEER",
"message": "Service is healthy; there is at least one unhealthy service"
},{
"service_id": "jfnd@c623d3fd4dbc28183de7c92aa11091be6d94cf97",
"node_id": "nodeId1234",
"state": "UNHEALTHY",
"message": "Get http://localhost:3000/health: dial tcp 127.0.0.1:3000: connect: connection refused"
},

Then, you can enable debug logging for the respective micro service.
//www.si-fil.com/confluence/display/JFROG/Logging

-You can also enable debug logging for the router in the system.yaml:

router:
logging:
## Router log settings
application:
## The log level: error, warning, info, debug, trace
## This value is configurable during runtime
level: "info"