Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id E1B6B782B7B for <~alpine/users@lists.alpinelinux.org>; Wed, 3 Mar 2021 21:11:21 +0000 (UTC) Received: by mail-lj1-f172.google.com with SMTP id a17so30584471ljq.2 for <~alpine/users@lists.alpinelinux.org>; Wed, 03 Mar 2021 13:11:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=07q8Gbc92ulHaKlCnS0HS/6qYI0TtY2O1p7o/OKYbiQ=; b=lW7tjlovvUXdtKvr39TIH43zxFqqU/lJN7zdutjlwzK8/NcW7nlzuLJ9qevKCwsR6F a5MFjCz7DP4gwe8hIw5MC/xsVQEfU6iyHx8j6Bq7qniiG/Z98Gf+0L8Wzjlow6Mkr5NC b1iweRTZdflPWCZhsEd7I0NpKk8WvgEONyt3n/duS4dek1kUSByuwGJKlMOMrXwYmMLj 23Z/EGnHzM1sRw3VPMt1UIbShHkdRV9JeTrJI1P3qkMG3amwi9g4xU09dluF8Ua+3Ux4 YGGDREDn7echSRqt6xaAEn2/IMeKMzHPyrJ2MgoBvRmI5B5HlVJ2jg24b57DKaFQeueL kuoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=07q8Gbc92ulHaKlCnS0HS/6qYI0TtY2O1p7o/OKYbiQ=; b=q9XzoP49neOH/A7ABKbc0KwQSd/UH1E5R9Bkmqh5PVosN3FAsdlD7hz4N77iHnFtg0 278ugWv09DnJGiOL5ZMo7x4oDlL5JsuSHNpPNwxh26kM+zWgWVKkyRru5+UzU4cosC56 LBY/i8DaquC+HRs5yR/6nbH+lxC8zHbILrDgnub1IIv9zTn3YcNmnx9mWTbDz/WKkmOz E5XXjNOGy3oRqS/DsX6UN9K2D75qdsw+vHBaOYMaYuCtPHveZtbrw5LQbXMe0rDdbq9e qigbu03i9CmYZHW5rlT5UnqU25jxPLqP+siFKm5ZUZ5pMLF61lakvBOtlja22p4yoRFq 3Uzw== X-Gm-Message-State: AOAM531ViUT+6+pvagBkD0Dc5EkB1Iu5AQ1/Di42jmINhwWHPRw2nkda O1l9/x0E8hYy4Pqve037MY6/CHHDNu2SkQhRDB1AwGbHOt4p/g== X-Google-Smtp-Source: ABdhPJwb+vYMXAwxQIHutAVUGgBQ1WMiZNRUqePiatSKHhd9we1pW36CBxmCuwu4sYtNyLRcqqLRx317Jsv/Oam5ing= X-Received: by 2002:a2e:8003:: with SMTP id j3mr448369ljg.459.1614805880484; Wed, 03 Mar 2021 13:11:20 -0800 (PST) MIME-Version: 1.0 From: Banibrata Dutta Date: Thu, 4 Mar 2021 02:41:08 +0530 Message-ID: Subject: Sporadic, unpredictable docker / docker-compose (on Alpine 3.13) issues with DNS name resolution To: ~alpine/users@lists.alpinelinux.org Content-Type: multipart/alternative; boundary="000000000000e337fd05bca84a2f" --000000000000e337fd05bca84a2f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Folks, Have been using docker and docker-compose inside Virtualbox VMs running Alpine 3.13 guestOS, on a Windows 10 Professional host. The Alpine Guest has 2 vCPUs, 4GB vRAM, and even when all containers are running the RAM usage remains below 1GB. - Docker version 20.10.3, build 48d30b5b32e99c932b4ea3edca74353feddd83ff - docker-compose version 1.27.4, build unknown I use 2 docker-compose .yml files to bring up, 2 set of containers. First .yml file brings up Telgraf, InfluxDB, Grafana containers based on images from DockerHub. The second .yml brings up a POJO-server (Java) with application and another 3 tester/simulators.They all share a dedicated network =E2=80=98mynet=E2=80=99 (using bridged driver). The above setup see= ms to work perfectly at times. For example: - Sometimes , containers don=E2=80=99t seem to get hostname assigned (i.e.= the mnemonic container-id is set as hostname, as is default) while at other times specific hostname is indeed assigned. - Then, for a few containers (not all), the inter-container DNS/name resolution doesn=E2=80=99t seem to work, but at the same time few other = containers have perfectly working inter-container DNS/name resolution. When inter-container DNS resolution does-not, if I log into the container runtime using =E2=80=98docker exec -it bash=E2=80=99, and try to do 'pin= g ', I get the following error: *ping: somehostname: Temporary failure in name resolution* - Sometimes, some containers (not all) require the "service: > hostname: " declaration in the docker-compose .yml file to get specific hostname assigned to the container, but for other containers at other times, that declaration is not needed, and only the =E2=80=9Ccontainer_name=E2=80=9D= declaration is enough (in .yml file) to have specific hostname for that container !! Wondering if anyone can help figure out why is the behaviour erratic ? What can I do to fix it ? Is this an issue with Docker only on Alpine ? Thanks in anticipation. regards, BD --000000000000e337fd05bca84a2f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi Folks,

Have been using docker and docker-compose inside Virtualbox VMs running = Alpine 3.13 guestOS, on a Windows 10 Professional host. The Alpine Guest ha= s 2 vCPUs, 4GB vRAM, and even when all containers are running the RAM usage= remains below 1GB.

  • Docker version 20.10.3, build 48d30b5b32e99c932b4ea3edca74353feddd8= 3ff
  • docker-compose version 1.27.4, build unknown

I use 2 docker-compose .yml files to bring up, 2 set of containers.=20 First .yml file brings up Telgraf, InfluxDB, Grafana containers based on images from DockerHub. The second .yml brings up a POJO-server (Java)=20 with application and another 3 tester/simulators.They all share a=20 dedicated network =E2=80=98mynet=E2=80=99 (using bridged driver). The above= setup seems=20 to work perfectly at times. For example:

  • Sometimes , containers don=E2=80=99t seem to get hostname assigned (i.e.= the=20 mnemonic container-id is set as hostname, as is default) while at other=20 times specific hostname is indeed assigned.

  • Then, for a few containers (not all), the inter-container DNS/name=20 resolution doesn=E2=80=99t seem to work, but at the same time few other=20 containers have perfectly working inter-container DNS/name resolution.=20 When inter-container DNS resolution does-not, if I log into the=20 container runtime using =E2=80=98docker exec -it bash=E2=80=99, and try to= do 'ping ', I get the following error:
    ping: somehostname: Temporary failure in name resolution

  • Sometimes, some containers (not all) require the "service: >=20 hostname: " declaration in the docker-compose .yml file to get specifi= c=20 hostname assigned to the container, but for other containers at other=20 times, that declaration is not needed, and only the =E2=80=9Ccontainer_name= =E2=80=9D=20 declaration is enough (in .yml file) to have specific hostname for that=20 container !!

Wondering if anyone can help figure out why is the behaviour erratic ? W= hat can I do to fix it ? Is this an issue with Docker only on Alpine ?
<= /p>

Thanks in anticipation.

regards,
BD
--000000000000e337fd05bca84a2f--