No Internet Connection in Docker Containers

  • This is weird, I have installed and setup omv and it's working perfectly, also I installed Docker via omv-extras.

    OMV works fine I can ssh into it, and try to download anything it works fine.

    Also I can pull images using Docker with no issues.

    Portainer also work I can pull images and create container with no issues.

    The Problem is with other images (containers) non of them have any network connection, I tried Jellyfin Plugins I can't access it's page, Sonarr and Radarr doesn't work, JDownloader doesn't work because it says I have no internet connection.

    I have PiHole and it's working fine, I have set it as my default DNS on my router and it works fine, I can browse the internet on my Windows Desktop.

    I tried to restart OMV, also tried to run apt-get update inside of every container it doesn't work, it says there's no internet connection.



    Please can someone help, I don't know which logs I need to upload or what to do.

  • You have no working DNS inside of your containers.


    Exactly how did you create this container? Provide all steps and inputs. Saying that you followed a YouTube video is not a helpful answer.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

    Edited once, last by gderf ().

  • It's just as easy as following steps on Docker hub to deploy containers in Portainer, example for Jellyfin:

    • Set Container name to "Jellyfin".
    • Set Image to "ghcr.io/linuxserver/jellyfin:latest".
    • Map all the required Ports.
    • Map all required Volumes.
    • Set it to restart unless-stopped.
    • Click "Deploy the Container".

    All these Apps where just working fine yesterday, I didn't change anything, I even tried to Change Default DNS on router back to "8.8.8.8" but that didn't help.


    Also sorry for bad english, english is not my primary.

  • Get a shell inside the container and run these commands. Post the output.


    Code
    cat /etc/resolv.conf
    curl ifconfig.me

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

  • root@MohandL3G_PiHole:/# cat /etc/resolv.conf

    # This file is managed by man:systemd-resolved(8). Do not edit.

    #

    # This is a dynamic resolv.conf file for connecting local clients directly to

    # all known uplink DNS servers. This file lists all configured search domains.

    #

    # Third party programs must not access this file directly, but only through the

    # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,

    # replace this symlink by a static file or a different symlink.

    #

    # See man:systemd-resolved.service(8) for details about the supported modes of

    # operation for /etc/resolv.conf.


    nameserver 192.168.1.110

    root@MohandL3G_PiHole:/# curl ifconfig.me

    curl: (6) Could not resolve host: ifconfig.me

  • I have solved this, the problem was with PiHole, PiHole doesn't start because port 53 is used by systemd-resolved, so I have to stop sysemd-resolved and then run PiHole, and then start systemd-resolved again.


    This time I tried to reboot and touch nothing, PiHole is stopped, now all containers work fine.


    How can fix this issue between PiHole and systemd-resolved?

  • Thanks everyone, I tried it and it works fine now, I can access internet inside all the containers.


    However I now have 2 problems:

    1. using Heimdall as my Dashboard, PiHole doesn't show additional info, when trying to test the API, it says "General error connecting with API" like this:PiHole.png
    2. When I try to pull any image using docker I now get this error "Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 192.168.1.115:53: read udp 192.168.1.110:44654->192.168.1.115:53: i/o timeout".
  • redirect not used external port on your router (eg:82) to port 80 of your Pihole (IP), and change http://192.168.1.115 by http://yourNAS.duckdns.org:82/Admin

    where yoorNAS is your duckdns domain.


    this is better because you can use heimdall to access your dockers WebGUI ( like your pihole webgui), outside your local LAN ( From your office for example)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!