[Bug]: OpenID Connect Failing against Authentik - RPError: outgoing request timed out #1769

Closed
opened 2026-04-24 23:57:36 +02:00 by adam · 12 comments
Owner

Originally created by @M-Davies on GitHub (Feb 26, 2024).

Describe the issue

I have an audiobookshelf docker installation that's configured to talk to my docker authentik instance over the open internet. However, I have been getting a timed out error in the logs and an unauthorised error in the audiobookshelf UI after the user has logged in and authentik hands back control to audiobookshelf:

image
Error in the UI after logging in with Authentik

The error in the logs is a very strange timeout error:

$ docker logs --since 5m audiobookshelf
[2024-02-26 20:58:45.402] ERROR: [Auth] No data in openid callback - RPError: outgoing request timed out after 3500ms (Auth.js:424)

Now the request from Audiobookshelf to Authentik (e.g. curl -v https://auth.<mydomain.com>/application/o/audiobookshelf/.well-known/openid-configuration from inside the audiobookshelf container) does seem to take around 6 seconds on average, which could be related to the timeout. In which case, I'd like an idea on what I can do to increase the timeout time?

My authentik and audiobookshelf configurations are below. Appreciate any help!

2024-02-26 21_29_27-Window
Authentik config part 1
image
Authentik config part 2

2024-02-26 21_12_01-Window
Audiobookshelf configuration

Steps to reproduce the issue

  1. Configure authentik and audiobookshelf as above
  2. Click login with authentik
  3. Login to authentik
  4. See "Unauthorised" error in UI and the timeout error in the logs

Audiobookshelf version

v2.8.0

How are you running audiobookshelf?

Docker

Originally created by @M-Davies on GitHub (Feb 26, 2024). ### Describe the issue I have an audiobookshelf docker installation that's configured to talk to my docker authentik instance over the open internet. However, I have been getting a timed out error in the logs and an unauthorised error in the audiobookshelf UI after the user has logged in and authentik hands back control to audiobookshelf: ![image](https://github.com/advplyr/audiobookshelf/assets/25231953/4b4d134d-4397-459d-8b72-2e9b1b19feed) *Error in the UI after logging in with Authentik* The error in the logs is a very strange timeout error: ``` $ docker logs --since 5m audiobookshelf [2024-02-26 20:58:45.402] ERROR: [Auth] No data in openid callback - RPError: outgoing request timed out after 3500ms (Auth.js:424) ``` Now the request from Audiobookshelf to Authentik (e.g. `curl -v https://auth.<mydomain.com>/application/o/audiobookshelf/.well-known/openid-configuration` from inside the audiobookshelf container) does seem to take around 6 seconds on average, which could be related to the timeout. In which case, I'd like an idea on what I can do to increase the timeout time? My authentik and audiobookshelf configurations are below. Appreciate any help! ![2024-02-26 21_29_27-Window](https://github.com/advplyr/audiobookshelf/assets/25231953/f1770087-3d09-4a54-967d-556dc91467e8) *Authentik config part 1* ![image](https://github.com/advplyr/audiobookshelf/assets/25231953/e733ebcc-c612-49c6-ab4e-d20aacc362ae) *Authentik config part 2* ![2024-02-26 21_12_01-Window](https://github.com/advplyr/audiobookshelf/assets/25231953/d0c6d9de-60b7-47dc-8f1b-fb80eca17625) *Audiobookshelf configuration* ### Steps to reproduce the issue 1. Configure authentik and audiobookshelf as above 2. Click login with authentik 3. Login to authentik 4. See "Unauthorised" error in UI and the timeout error in the logs ### Audiobookshelf version v2.8.0 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:57:36 +02:00
adam closed this issue 2026-04-24 23:57:36 +02:00
Author
Owner

@advplyr commented on GitHub (Feb 27, 2024):

Updated the timeout to 10 seconds

@advplyr commented on GitHub (Feb 27, 2024): Updated the timeout to 10 seconds
Author
Owner

@M-Davies commented on GitHub (Feb 27, 2024):

Probably a bit late now but a timer of 30 seconds might have been better to handle slower connections than mine or times of high traffic

@M-Davies commented on GitHub (Feb 27, 2024): Probably a bit late now but a timer of 30 seconds might have been better to handle slower connections than mine or times of high traffic
Author
Owner

@Sapd commented on GitHub (Feb 27, 2024):

Probably a bit late now but a timer of 30 seconds might have been better to handle slower connections than mine or times of high traffic

There is a serious performance problem in the application/system or network then (and it's unlikely that there are not other issues using that too). Esp ABS <-> IdP should definitely not take that long to load.

@Sapd commented on GitHub (Feb 27, 2024): > Probably a bit late now but a timer of 30 seconds might have been better to handle slower connections than mine or times of high traffic There is a serious performance problem in the application/system or network then (and it's unlikely that there are not other issues using that too). Esp ABS <-> IdP should definitely not take that long to load.
Author
Owner

@advplyr commented on GitHub (Mar 17, 2024):

Updated in v2.8.1

@advplyr commented on GitHub (Mar 17, 2024): Updated in [v2.8.1](https://github.com/advplyr/audiobookshelf/releases/tag/v2.8.1)
Author
Owner

@MichaBrugger commented on GitHub (Apr 4, 2024):

As far as I can tell I have the exact same problem. Same setup, same settings, same timeout. However, I already am using v2.8.1 🤔 Anyone else experiencing the same?

@MichaBrugger commented on GitHub (Apr 4, 2024): As far as I can tell I have the exact same problem. Same setup, same settings, same timeout. However, I already am using v2.8.1 🤔 Anyone else experiencing the same?
Author
Owner

@advplyr commented on GitHub (Apr 5, 2024):

@MichaBrugger What is the actual error log?

@advplyr commented on GitHub (Apr 5, 2024): @MichaBrugger What is the actual error log?
Author
Owner

@MichaBrugger commented on GitHub (Apr 5, 2024):

@advplyr, thanks for the quick response!

The error-log in ABS says: [Auth] No data in openid callback - OPError: expected 200 OK, got: 404 Not Found, together with the unauthorised screen as described above. Generally speaking I use the exact same settings as described by @M-Davies. Thank you for looking into it, much appreciated!

Would it help if I also sent the Debug log?

@MichaBrugger commented on GitHub (Apr 5, 2024): @advplyr, thanks for the quick response! The error-log in ABS says: `[Auth] No data in openid callback - OPError: expected 200 OK, got: 404 Not Found`, together with the unauthorised screen as described above. Generally speaking I use the exact same settings as described by @M-Davies. Thank you for looking into it, much appreciated! Would it help if I also sent the Debug log?
Author
Owner

@Sapd commented on GitHub (Apr 5, 2024):

@advplyr, thanks for the quick response!

The error-log in ABS says: [Auth] No data in openid callback - OPError: expected 200 OK, got: 404 Not Found, together with the unauthorised screen as described above. Generally speaking I use the exact same settings as described by @M-Davies. Thank you for looking into it, much appreciated!

Would it help if I also sent the Debug log?

@MichaBrugger
Your error is an entirely different one. For some reason your token endpoint returns 404. The URL is probably wrong (maybe wrong client name "audiobookshelf"?)

Make sure to restart ABS after changes

@Sapd commented on GitHub (Apr 5, 2024): > @advplyr, thanks for the quick response! > > The error-log in ABS says: `[Auth] No data in openid callback - OPError: expected 200 OK, got: 404 Not Found`, together with the unauthorised screen as described above. Generally speaking I use the exact same settings as described by @M-Davies. Thank you for looking into it, much appreciated! > > Would it help if I also sent the Debug log? @MichaBrugger Your error is an entirely different one. For some reason your token endpoint returns 404. The URL is probably wrong (maybe wrong client name "audiobookshelf"?) Make sure to restart ABS after changes
Author
Owner

@MichaBrugger commented on GitHub (Apr 5, 2024):

Well, that was embarrassing. I literally just restarted the docker container and it works now.. Thanks for the quick help and sorry for the inconvenience, that was a rookie mistake 🙃

@MichaBrugger commented on GitHub (Apr 5, 2024): Well, that was embarrassing. I literally just restarted the docker container and it works now.. Thanks for the quick help and sorry for the inconvenience, that was a rookie mistake 🙃
Author
Owner

@Sapd commented on GitHub (Apr 5, 2024):

Well, that was embarrassing. I literally just restarted the docker container and it works now.. Thanks for the quick help and sorry for the inconvenience, that was a rookie mistake 🙃

No problem, happens! Also that a restart sometimes is required is also a bit confusing and something which probably needs to be fixed (or at least a note on save)

@Sapd commented on GitHub (Apr 5, 2024): > Well, that was embarrassing. I literally just restarted the docker container and it works now.. Thanks for the quick help and sorry for the inconvenience, that was a rookie mistake 🙃 No problem, happens! Also that a restart sometimes is required is also a bit confusing and something which probably needs to be fixed (or at least a note on save)
Author
Owner

@MichaBrugger commented on GitHub (Apr 5, 2024):

Good to know! Anyway, in this case I'll just use the opportunity to say thank for your work, I use ABS on a daily basis and its truly appreciated :)

@MichaBrugger commented on GitHub (Apr 5, 2024): Good to know! Anyway, in this case I'll just use the opportunity to say thank for your work, I use ABS on a daily basis and its truly appreciated :)
Author
Owner

@davin900 commented on GitHub (Apr 16, 2024):

Well, that was embarrassing. I literally just restarted the docker container and it works now.. Thanks for the quick help and sorry for the inconvenience, that was a rookie mistake 🙃

This just fixed it for me... was pulling my hair out trying to get OIDC working.

@davin900 commented on GitHub (Apr 16, 2024): > Well, that was embarrassing. I literally just restarted the docker container and it works now.. Thanks for the quick help and sorry for the inconvenience, that was a rookie mistake 🙃 This just fixed it for me... was pulling my hair out trying to get OIDC working.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1769