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

Seems to connect to localhost even though HYDRA_ADMIN_URL is set #133

Open
3 of 6 tasks
wvh opened this issue Nov 14, 2022 · 3 comments
Open
3 of 6 tasks

Seems to connect to localhost even though HYDRA_ADMIN_URL is set #133

wvh opened this issue Nov 14, 2022 · 3 comments
Labels
bug Something is not working.

Comments

@wvh
Copy link

wvh commented Nov 14, 2022

Preflight checklist

Describe the bug

Hello,

I'm trying this hydra-login-consent-node example on a real Kubernetes cluster I'm setting up, and even though I've got HYDRA_ADMIN_URL set to a real hostname, I'm getting this error:

request to https://localhost:4445/admin/oauth2/auth/requests/login?login_challenge=abc123 failed, reason: connect ECONNREFUSED 127.0.0.1:4445

I logged into the pod and the URL is set properly in the environment, so I'm wondering if that localhost URL is hardcoded somewhere.

Reproducing the bug

FetchError: request to https://localhost:4445/admin/oauth2/auth/requests/login?login_challenge=abc123 failed, reason: connect ECONNREFUSED 127.0.0.1:4445
at ClientRequest. (/usr/src/app/node_modules/node-fetch/lib/index.js:1455:11)
at ClientRequest.emit (events.js:182:13)
at TLSSocket.socketErrorListener (_http_client.js:382:9)
at TLSSocket.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)445instead of actual service hostname set inHYDRA_ADMIN_URL`

Relevant log output

request to https://localhost:4445/admin/oauth2/auth/requests/login?login_challenge=abc123 failed, reason: connect ECONNREFUSED 127.0.0.1:4445

FetchError: request to https://localhost:4445/admin/oauth2/auth/requests/login failed, reason: connect ECONNREFUSED 127.0.0.1:4445
    at ClientRequest.<anonymous> (/usr/src/app/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:182:13)
    at TLSSocket.socketErrorListener (_http_client.js:382:9)
    at TLSSocket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Relevant configuration

helm install \
	--namespace hydra \
	--set 'hydraAdminUrl=http://oauth-hydra-admin:4445/' \
	--set 'hydraPublicUrl=https://oauth.example.com/' \
	--set 'ingress.enabled=true' \
	hydra-example-idp \
	ory/example-idp

Version

v2.0.2

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Kubernetes with Helm

Additional Context

No response

@wvh wvh added the bug Something is not working. label Nov 14, 2022
@jonasbadstuebner
Copy link

This is the same case for me, apparently, even though I'm getting the error on IPv6. (::1::4445)

@andremarianiello
Copy link

HYDRA_ADMIN_URL needs to be a url (e.g. it needs a scheme, like http://). This was the problem for me.

@gmarcha
Copy link

gmarcha commented Apr 4, 2023

I had same problem too using example-idp Helm chart.

I noticed that image tag version was quite old (v1.4.6, referencing HYDRA_ADMIN_URL in this file).

Updating values with image tag version to latest (v2.1.0) solved my problem. A newer version could be added to Helm chart default values ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

4 participants