-
Notifications
You must be signed in to change notification settings - Fork 512
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
[Bug]: Socket failed to connect (webapp and android mobile app) #3868
Comments
Are you using a reverse proxy or local ip? |
Same error with android app and also unable to connect via web client. Running in Docker on Synology Web error: "The connection was reset Log says listening on port 1333 |
|
Used the same bookmark with address that I've always used Android giving Failed to ping server error (connection reset) |
I'm seeing this as well on my instance even after upgrading to the 2.18.1. I am using a reverse proxy (apache) to access it. I did check connecting directly and it does not show up that way. |
After updating from version v2.17.7 to the latest version v2.18.1 via Synology's Container Manager today, I could no longer access Audiobookshelf via the local IP address on either iOS or a web browser. I then compared the log files from before and after the update and found the following difference: Before the update (v2.17.7): Listening on port :80 As a workaround, I resolved the issue for me by:
After this adjustment, I was able to access Audiobookshelf again on both iOS and web browsers. @ritniotvor : Since you use Synology, too, this might solve your problem for now as well. @advplyr : It seems like that Audiobookshelf now listens on port 3333 per default. Will it continue to do so or will this be reverted to port 80 again with a later update, that is if the default port is hard coded (I guess)? |
@20CCAA07 This works! Good sleuthing. I was seeing in the logs "listing on port 3333" and thought that was odd, but that's as far as I got before I checked the issues. Thanks again! |
I'm not familiar with Synology, what docker container are you pulling in? Are you using a docker run script? |
This and some messages on Discord from other Synology users are making this really confusing. A user just said they removed and re-created the container in Synology Container Station app and it is now listening on port 80 (with no other changes). The Dockerfile for the official Abs docker images was updated to specify port 80. When I start the container for If the port was actually changed it would break for thousands of users but it seems it has only broken for users using Synology. Are you able to see the docker run command that Synology is using? Maybe it is overriding the PORT env variable defined in the Dockerfile with an empty value? |
If it helps: Partial output of
Edit: added more detail to docker logs showing it's attempting to use port 3333 |
Thanks. Can you pull the image again and start a new container? And if Synology shows you the docker run command that it is using that would be the most helpful I think. |
Same as the Discord user, I duplicated and exported settings of the container, deleted original (after praying it wouldn't delete the database), then ran the copy and it is magically back to port 80. |
Thanks, it would be great to know how Synology is running the containers. |
Can confirm @Dork74's findings: docker logs after simply duplicating the container and running the copy shows it's now listening on port 80:
I noticed in the inspect the I'm wondering if there's some cacheing that Synology is doing using their container manager which was causing the js file to go with using port 3333. Bug certainly seems to be on Synology's side and not with Audiobookshelf. (These little things are why I'm moving further from using Synology's management tool and more interacting with docker directly) We should be able to close the issue and people can use the above fix. EDIT: Did some more digging. Best fix for Synology users is to bring their container down, choose action -> reset and then start the container again. It looks like Synology was calling the entrypoint at startup I'll try to research more when I have a chance. It would explain some issues I've noticed with some container updates in the past where I had to essentially copy and build a new container in it's place. But that should deal with the issue here. |
Thanks for digging into it. It does seem to be something with caching although it wouldn't be the js file since that is in the container. If someone reaches out to Synology about this please share it here. I'm sure it is not the first time this has come up. |
Have been running Abs (and a few other containers) for many months, including updates, with no problems. Not sure why Synology hated Abs this time. I'm a Docker noob, so of little help. Container Manager hasn't updated since 20.10.2023 (yes 2023 not 2024) I make daily backups and keep them for 7 day. I have over 3500 audiobooks so wouldn't want to start from scratch. Let me just take this time to thank you for this really awesome project. Actually Abs is what convinced me to start using Docker. |
@Dork74 Fun fact, if you ssh into your Synology and deploy via docker on the command line, you can still use the container manager interface once the container is deployed, it will show up on the list the same. This way you can practice getting your hands more dirty with docker directly and slowly remove the training wheels. I'm slowly migrating away from the UI myself and AudiobookShelf was one of the one's I haven't touched yet which is why I caught the issue too. I'm sure it will affect novices most directly as beginners may not have as much intimate knowledge of how docker works behind the scenes. Always keep learning and make your data your own! AudiobookShelf is one of the pillars of the self-hosting world imo and the number of people who will get into it will only keep growing. I've always enjoyed working with @advplyr when things come up and can understand why the community is so drawn towards this project. Thanks again for all you do! |
Hi, OP here. This was working previously on 2.17.3 without error. I am running through HAProxy. No config change on that end. Direct to IP also works, but with the same socket error. |
Something definitely changed, because previously there were no websocket issues when I used HAProxy (not Apache). Now my console is filled with these errors: Timing wise, I suspect this is what broke it: #3754 So, I believewhatever fix was put into place for that issue broke proxy support for those of us it was already working for. |
Older docker image did not have ENV "PORT=80". The new one I pulled has. |
What happened?
Log error: [SocketAuthority] clientEmitter - no clients found for user 06835809-8b6a-47fe-81fd-1677b1ddf6c6
Webclient error:
Android app error:
Within the web client, all functionality appears to still work (playback, etc).
On Android, I cannot flip between Podcasts/Audiobooks (I am stuck on audiobooks). Playback works and syncs playback location.
What did you expect to happen?
The websocket connects.
Steps to reproduce the issue
Audiobookshelf version
v2.18.0
How are you running audiobookshelf?
Docker
What OS is your Audiobookshelf server hosted from?
Linux
If the issue is being seen in the UI, what browsers are you seeing the problem on?
Other (list in "Additional Notes" box)
Logs
The only thing I can see related to the websocket is: 2025-01-20 20:52:05.099 DEBUG [SocketAuthority] clientEmitter - no clients found for user 06835809-8b6a-47fe-81fd-1677b1ddf6c6
Additional Notes
UI errors:
Edge
Firefox (windows)
Fennec (Android)
as well as the Android Audiobookshelf App & Lissen app.
The text was updated successfully, but these errors were encountered: