mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Bug]: Socket failed to connect (webapp and android mobile app) #2511
Closed
opened 2026-04-25 00:07:52 +02:00 by adam
·
24 comments
No Branch/Tag Specified
master
book_tags_genres_dedupe
episode_download_fallback
Issue-4540-SortBy-StartedDate-and-FinishedDate
episode_meta_tagging
fix_authorize_race_condition
redirect_transcode_requests
progress_updated_sort
fix_ereader_socket_event
fix_change_empty_root_password
fix_podcast_session_track_index
fix_set_token
session_modal_user
localize_durations
fix_oidc_create_user
jwt_auth_refactor
fix_scanner_deleting_single_file_books
fix_mediaprogress_updatedat_2
experimental_next_client
podcast_episode_duration
episode-timestamps-clickable
book_author_secondary_sort_title
podcast_useragents
pathexists_user_access
fix_pathexists_join
book_author_secondary_sort
clean_duplicate_mediaprogress
sanitize_html_description
trix_prevent_attachments
check_path_api_fix
fix_mediaprogress_updatedat
increase_express_json_limit
fix_dockerfile_nunicode
search_episodes
audiobook_tools_update
episode_secondary_sorts
hls_stream_url_update
new_session_track_endpoint
audiobook_tools_enhancements
watcher_rescans_update
player_track_tooltip
fix_exclude_prefixes_crash
socket_item_events
fix_podcast_episode_scanner_promise
new_stats_controller
count_cache_for_userpermissions
parsing-opf-v3
validate_migration_files
fix-quick-match-all-crash
fix-chapter-end-sleep-timer
stringify_sequelize_query
remove-col-ambiguity
fix_next_prev_edit_description
details_trim_whitespace
fix_content_url_basepath
fix_logger_fatal
progress_bar_visibility
batch-edit-populate-map-details
feed_generator_updates
bookmark-modal-updates
migrate-library-item-in-scanner
migrate-new-library-items
migrate-podcasts-new-library-item-2
migrate-podcasts-new-library-item
fix-remove-episode-from-playlist
playback-session-use-new-library-item
refactor-library-item
fix-heatmap-caption
feed-episodes-upsert
share-media-player-media-session-api
remove-old-playlist
remove_old_collection_object
plugin-implementation-demo
feed_migration
refactor-feeds-from-item
fix_remove_authors_no_books
v2.17.3-fk-constraints-migration
migrations-first-upgrade
sqlite_2
feature/nuxt-target-server
waveform
sqlite
playlists
video
v2.35.1
v2.35.0
v2.34.0
v2.33.2
v2.33.1
v2.33.0
v2.32.1
v2.32.0
v2.31.0
v2.30.0
v2.29.0
v2.28.0
v2.27.0
v2.26.3
v2.26.2
v2.26.1
v2.26.0
v2.25.1
v2.25.0
v2.24.0
v2.23.0
v2.22.0
v2.21.0
v2.20.0
v2.19.5
v2.19.4
v2.19.3
v2.19.2
v2.19.1
v2.19.0
v2.18.1
v2.18.0
v2.17.7
v2.17.6
v2.17.5
v2.17.4
v2.17.3
v2.17.2
v2.17.1
v2.17.0
v2.16.2
v2.16.1
v2.16.0
v2.15.1
v2.15.0
v2.14.0
v2.13.4
v2.13.3
v2.13.2
v2.13.1
v2.13.0
v2.12.3
v2.12.2
v2.12.1
v2.12.0
v2.11.0
v2.10.1
v2.10.0
v2.9.0
v2.8.1
v2.8.0
v2.7.2
v2.7.1
v2.7.0
v2.6.0
v2.5.0
v2.4.4
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v2.3.0
v2.2.23
v2.2.22
v2.2.21
v2.2.20
v2.2.19
v2.2.18
v2.2.17
v2.2.16
v2.2.15
v2.2.14
v2.2.13
v2.2.12
v2.2.11
v2.2.10
v2.2.9
v2.2.8
v2.2.7
v2.2.6
v2.2.5
v2.2.4
v2.2.3
v2.2.2
v2.2.1
v2.2.0
v2.1.5
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.24
v2.0.23
v2.0.22
v2.0.21
v2.0.20
v2.0.19
v2.0.18
v2.0.17
v2.0.16
v2.0.15
v2.0.14
v2.0.13
v2.0.12
v2.0.11
v2.0.10
v2.0.9
v2.0.8
v2.0.7
v2.0.6
v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v1.7.2
v1.7.1
v1.7.0
v1.6.0
v1.5.5
v1.5.0
v1.4.11
v1.4.9
v1.4.7
v1.4.6
v1.4.4
v1.4.2
v1.4.0
v1.4.1
v1.3.4
v1.3.3
v1.3.1
v1.2.8
v1.2.6
v1.2.5
v1.2.4
v1.2.1
v1.1.15
v1.1.14
v1.1.13
v1.1.12
v1.1.11
v1.1.10
v1.1.9
v1.1.8
v1.0.0
0.9.61-beta.0
0.9.61-beta
Labels
Clear labels
authentication
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
pull-request
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
Mirrored from GitHub Pull Request
No Label
bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
adam (Adam Melkus)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/audiobookshelf#2511
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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 @alternativesurfer on GitHub (Jan 20, 2025).
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
Additional Notes
UI errors:
Edge
Firefox (windows)
Fennec (Android)
as well as the Android Audiobookshelf App & Lissen app.
@advplyr commented on GitHub (Jan 20, 2025):
Are you using a reverse proxy or local ip?
@Dork74 commented on GitHub (Jan 20, 2025):
Same error with android app and also unable to connect via web client.
Running in Docker on Synology
Web error:
Unable to connect error on PC
"The connection was reset
The connection to the server was reset while the page was loading."
Log says listening on port 1333
@advplyr commented on GitHub (Jan 20, 2025):
@Dork74 commented on GitHub (Jan 20, 2025):
Used the same bookmark with address that I've always used
Android giving Failed to ping server error (connection reset)
@vampy101 commented on GitHub (Jan 21, 2025):
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.
@ritniotvor commented on GitHub (Jan 21, 2025):
Same problem, updated today, and after the update I can't get to the site anymore. Neither through local ip, nor through reversproxy :(
@20CCAA07 commented on GitHub (Jan 21, 2025):
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
After the update (v2.18.1): Listening on port :3333
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)?
@lsixecho commented on GitHub (Jan 21, 2025):
@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!
@Dork74 commented on GitHub (Jan 21, 2025):
@20CCAA07
Thanks for the workaround. I noted the port change in my original post because I thought that was strange but @advplyr didn't make any comment on that.
@advplyr commented on GitHub (Jan 21, 2025):
I'm not familiar with Synology, what docker container are you pulling in? Are you using a docker run script?
@advplyr commented on GitHub (Jan 21, 2025):
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
latesttag I can see that it is listening on port 80.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?
@jrhedman commented on GitHub (Jan 21, 2025):
If it helps:
Partial output of
docker container inspect:docker logsshows it's listening on port 3333 however:Edit: added more detail to docker logs showing it's attempting to use port 3333
@advplyr commented on GitHub (Jan 21, 2025):
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.
@Dork74 commented on GitHub (Jan 21, 2025):
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.
@advplyr commented on GitHub (Jan 21, 2025):
Thanks, it would be great to know how Synology is running the containers.
Make sure you taking regular backups using the backup manager in Abs. So long as the volume paths are the same in the docker container those backups can be used to fully restore Abs.
@jrhedman commented on GitHub (Jan 21, 2025):
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
org.opencontainers.image.versionon the faulty container was for some reason showing as2.14.0!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.
Synology Users using the Container Manager should duplicate settings to a new container, re-add their port mappings and start the new container.(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
docker-entrypoint.shwhich might be where the issue comes from. Resetting the container changed it totini.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.
@advplyr commented on GitHub (Jan 21, 2025):
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.
@Dork74 commented on GitHub (Jan 21, 2025):
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.
@jrhedman commented on GitHub (Jan 21, 2025):
@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!
@alternativesurfer commented on GitHub (Jan 21, 2025):
Hi, OP here.
I do not use Synology, just running Docker on an ubuntu server.
This seems unrelated to the Synology people since I never lost access to my front end.
This was working previously on 2.17.3 without error.
I was out of town so didn't patch between then and 2.18.0.
I am running through HAProxy. No config change on that end.
The only thing failing is the Socket error. I am able to load the GUI and playback items.
Direct to IP also works, but with the same socket error.
@alternativesurfer commented on GitHub (Jan 24, 2025):
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: https://github.com/advplyr/audiobookshelf/pull/3754
I added the env flag: EXP_PROXY_SUPPORT=1 to test, still not working.
So, I believewhatever fix was put into place for that issue broke proxy support for those of us it was already working for.
@jstaubr commented on GitHub (Jan 31, 2025):
Older docker image did not have ENV "PORT=80". The new one I pulled has.
Don't know where it came up with the port number 3333 though.
@niceguy4 commented on GitHub (Feb 3, 2025):
@20CCAA07 Thank you! Fixed my issue, too.
@nichwall commented on GitHub (Feb 3, 2025):
If you are using Synology, make sure you are using the "Reset" method instead of the "Upgrade" button.
https://github.com/advplyr/audiobookshelf/issues/3868#issuecomment-2605327783