Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When container running only under SSL /health endpoint check throws error. #538

Open
arawinters opened this issue Apr 8, 2024 · 0 comments
Assignees

Comments

@arawinters
Copy link
Contributor

arawinters commented Apr 8, 2024

Describe the bug
When running the search webapp container only on the SSL port and passing the appropriate SENZING_WEB_SERVER_URL env var with a https protocol the container healtcheck script throws an error.

Reason for error
there is no detection of protocol from SENZING_WEB_SERVER_URL or the SENZING_WEB_SERVER_PROTOCOL variable. http is always used.

Solution
Add a switch or if/else statement to do a https.get instead of a http.get when appropriate.
The following code blocks need to be modified to resolve in this scenario:

Expected behavior
healthcheck responds without error.

Error Stack

TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
    at new NodeError (node:internal/errors:387:5)
    at new ClientRequest (node:_http_client:186:11)
    at request (node:http:97:10)
    at Object.get (node:http:108:15)
    at HealthCheckerUtility.checkIfWebServerAlive (/app/run/health/index.js:35:24)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7) {
  code: 'ERR_INVALID_PROTOCOL'
@github-actions github-actions bot added the triage label Apr 8, 2024
arawinters added a commit that referenced this issue Apr 9, 2024
arawinters added a commit that referenced this issue Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants