internat radio or spotify does not work
alesrosina opened this issue · 7 comments
When I'm trying to play internet radio stream, I get error:
owntone-1 | [2024-05-26 18:58:59] [ LOG] xcode: Cannot open 'https://strm.radionula.com/channel2': I/O error
owntone-1 | [2024-05-26 18:58:59] [ LOG] web: JSON api request failed with error code 500 (/api/queue/items/add?clear=true&playback=start&shuffle=false&uris=library:track:1865)
Same thing happens when I'm trying to connect with spotify - i got redirected to spotify and then back to owntone, but with error page:
owntone-1 | [2024-05-26 19:03:18] [ LOG] http: Request to https://accounts.spotify.com/api/token failed: Couldn't resolve host name
owntone-1 | [2024-05-26 19:03:18] [ LOG] web: Could not parse Spotify OAuth callback '/oauth/spotify?code=<some long code that changes everytime>': Did not get a reply from Spotify
Am I doing sth wrong?
I am running it in docker compose:
services:
owntone:
image: docker.io/owntone/owntone:latest
network_mode: host
volumes:
- <local folder>:/etc/owntone
- <local folder 2>:/srv/media:ro
- <local fodler 3>:/var/cache/owntone
- /sys/fs/cgroup:/sys/fs/cgroup
restart: unless-stopped
Local files play OK and I can also stream this to local Air Play speakers.
Is there anything I'm missing?
It seems that your container doesn't have access to the Internet.
Can you check if this is the case with the command below?
sudo docker exec -it owntone ping strm.radionula.com
Also, was the refresh of the library still running when you tried to add the song to the playlist?
It seems to provoke an error when the library scan is still in progress.
Hey, so no - library was already scanned - I've tried one more time today (after one day of idle, also in logs no new records from yesterday). Same result.
But it seems that somehow DNS cannot be accesed, if i do docker exec -it owntone-owntone-1 sh
:
/ # ping google.com
ping: bad address 'google.com'
/ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=119 time=1.822 ms
64 bytes from 8.8.8.8: seq=1 ttl=119 time=1.462 ms
64 bytes from 8.8.8.8: seq=2 ttl=119 time=1.494 ms
64 bytes from 8.8.8.8: seq=3 ttl=119 time=1.344 ms
64 bytes from 8.8.8.8: seq=4 ttl=119 time=1.525 ms
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 1.344/1.529/1.822 ms
Is there anything I'm doing wrong? Maybe something on host machine? I'm running this on openmediaserver with omv-extras docker compose plugin.
I'm not using openmediavault (I think this is the application service you meant).
I personally run it with Podman.
It seems that DNS names are not resolved.
You should try (on the host machine):
systemctl restart systemd-resolved
And if it's not already enabled, enable it.
systemctl enable systemd-resolved
OK, i've resolved the issue.
I had to pass in DNS settings in compose file like so:
services:
owntone:
image: docker.io/owntone/owntone:latest
network_mode: host
dns:
- 8.8.8.8
volumes:
- <local folder>:/etc/owntone
- <local folder 2>:/srv/media:ro
- <local fodler 3>:/var/cache/owntone
- /sys/fs/cgroup:/sys/fs/cgroup
restart: unless-stopped
Maybe it would be a good idea to add this to readme, if anybody else encounter same issue.
And thank you for you rapid response! 👍
You're welcome.
Well, I could add it in the documentation, but this is related to the host installation.
Normally, you shouldn't have to hardcode the dns name.
For privacy reasons, I would also not use any DNS from Google.
True. In reality I'm not using google's one, but local from my router. It might be that here's sth broken ... but yes, i agree, this is realted to host config.
Thanks again!