We are using OpenShift Online Pro.
I have an app where I want to add a readiness health check. If I check the URL from my laptop it is good:
simon$ curl --head http://x.y.pro-eu-west-1.openshiftapps.com/api/ready
HTTP/1.1 200 OK
If I use the console to add the checks it suggests "HTTP GET", "/api/ready" on the listening port "8080". The docs at https://docs.openshift.com/online/dev_guide/application_health.html suggest 15s delay and 1s timeout might be reasonable so I give that a go.
Exporting the dc/backend shows:
readinessProbe:
failureThreshold: 3
httpGet:
path: /api/ready
port: 8080
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
This gives events with errors such as:
Readiness probe failed: Get http://10.130.7.168:8080/api/ready: dial tcp 10.130.7.168:8080: getsockopt: connection refused
The app is PHP so fast to start but after 5 minutes and 28 of those warnings I give up and delete the health check.
If I then wait to see "Created container" for the next deployment I can go and curl the "/api/ready" inside of one minute and get a healthy response.
What am I missing to get the check to work?
http://localhost:8080/index.php
. So it seems that the server isn't accepting traffic accept from the public route. – simbo1905curl http://localhost:8000/api/ready
it gives a "$?" of 0. if Icurl http://localhost:8080/api/ready
I get connection denied. Yet I haven't seen anything in the config that names 8000. nor anything in my question. – simbo1905dc/backend
I was able to find your project. Then usingoc get all
I saw your service was configured to serve port 8000. – Will Gordon