mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-02 22:46:56 -05:00
[Bug]: Socket failed to connect when logging in with authelia #3021
Labels
No labels
authentication
awaiting release
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/audiobookshelf#3021
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SamsiFPV on GitHub (Jun 12, 2025).
What happened?
When I am logging in with authelia, the notification pops up "Socket failed to connect".
If I log in with password, everything works.
The only differences I can see on those two requests is the authelia session cookie.
What did you expect to happen?
I expect the app to work with the authelia login
Steps to reproduce the issue
Audiobookshelf version
v2.24.0
How are you running audiobookshelf?
Other (list in "Additional Notes" box)
What OS is your Audiobookshelf server hosted from?
Other (list in "Additional Notes" box)
If the issue is being seen in the UI, what browsers are you seeing the problem on?
None
Logs
Additional Notes
abs is running on truenas, accessed via a reverse proxy made with nginx.
@Vito0912 commented on GitHub (Jun 12, 2025):
Shows symptoms of a crash.
Please check the crash log if available, which should be located under the metadata folder.
If you use docker, check the docker logs as an alternative.
@SamsiFPV commented on GitHub (Jun 13, 2025):
The container logs from TrueNAS:
Logs from the metadata/logs/daily folder:
Also tried switching log level to debug, but nothing interesting there either. The application doesn't seem to crash, it just doesn't like the websocket request with the authentication cookie
I think it's the size of the cookie, my request is 1.7kB big. It works with a request size of 700 Bytes.
@advplyr commented on GitHub (Jul 8, 2025):
Did you resolve this?
@SamsiFPV commented on GitHub (Jul 9, 2025):
Negative.
I tried again now, and now it brings me this error:
@Vito0912 commented on GitHub (Jul 9, 2025):
Can you please provide the status code of the request and any other information connected to the request.
Idk if we do something special for cookies, but iirc cookies should be fine up to 4kb. The header is not allowed to be bigger than 8kb (So maybe you have other values in the header maybe?)
@SamsiFPV commented on GitHub (Jul 9, 2025):
Okay, this is weird. I have tried again, this time with a clean chromium browser.
After logging in with Authelia, I get a "This site can't be reached".
These are the failed requests:
The first failed request had this request URL:
And these request headers:
On Firefox I no longer get the Axios error, instead it logs me in and again: "Socket failed to connect"
That looks like this:
The first response is NS_ERROR_UNKNOWN_HOST, the rest is NS_ERROR_CONNECTION_REFUSED:
@SamsiFPV commented on GitHub (Jul 9, 2025):
Note: The connection refused was because of fail2ban, my bad.
I still get this though after (successfully) logging in with authelia:
@SamsiFPV commented on GitHub (Jul 9, 2025):