Connecting using a CNAME & DynDNS combination doesn't work #347

Closed
opened 2026-04-24 23:17:22 +02:00 by adam · 5 comments
Owner

Originally created by @shrugal on GitHub (Nov 19, 2022).

The app won't connect to a hostname that is a CNAME entry pointing to a DDNS hostname (ds.domain.com → name.myds.me → home IP), instead I get the error "Failed to ping server".

I can connect to ABS from inside my local network (using an internal DNS server that resolves to local IPs directly), and from outside using the browser, but not from outside using the app. Replacing the CNAME hostname with the DDNS hostname works, but it's a rather inconvenient workaround, especially when using SSL.

Additional Info:

  • The server is running on a Synology DiskStation using Docker, with port 13377 mapped to 80
  • I have a reverse proxy that forwards https requests on port 13378 as http on port 13377, incl. WebSockets
  • It seems to be similar to #403, but that ticket was closed by the author due to using the workaround.

Steps to reproduce

  1. Setup DNS entries as described above
  2. Connect to outside network
  3. Try to connect to ABS using the CNAME address

Expected behaviour

It should connect to ABS, just like in all other settings.

Actual behaviour

It doesn't connect, instead showing "Failed to ping server" error message.

Environment data

Audiobookshelf Version:

  • Android App?
  • iOS App?

Android Issue

Android version: 0,9,59-beta
Device model: Google Pixel 4

Stock or customized system: Stock

iOS Issue

iOS Version:

iPhone model:

Originally created by @shrugal on GitHub (Nov 19, 2022). The app won't connect to a hostname that is a CNAME entry pointing to a DDNS hostname (ds.domain.com → name.myds.me → home IP), instead I get the error "Failed to ping server". I can connect to ABS from inside my local network (using an internal DNS server that resolves to local IPs directly), and from outside using the browser, but not from outside using the app. Replacing the CNAME hostname with the DDNS hostname works, but it's a rather inconvenient workaround, especially when using SSL. Additional Info: - The server is running on a Synology DiskStation using Docker, with port 13377 mapped to 80 - I have a reverse proxy that forwards https requests on port 13378 as http on port 13377, incl. WebSockets - It seems to be similar to #403, but that ticket was closed by the author due to using the workaround. ### Steps to reproduce 1. Setup DNS entries as described above 2. Connect to outside network 3. Try to connect to ABS using the CNAME address ### Expected behaviour It should connect to ABS, just like in all other settings. ### Actual behaviour It doesn't connect, instead showing "Failed to ping server" error message. ### Environment data Audiobookshelf Version: - [x] Android App? - [ ] iOS App? #### Android Issue Android version: 0,9,59-beta Device model: Google Pixel 4 Stock or customized system: Stock #### iOS Issue iOS Version: iPhone model:
adam added the bug label 2026-04-24 23:17:22 +02:00
adam closed this issue 2026-04-24 23:17:22 +02:00
Author
Owner

@advplyr commented on GitHub (Nov 19, 2022):

I don't know how to assist with this since this is specific to your network. I don't think there is anything that would be changed in the mobile app, it is just making a regular http request.
Unless you know of some way the mobile app should be making a request differently then I would recommend joining the discord server and seeing if someone has your setup that can help.

@advplyr commented on GitHub (Nov 19, 2022): I don't know how to assist with this since this is specific to your network. I don't think there is anything that would be changed in the mobile app, it is just making a regular http request. Unless you know of some way the mobile app should be making a request differently then I would recommend joining the discord server and seeing if someone has your setup that can help.
Author
Owner

@shrugal commented on GitHub (Nov 19, 2022):

Thanks for the quick answer.

I don't think this is specific to my network. The setup isn't that unusual, and it works fine with everything except the ABS mobile app, Also, the other issue I've linked suggests that it occurs for others with similar setups as well. I think something about the way the app does the http request has to be different than what the browser does, since the browser has no problem connecting to ABS in exactly the same situation.

I don't really need assistance for my situation specifically, because the workaround does work. Just wanted to report a bug. ;)

@shrugal commented on GitHub (Nov 19, 2022): Thanks for the quick answer. I don't think this is specific to my network. The setup isn't that unusual, and it works fine with everything except the ABS mobile app, Also, the other issue I've linked suggests that it occurs for others with similar setups as well. I think something about the way the app does the http request has to be different than what the browser does, since the browser has no problem connecting to ABS in exactly the same situation. I don't really need assistance for my situation specifically, because the workaround does work. Just wanted to report a bug. ;)
Author
Owner

@advplyr commented on GitHub (Nov 19, 2022):

Oh okay, I'm not aware of any other way to make http requests but let me know if you come across anything we can do.

@advplyr commented on GitHub (Nov 19, 2022): Oh okay, I'm not aware of any other way to make http requests but let me know if you come across anything we can do.
Author
Owner

@shrugal commented on GitHub (Nov 20, 2022):

Ok turns out, it was a problem with AdGuard on Android. When switching from Wifi to cellular with AdGuard enabled the DNS records were not updated, so ABS still tried to connect to the local IP address. Exempting the app from AdGuard fixed it, but I'm still not sure why other apps don't have this problem.

@shrugal commented on GitHub (Nov 20, 2022): Ok turns out, it was a problem with AdGuard on Android. When switching from Wifi to cellular with AdGuard enabled the DNS records were not updated, so ABS still tried to connect to the local IP address. Exempting the app from AdGuard fixed it, but I'm still not sure why other apps don't have this problem.
Author
Owner

@rhamzeh commented on GitHub (Dec 2, 2022):

Thank you for the hint @shrugal!

I had the same issue with a CNAME record pointing from: audiobookshelf.${base_domain} => server.${base_domain} (server.${base_domain} resolves to DIRECT_IP_ADDRESS).

Once I changed it to be audiobookshelf.base_domain => DIRECT_IP_ADDRESS, the issue was resolved.

The app seemed to be doing something which was not following the chain of resolution.

Note: In my case there was no outside networks involved, everything was on the same network and there was no dynamic dns (aka the IP doesn't change).
Note x2: I am not using AdGuard on Android

@rhamzeh commented on GitHub (Dec 2, 2022): Thank you for the hint @shrugal! I had the same issue with a CNAME record pointing from: `audiobookshelf.${base_domain}` => `server.${base_domain}` (`server.${base_domain}` resolves to `DIRECT_IP_ADDRESS`). Once I changed it to be `audiobookshelf.base_domain` => `DIRECT_IP_ADDRESS`, the issue was resolved. The app seemed to be doing something which was not following the chain of resolution. Note: In my case there was no outside networks involved, everything was on the same network and there was no dynamic dns (aka the IP doesn't change). Note x2: I am not using AdGuard on Android
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#347