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

docker-compose up fails #210

Open
okriso opened this issue Oct 21, 2020 · 2 comments
Open

docker-compose up fails #210

okriso opened this issue Oct 21, 2020 · 2 comments

Comments

@okriso
Copy link

okriso commented Oct 21, 2020

Hello... I have recently set up the IOTstack and firstly loving it, and i have had it working for around 2 months with no problems. Using the instructions on GITHub i also installed a custom container for my unifi controller.

Today, i noticed that there was an updated openhab image (2.5.9). I updated the compose file to reflect 2.5.9 from 2.4.0 AND i updated the "ports:" for my unifi service to the below. I changed the port setting so there were no conflicts between unifi and openhab.

When i then run the up command i get the below error and i cannot figure out how this happened. i am happy to problem solve this, just need a little guidance on where to look, thanks in advance.

pi@HomePi:~/IOTstack $ docker-compose up -d
Pulling portainer (portainer/portainer:)...
ERROR: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.88.210:53: read udp 192.168.88.210:47109->192.168.88.210:53: read: connection refused

(unifi) ports:
- 9080:8080
- 9443:8443
- 9880:8880
- 4478:3478

@Slyke
Copy link
Collaborator

Slyke commented Oct 21, 2020

Hey @okriso Can you run the following commands, create an issue and paste the output here: https://github.com/SensorsIot/IOTstack/issues

This repo is abandoned and not maintained, so use the other in the link.

sudo apt update
sudo apt install dnsutils
dig registry-1.docker.io

Here's my outputs:

[2020-10-21T08:52:40+0100] [pi@raspberrypi] ~ $ sudo apt install dnsutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libirs161
Suggested packages:
  rblcheck
The following NEW packages will be installed:
  dnsutils libirs161
0 upgraded, 2 newly installed, 0 to remove and 6 not upgraded.
Need to get 596 kB of archives.
After this operation, 952 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://raspbian.freemirror.org/raspbian buster/main armhf libirs161 armhf 1:9.11.5.P4+dfsg-5.1+deb10u2 [235 kB]
Get:2 http://raspbian.freemirror.org/raspbian buster/main armhf dnsutils armhf 1:9.11.5.P4+dfsg-5.1+deb10u2 [360 kB]
Fetched 596 kB in 3s (199 kB/s)
Selecting previously unselected package libirs161:armhf.
(Reading database ... 42712 files and directories currently installed.)
Preparing to unpack .../libirs161_1%3a9.11.5.P4+dfsg-5.1+deb10u2_armhf.deb ...
Unpacking libirs161:armhf (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Selecting previously unselected package dnsutils.
Preparing to unpack .../dnsutils_1%3a9.11.5.P4+dfsg-5.1+deb10u2_armhf.deb ...
Unpacking dnsutils (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up libirs161:armhf (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up dnsutils (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
[2020-10-21T08:53:32+0100] [pi@raspberrypi] ~ $ dig registry-1.docker.io

; <<>> DiG 9.11.5-P4-5.1+deb10u2-Raspbian <<>> registry-1.docker.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6425
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;registry-1.docker.io.          IN      A

;; ANSWER SECTION:
registry-1.docker.io.   44      IN      A       23.22.155.84
registry-1.docker.io.   44      IN      A       54.85.107.53
registry-1.docker.io.   44      IN      A       18.213.137.78
registry-1.docker.io.   44      IN      A       34.238.187.50
registry-1.docker.io.   44      IN      A       3.211.199.249
registry-1.docker.io.   44      IN      A       52.4.20.24
registry-1.docker.io.   44      IN      A       54.85.56.253
registry-1.docker.io.   44      IN      A       35.174.73.84

;; Query time: 10 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Oct 21 08:53:38 BST 2020
;; MSG SIZE  rcvd: 177

[2020-10-21T08:53:38+0100] [pi@raspberrypi] ~ $

It appears that you have a local DNS server (Are you using PiHole or BindDNS?) and that's not resolving to docker.io's IP address. You should be getting a list of IP addresses like I have for docker.io

@Paraphraser
Copy link
Contributor

@Slyke - @okriso also asked this question on Discord. My theory on this is that the RPi running IOTstack normally runs PiHole, and that PiHole was not "up" when compose tried to connect to Dockerhub. See https://discord.com/channels/638610460567928832/638610461109256194/768438533429788672

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants