[Bug]: "[Auth] Error in openid callback - Error: connect ECONNREFUSED #2050

Closed
opened 2026-04-25 00:02:58 +02:00 by adam · 2 comments
Owner

Originally created by @ncavallini on GitHub (Jun 12, 2024).

What happened?

I'm using Audiobookshelf with OAuth2 provided by authentik.
It normally works fine (till yesterday) but since today, when I try logging in with SSO, after a successful authentication on authentik, Abs doesn't let me in with an "Error in callback" message.
I didn't change neither authentik nor Abs config.
On Abs' logs I see: "[Auth] Error in openid callback - Error: connect ECONNREFUSED 2a04:ee41:4:1b94::1:443" and on the Authentication tab in the settings, I get the same error when I click the Autopopulate button. The strange thing is, that if I try to browse the configuration url from the same host Abs is running on, it works just fine.

My authentik is running behind Ngnix proxy manager.

Thank you for your time

What did you expect to happen?

A normal and successful login

Steps to reproduce the issue

  1. Config Abs to use OIDC with authentik
  2. Try to login

Audiobookshelf version

2.10.1

How are you running audiobookshelf?

Windows Tray App

What OS is your Audiobookshelf server hosted from?

Windows

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Chrome

Logs

[Auth] Error in openid callback - Error: connect ECONNREFUSED 2a04:ee41:4:1b94::1:443

Additional Notes

No response

Originally created by @ncavallini on GitHub (Jun 12, 2024). ### What happened? I'm using Audiobookshelf with OAuth2 provided by authentik. It normally works fine (till yesterday) but since today, when I try logging in with SSO, after a successful authentication on authentik, Abs doesn't let me in with an "Error in callback" message. I didn't change neither authentik nor Abs config. On Abs' logs I see: `"[Auth] Error in openid callback - Error: connect ECONNREFUSED 2a04:ee41:4:1b94::1:443"` and on the Authentication tab in the settings, I get the same error when I click the Autopopulate button. The strange thing is, that if I try to browse the configuration url from the same host Abs is running on, it works just fine. My authentik is running behind Ngnix proxy manager. Thank you for your time ### What did you expect to happen? A normal and successful login ### Steps to reproduce the issue 1. Config Abs to use OIDC with authentik 2. Try to login ### Audiobookshelf version 2.10.1 ### How are you running audiobookshelf? Windows Tray App ### What OS is your Audiobookshelf server hosted from? Windows ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Chrome ### Logs ```shell [Auth] Error in openid callback - Error: connect ECONNREFUSED 2a04:ee41:4:1b94::1:443 ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:02:58 +02:00
adam closed this issue 2026-04-25 00:02:58 +02:00
Author
Owner

@Sapd commented on GitHub (Jun 12, 2024):

Is 2a04:ee41:4:1b94::1 the right IP?
Can you do a curl 2a04:ee41:4:1b94::1:443 from inside and outside the container?

In the end its definitely just a networking issue (unrelated to abs itself).

@Sapd commented on GitHub (Jun 12, 2024): Is `2a04:ee41:4:1b94::1` the right IP? Can you do a `curl 2a04:ee41:4:1b94::1:443` from inside and outside the container? In the end its definitely just a networking issue (unrelated to abs itself).
Author
Owner

@ncavallini commented on GitHub (Jun 13, 2024):

It was actually a DNS issue. Somehow my PC cached this wrong IPv6 address! Sorry for bothering you

@ncavallini commented on GitHub (Jun 13, 2024): It was actually a DNS issue. Somehow my PC cached this wrong IPv6 address! Sorry for bothering you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2050