Ad Widget

Collapse

Couldn't resolve host name: getaddrinfo() thread failed to start

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mark P Thornton
    Junior Member
    • Feb 2022
    • 10

    #1

    Couldn't resolve host name: getaddrinfo() thread failed to start

    I am getting this error in a web step run from a Zabbix Proxy running in a docker container.
    Proxy version is 6.0.12 SQLite3 version.

    The same image is running without problems in another Docker Swarm.

    Any ideas?

    Mark Thornton
  • Rachelfoster
    Junior Member
    • Jul 2022
    • 11

    #2
    Hello, here It's difficult to provide a specific solution without more information about the error and the context in which it is occurring. However, here are a few things that you can try to troubleshoot the issue:
    1. Check the log files of the Zabbix proxy container for any error messages that may provide more information about the cause of the problem.
    2. Make sure that the SQLite3 version in the proxy container is compatible with the version of the Zabbix proxy software.
    3. Check the configuration of the proxy container and compare it with the configuration of the other container that is running without problems. Look for any differences in environment variables, volumes, and network settings that may be causing the issue.
    4. Check the resource allocation of the container, such as CPU and memory, to ensure that the container is not running out of resources.
    5. Make sure that the container has proper permissions to access the necessary files, folders and network ports.
    6. Compare the version of the container image between the containers, check that the image versions are the same.

    If none of these suggestions help, you may want to seek help from the Zabbix community or the Docker community for additional troubleshooting and support.

    Comment

    • Mark P Thornton
      Junior Member
      • Feb 2022
      • 10

      #3
      The host environment is Ubuntu 18.04.3
      ​The environment where it works is Ubuntu 18.04.6

      Docker version is 19.03.2
      ​and where it works is 20.10.17

      The image was zabbix/zabbix-proxy-sqlite3:ubuntu-6.0-latest
      from the official repository on github with mysql client and some scripts added in /usr/lib/zabbix/externalscripts

      Nothing unusual in the zabbix proxy logs. No resources issues that I could find.

      Regards,
      Mark

      Comment

      • Mark P Thornton
        Junior Member
        • Feb 2022
        • 10

        #4
        The docker container image is exactly the same on both systems. Proxy configuration only differs in proxy name.

        Mark​

        Comment

        • Markku
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Sep 2018
          • 1782

          #5
          How is name resolution configured on both of those systems? Can you try manually resolving the affected hostname (from the web step) from the container?

          Markku

          Comment

          • Mark P Thornton
            Junior Member
            • Feb 2022
            • 10

            #6
            None of curl, nslookup or dig manage to resolve anything from inside the container - can't reach a DNS server. Something to investigate. And yet the container managed to resolve the address of the zabbix server. Rather odd.

            Note I had to use nsenter to run those commands as most containers don't include any useful networking tools :-(.

            Mark

            Comment

            • Mark P Thornton
              Junior Member
              • Feb 2022
              • 10

              #7
              nslookup and dig both work if given the address of the nameserver found in /etc/resolv.conf within the container (127.0.0.11).

              Mark

              Comment

              • Mark P Thornton
                Junior Member
                • Feb 2022
                • 10

                #8
                On the working environment dig and nslookup both work without the need to specify the server address.

                Mark

                Comment

                • Markku
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                  • Sep 2018
                  • 1782

                  #9
                  Unfortunately I'm unable to give any direct advice how to fix the name resolution in container platform, but maybe you can find out somewhere else if that is a known problem in some cases, or if the newer Docker version has fixed something about it.

                  Markku

                  Comment

                  • Mark P Thornton
                    Junior Member
                    • Feb 2022
                    • 10

                    #10
                    Upgrading docker to 20.10.23 fixed the problem with the container, though dig and nslookup still don't resolve within the container unless the server is specified.

                    Unfortunately DNS issues with Docker seem to be legion, with extra variants for Swarm and docker-compose.

                    Thanks for your help Markku.

                    Mark

                    Comment

                    Working...