Docker auf Pi armv7l: Netzwerk problem zu github.com

Solaranzeige und Docker
Alles was mit der Docker Version zu tun hat.

Moderatoren: Ulrich, DeBaschdi

Antworten
hajozi1
Beiträge: 5
Registriert: Do 19. Jan 2023, 17:24
Hat sich bedankt: 1 Mal

Docker auf Pi armv7l: Netzwerk problem zu github.com

Beitrag von hajozi1 »

Hallo
ich habe mich mal dem Projekt zugewendet, da eine Huawei PV Anlage Einzug gehalten hat. Danke schon mal vorab an den Ersteller @Ulrich und auch an @DeBaschdi für die Docker images.

Mein System ist ein Raspberry Pi

Code: Alles auswählen

Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux
Mein Nutzer "pi" ist in der Docker Gruppe.

Code: Alles auswählen

pi@raspberrypi:~/solaranzeige $ groups
pi adm mail dialout cdrom sudo audio video plugdev games users input netdev lpadmin docker gpio i2c spi
Im /home/pi habe ich ein UNterverzeichnis "solaranzeige" angelegt und alle benötigen Unterverzeichnisse für den Docker Container erstellt.
Der Start des Docker container (Ports musste ich wegen anderer Sachen auf dem PI anpassen) erfolgt mit einem kleinen Bashscript

Code: Alles auswählen

#!/bin/bash

SOLARANZEIGE_STORAGE=/home/pi/solaranzeige/solaranzeige_storage/
INFLUXDB_STORAGE=/home/pi/solaranzeige/influxdb_storage/
GRAFANA_STORAGE=/home/pi/solaranzeige/grafana_storage/
PVFORECAST_STORAGE=/home/pi/solaranzeige/pvforcast_storage/
WWW_STORAGE=/home/pi/solaranzeige/www_storage/
        
# Port 3000 Grafana
# Port 18831 Mosquito Port on Host
# Port 8000 Dashport Apache port on host
docker run \
  -d \
  -e USER_ID="99" \
  -e GROUP_ID="100" \
  -e TIMEZONE="Europe/Berlin" \
  -e UPDATE="yes" \
  -e INFLUXDB="yes" \
  -e MOSQUITTO="no" \
  -p 3000:3000 \
  -p 18831:1883 \
  -p 8000:80 \
  -v ${SOLARANZEIGE_STORAGE}:/solaranzeige \
  -v ${INFLUXDB_STORAGE}:/var/lib/influxdb \
  -v ${GRAFANA_STORAGE}:/var/lib/grafana \
  -v ${PVFORECAST_STORAGE}:/pvforecast \
  -v ${WWW_STORAGE}:/var/www \
  --name=Solaranzeige \
  --restart unless-stopped \
  --tmpfs /tmp \
  --tmpfs /var/log \
  takealug/solaranzeige:arm32v7 
Leider läuft der Entrypoint des containers sehr schnell in einen Fehler

Code: Alles auswählen

pi@raspberrypi:~/solaranzeige $ docker logs Solaranzeige 

Current default time zone: 'Europe/Berlin'
Local time is now:      Thu Jan  1 01:00:00 CET 1970.
Universal Time is now:  Thu Jan  1 00:00:00 UTC 1970.

users:x:100:
##################################
# Initial Setup for Solaranzeige #
##################################

create necessary files/directories...

downloading Main Program...
Cloning into 'solar_config'...
fatal: unable to access 'https://github.com/DeBaschdi/solar_config.git/': Resolving timed out after 674004511866 milliseconds
cp: cannot stat '/tmp/git/solar_config/html': No such file or directory
cp: cannot stat '/tmp/git/solar_config/www': No such file or directory
cp: cannot stat '/tmp/git/solar_config/solaranzeige': No such file or directory
cp: cannot stat '/tmp/git/solar_config/influxdb': No such file or directory
cp: cannot stat '/tmp/git/solar_config/grafana': No such file or directory

Update wird gestartet .....

Ohhhh jeeee: ... this is a bug (../../random/random-csprng.c:1276:do_fast_random_poll)
Aborted (core dumped)

Installing PVForecast...
Cloning into 'PVForecast'...
fatal: unable to access 'https://github.com/StefaE/PVForecast.git/': Resolving timed out after 124147738664 milliseconds
cp: cannot stat '/tmp/git/PVForecast/PVForecast/': No such file or directory
cp: cannot stat '/tmp/git/PVForecast/*.py': No such file or directory
cp: cannot stat '/tmp/git/PVForecast/solcast_light_config.ini': No such file or directory
cp: cannot stat '/tmp/git/PVForecast/config.ini': No such file or directory
chmod: cannot access '/solaranzeige/setup': No such file or directory
chmod: cannot access '/solaranzeige/statusmail': No such file or directory
chmod: cannot access '/solaranzeige/support': No such file or directory

Installing Grafana Plugins...
✔ Downloaded and extracted fetzerch-sunandmoon-datasource v0.3.0 zip successfully to /var/lib/grafana/plugins/fetzerch-sunandmoon-datasource

Please restart Grafana after installing plugins. Refer to Grafana documentation for instructions if necessary.

✔ Downloaded and extracted briangann-gauge-panel v0.0.9 zip successfully to /var/lib/grafana/plugins/briangann-gauge-panel

Please restart Grafana after installing plugins. Refer to Grafana documentation for instructions if necessary.


##############################################################################################
# Initial Setup for Solaranzeige completed, please run /solaranzeige/setup for Configuration #
# example : docker exec -ti Solaranzeige /solaranzeige/setup                                 #
##############################################################################################
Weiß jemand, warum die Netzwerkverbindung nicht funktioniert, um vom Github zu lesen?
Die Ausgabe von "docker inspect Solaranzeige" habe ich mal beigefügt als attachment.
inspect.txt
(12.85 KiB) 85-mal heruntergeladen
Meine Host ifconfig ist wie folgt:

Code: Alles auswählen

br-30669212cd63: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.19.0.1  netmask 255.255.0.0  broadcast 172.19.255.255
        ether 02:42:9a:07:e1:a9  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-5aac1d9be5bf: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:7a:ce:f7:71  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:12:4f:19:ba  txqueuelen 0  (Ethernet)
        RX packets 839691  bytes 70415757 (67.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 651838  bytes 71986145 (68.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.18  netmask 255.255.255.0  broadcast 192.168.178.255
        ether dc:a6:32:30:80:41  txqueuelen 1000  (Ethernet)
        RX packets 3838257  bytes 2837948009 (2.6 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2959446  bytes 2483107751 (2.3 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Lokale Schleife)
        RX packets 13435  bytes 4351297 (4.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13435  bytes 4351297 (4.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth502f7af: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.69.197  netmask 255.255.0.0  broadcast 169.254.255.255
        ether 1e:d3:fb:2a:27:cc  txqueuelen 0  (Ethernet)
        RX packets 401  bytes 31540 (30.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 552  bytes 642712 (627.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Vielen Dank für jegliche Hilfe

hajozi1
Beiträge: 5
Registriert: Do 19. Jan 2023, 17:24
Hat sich bedankt: 1 Mal

Re: Docker auf Pi armv7l: Netzwerk problem zu github.com

Beitrag von hajozi1 »

Manchmal findet man im Forum nix, schreibt einen Artikel, sucht weiter und dann ist doch schon was da.
gelöst mit: viewtopic.php?t=1490

DeBaschdi
Beiträge: 299
Registriert: Mo 10. Aug 2020, 08:13
Hat sich bedankt: 15 Mal
Danksagung erhalten: 55 Mal

Re: Docker auf Pi armv7l: Netzwerk problem zu github.com

Beitrag von DeBaschdi »

Ich weiß zwar nicht wie du was gelöst hast, aber dein "startscript" kann erstens nicht funktionieren, zweitens würdest du jedesmal neu den container installieren, das reicht 1mal.
Der Container wird anschließend automatisch von Docker gestartet.

hajozi1
Beiträge: 5
Registriert: Do 19. Jan 2023, 17:24
Hat sich bedankt: 1 Mal

Re: Docker auf Pi armv7l: Netzwerk problem zu github.com

Beitrag von hajozi1 »

Der Tipp mit dem startscript ist richtig. Funktioniert beim ersten install aber richtig. Ich hätte den fehlerhaften container vorher immer gelöscht.
Das github Problem ließ sich mit dem --privileged mode lösen

Antworten

Zurück zu „Docker Container“