You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ kubectl -n codefresh-workers logs -f deployment.apps/cf-runtime-app-proxy
Found 3 pods, using pod/cf-runtime-app-proxy-995b74d8d-7bktr
Using newrelic: {"config":{"app_name":"app-proxy [production]","logging":{"enabled":false,"level":"info"},"error_collector":{"ignore_status_codes":["400-600"]}}}
New Relic for Node.js halted startup due to an error:
Error: Not starting without license key!
at onNextTick (/app/cf-app-proxy/node_modules/newrelic/lib/agent.js:245:16)
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
[2023-12-21T20:25:02.733Z INFO] >> validating connection to "https://g.codefresh.io/" {"namespace":"codefresh:index"}
[2023-12-21T20:25:02.894Z INFO] >> connection to platform validated {"namespace":"codefresh:index"}
[2023-12-21T20:25:02.895Z INFO] >> initializing server {"namespace":"codefresh:index"}
[2023-12-21T20:25:02.899Z INFO] >> app proxy running on ::3000 {"namespace":"codefresh:index"}
[2023-12-21T20:25:06.237Z] GET /health 404 145 - 4.530 ms
[2023-12-21T20:25:11.225Z] GET /health 404 145 - 0.652 ms
[2023-12-21T20:25:16.226Z] GET /health 404 145 - 0.765 ms
[2023-12-21T20:25:21.225Z] GET /health 404 145 - 0.617 ms
[2023-12-21T20:25:26.225Z] GET /health 404 145 - 0.583 ms
[2023-12-21T20:25:31.225Z] GET /health 404 145 - 0.492 ms
[2023-12-21T20:25:36.225Z] GET /health 404 145 - 0.357 ms
I can show that this works locally by running the container and curling the health endpoint:
❯ docker run --rm -it -p 3000:3000 -P quay.io/codefresh/cf-app-proxy:0.0.45
Using newrelic: {"config":{"app_name":"app-proxy [production]","logging":{"enabled":false,"level":"info"},"error_collector":{"ignore_status_codes":["400-600"]}}}
New Relic for Node.js halted startup due to an error:
Error: Not starting without license key!
at onNextTick (/app/cf-app-proxy/node_modules/newrelic/lib/agent.js:245:16)
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
[2023-12-21T20:41:49.490Z INFO] >> validating connection to "https://g.codefresh.io" {"namespace":"codefresh:index"}
[2023-12-21T20:41:49.693Z INFO] >> connection to platform validated {"namespace":"codefresh:index"}
[2023-12-21T20:41:49.693Z INFO] >> initializing server {"namespace":"codefresh:index"}
[2023-12-21T20:41:49.697Z INFO] >> app proxy running on ::3000 {"namespace":"codefresh:index"}
^C[2023-12-21T20:51:43.438Z INFO] >> got SIGTERM, exiting gracefully {"namespace":"codefresh:server:index"}
[2023-12-21T20:51:43.440Z INFO] >> server exited gracefully {"namespace":"codefresh:server:index"}
❯ curl 127.0.0.1:3000/health
ok%
With this information I tested this by port-forwarding to the running pod and adding an additional / to the health check when I did a curl:
❯ kubectl -n codefresh-workers port-forward deployments/cf-runtime-app-proxy 3000:3000
Forwarding from 127.0.0.1:3000 -> 3000
Forwarding from [::1]:3000 -> 3000
Handling connection for 3000
Handling connection for 3000
Health check fails with defaults:
I can show that this works locally by running the container and curling the health endpoint:
With this information I tested this by port-forwarding to the running pod and adding an additional
/
to the health check when I did a curl:I think the issue is here, and should be an empty string, maybe?
Either that or you expect a double
//
as the API path prefix? In which case the solution would be to use//health
as the probe endpoint:Update: I can confirm that setting
API_PATH_PREFIX
as an empty string""
fixes the healthcheck.The text was updated successfully, but these errors were encountered: