Skip to content
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] curl: (6) Could not resolve host: raw.githubusercontent.com #246

Open
1 task done
saschabrockel opened this issue Jan 29, 2025 · 13 comments
Open
1 task done

Comments

@saschabrockel
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Something seems to be wrong with all *arr containers of linuxserver. I have the problem for radarr, sonarr, and bazarr. For the first both I need to be able to access the URL raw.githubusercontent.com.
I tried it with other Docker containers that also contain curl and it works fine. Are you blocking this URL for any reason?

I need it for the arr-scripts and it used to work fine (https://github.com/RandomNinjaAtk/arr-scripts).

I tried to disable AdGuardHome and Tailscale but is has nothing to do with it as it is only the behavior for the linuxserver container.

Expected Behavior

It should be able to access raw.githubusercontent.com. It's no problem for other URLs like google.com or even github.com.

Steps To Reproduce

  1. Start your Docker container of radarr
  2. Log into the console of the container
  3. Try curl raw.githubusercontent.com
  4. Get error curl: (6) Could not resolve host: raw.githubusercontent.com

Environment

- OS: unRAID
- How docker service was installed: comes with unRAID

CPU architecture

x86-64

Docker creation

docker run
  -d
  --name='radarr'
  --net='unraid'
  --pids-limit 2048
  -e TZ="Europe/Berlin"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="UNRAID-Server"
  -e HOST_CONTAINERNAME="radarr"
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:7878]/system/status'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/radarr-logo.png'
  -p '7878:7878/tcp'
  -v '/mnt/disk1/multimedia/movies':'/movies':'rw'
  -v '/mnt/disk1/downloads/sabnzbd/downloads/movies':'/downloads/movies':'rw'
  -v '/mnt/cache/appdata/mediaserver/radarr/arr-scripts/custom-services':'/custom-services.d':'rw'
  -v '/mnt/cache/appdata/mediaserver/radarr/arr-scripts/custom-cont-init':'/custom-cont-init.d':'rw'
  -v '/mnt/disk1/multimedia/documentation':'/documentation':'rw'
  -v '/mnt/cache/appdata/mediaserver/radarr/config':'/config':'rw'
  --health-cmd="curl
  --fail http://localhost:7878/api/v3/health?apikey=832f3f754b2a472cbe6a9cdd590a40b9 || exit 1"
  --health-interval=1m
  --health-timeout=10s
  --health-retries=3 'lscr.io/linuxserver/radarr:latest'

Container logs

Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
Radarr: https://opencollective.com/radarr
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    99
User GID:    100
───────────────────────────────────────
Linuxserver.io version: 5.17.2.9580-ls256
Build-date: 2025-01-22T20:15:52+00:00
───────────────────────────────────────
    
[custom-init] Files found, executing
[custom-init] scripts_init.bash: executing...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:07 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:08 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:10 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:11 --:--:--     0curl: (6) Could not resolve host: raw.githubusercontent.com
[custom-init] scripts_init.bash: exited 0
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@j0nnymoe
Copy link
Member

Containers inherit DNS from your host. So unless you have some interesting DNS setup that your server is using, it should just work.

@saschabrockel
Copy link
Author

saschabrockel commented Jan 29, 2025

But why would it work with any other container but not the linuxserver ones? Can I give you any logs or information?

I tried it again for several other containers like pairdrop from linuxserver. ALL linuxserver have this problem for me. But all others not.

@j0nnymoe
Copy link
Member

I don't know what those scripts are that you're using but if you remove them, does it start working? are you able to curl any other addresses?

@j0nnymoe
Copy link
Member

also, might be worth explaining your DNS setup that unraid is using.

@saschabrockel
Copy link
Author

I can curl any other address as I mentioned in the beginning. github.com works. google.com as well.

Those scripts extend radarr with some features. This script just wants to access raw.githubusercontent.com with curl. I don't know what the setup is because I have not really changed anything.

@j0nnymoe
Copy link
Member

j0nnymoe commented Jan 29, 2025

Unfortunately I haven't got access to any arr containers but testing in our homeassistant container I get:

root@sbc04-zima:/# curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/setup.bash
#!/usr/bin/with-contenv bash
SMA_PATH="/usr/local/sma"

echo "************ install packages ************" && \
apk add -U --update --no-cache \

so it works fine within our containers.
Curling just the url I get:

root@sbc04-zima:/# curl raw.githubusercontent.com root@sbc04-zima:/#

@saschabrockel
Copy link
Author

I mean I use AdGuardHome and I see request of my other devices on this URL but they are all whitelisted anyway.

For you it works and if I do this in any linuxserver container as for example pairdrop it does not work. I have no clue why. Why only the linuxserver container? This is such a weird behavior and hard for me to get as other URLs work in this container as well.

For the Home Assistant container it works as well but this is because it runs on the host. Maybe the same reason for you. So it's not a good example.

@j0nnymoe
Copy link
Member

Like I said, no access to an arr container at the moment. Just tested in SWAG (our reverse proxy container) which is in bridge mode, working fine (as this is nginx based like pairdrop).

root@b3564c53e422:/# curl https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/radarr/setup.bash
#!/usr/bin/with-contenv bash
SMA_PATH="/usr/local/sma"

If you're demanding to see an arr example, you'll have to wait for someone else to chime in.

@saschabrockel
Copy link
Author

I have added --dns 8.8.8.8 --dns 8.8.4.4 to the container now and it works. I still don't understand why.

Before I looked up the DNS config that was existing for radarr:
docker inspect radarr | grep -i dns
This gave me just empty

            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
                    "DNSNames": [

@j0nnymoe
Copy link
Member

You haven't told us anything about how you've setup your DNS that the unraid server uses so it's impossible to tell.

@saschabrockel
Copy link
Author

I try to find out. Does this help:
cat /etc/resolv.conf
Gives the output:

# Generated by rc.inet1
nameserver 192.168.178.1
nameserver 8.8.8.8

The first nameserver is the IP address of my router. In the router I have set a local DNS server to the IP of AdGuardHome. I mean it always used to work like this.

Image

@LinuxServer-CI
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Issues
Development

No branches or pull requests

3 participants