Bootprozess / Netzwerk beim Prozessstart

Fragen zur Nutzung, Features, usw..
Benutzeravatar
mrinas
Beiträge: 1904
Registriert: Mi Jan 29, 2020 10:12 pm

Re: Feedback Nightly 100.1

Beitrag von mrinas »

Hab' eben mal wieder ein Update auf die aktkuelle Version durchgeführt, gab direkt beim Start der atreboot ein paar HTTP Verbindungsfehler, womöglich timing? Box hängt am LAN und bekommt dort auch zuverlässig eine IP von der FritzBox, womöglich gabs den Verbindungsversuch noch bevor der eine IP bezogen wurde bzw. der DNS client in der Lage ist Namen aufzulösen?

Auch ein paar weitere Fehlermeldungen, u.a. zu einem meiner HTTP Zähler, muss da gleich nochmal die Konfiguration überprüfen - wenngleich sich da nix geändert hat und das bisher stets funktioniert hat.
Update: Hatte den Pfad für den Erzeugungszähler mit 'none' angegeben da es diesen nicht gibt. Das klappt nun wohl nicht mehr, ein leeres Feld scheint nun keine Fehler mehr zu generieren.

Code: Alles auswählen

atreboot.sh started
apt configuration already up to date
install required packages with 'apt-get'...
Err:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
  Temporary failure resolving 'raspbian.raspberrypi.org'
Err:2 https://deb.nodesource.com/node_14.x bullseye InRelease
  Temporary failure resolving 'deb.nodesource.com'
Err:3 http://archive.raspberrypi.org/debian bullseye InRelease
  Temporary failure resolving 'archive.raspberrypi.org'
Reading package lists...
W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/bullseye/InRelease  Temporary failure resolving 'raspbian.raspberrypi.org'
W: Failed to fetch https://deb.nodesource.com/node_14.x/dists/bullseye/InRelease  Temporary failure resolving 'deb.nodesource.com'
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/bullseye/InRelease  Temporary failure resolving 'archive.raspberrypi.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.54-1~deb11u1).
bc is already the newest version (1.07.1-2+b1).
git is already the newest version (1:2.30.2-1).
jq is already the newest version (1.6-2.1).
libapache2-mod-php is already the newest version (2:7.4+76).
mosquitto is already the newest version (2.0.11-1).
mosquitto-clients is already the newest version (2.0.11-1).
php is already the newest version (2:7.4+76).
php-curl is already the newest version (2:7.4+76).
php-gd is already the newest version (2:7.4+76).
php-json is already the newest version (2:7.4+76).
php-xml is already the newest version (2:7.4+76).
socat is already the newest version (1.7.4.1-3).
sshpass is already the newest version (1.09-1).
ssl-cert is already the newest version (1.1.0+nmu1).
sudo is already the newest version (1.9.5p2-3).
vim is already the newest version (2:8.2.2434-3+deb11u1).
python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
done
openwb.cron already up to date
openwb2.service already up to date
no restore pending, normal startup
cleaning obsolete python cache folders...
python cache cleanup done
LAN/WLAN...
apache default site...
...ok
checking required apache modules...
headers (enabled by site administrator)
headers already enabled
ssl (enabled by site administrator)
ssl already enabled
proxy_wstunnel (enabled by site administrator)
proxy_wstunnel already enabled
check mosquitto installation...
mosquitto.conf already up to date
mosquitto openwb.conf already up to date
mosquitto_local.conf already up to date
mosquitto openwb_local.conf already up to date
mosquitto done
install required python packages with 'pip3'...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: jq==1.1.3 in /usr/local/lib/python3.9/dist-packages (from -r /var/www/html/openWB/requirements.txt (line 1)) (1.1.3)
Requirement already satisfied: paho_mqtt==1.6.1 in /usr/local/lib/python3.9/dist-packages (from -r /var/www/html/openWB/requirements.txt (line 2)) (1.6.1)
Requirement already satisfied: pymodbus==2.5.2 in /usr/local/lib/python3.9/dist-packages (from -r /var/www/html/openWB/requirements.txt (line 3)) (2.5.2)
Requirement already satisfied: pytest==6.2.5 in /usr/local/lib/python3.9/dist-packages (from -r /var/www/html/openWB/requirements.txt (line 4)) (6.2.5)
Requirement already satisfied: requests_mock==1.9.3 in /usr/local/lib/python3.9/dist-packages (from -r /var/www/html/openWB/requirements.txt (line 5)) (1.9.3)
Requirement already satisfied: lxml==4.7.1 in /home/openwb/.local/lib/python3.9/site-packages (from -r /var/www/html/openWB/requirements.txt (line 6)) (4.7.1)
Requirement already satisfied: aiohttp==3.7.2 in /home/openwb/.local/lib/python3.9/site-packages (from -r /var/www/html/openWB/requirements.txt (line 7)) (3.7.2)
Requirement already satisfied: schedule==1.1.0 in /home/openwb/.local/lib/python3.9/site-packages (from -r /var/www/html/openWB/requirements.txt (line 8)) (1.1.0)
Requirement already satisfied: PyJWT==2.6.0 in /home/openwb/.local/lib/python3.9/site-packages (from -r /var/www/html/openWB/requirements.txt (line 9)) (2.6.0)
Requirement already satisfied: ipparser==0.3.8 in /home/openwb/.local/lib/python3.9/site-packages (from -r /var/www/html/openWB/requirements.txt (line 10)) (0.3.8)
Requirement already satisfied: bs4==0.0.1 in /home/openwb/.local/lib/python3.9/site-packages (from -r /var/www/html/openWB/requirements.txt (line 11)) (0.0.1)
Requirement already satisfied: pkce==1.0.3 in /home/openwb/.local/lib/python3.9/site-packages (from -r /var/www/html/openWB/requirements.txt (line 12)) (1.0.3)
Requirement already satisfied: multidict<7.0,>=4.5 in /home/openwb/.local/lib/python3.9/site-packages (from aiohttp==3.7.2->-r /var/www/html/openWB/requirements.txt (line 7)) (6.0.2)
Requirement already satisfied: async-timeout<4.0,>=3.0 in /home/openwb/.local/lib/python3.9/site-packages (from aiohttp==3.7.2->-r /var/www/html/openWB/requirements.txt (line 7)) (3.0.1)
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.9/dist-packages (from aiohttp==3.7.2->-r /var/www/html/openWB/requirements.txt (line 7)) (21.2.0)
Requirement already satisfied: chardet<4.0,>=2.0 in /home/openwb/.local/lib/python3.9/site-packages (from aiohttp==3.7.2->-r /var/www/html/openWB/requirements.txt (line 7)) (3.0.4)
Requirement already satisfied: typing-extensions>=3.6.5 in /home/openwb/.local/lib/python3.9/site-packages (from aiohttp==3.7.2->-r /var/www/html/openWB/requirements.txt (line 7)) (4.4.0)
Requirement already satisfied: yarl<2.0,>=1.0 in /home/openwb/.local/lib/python3.9/site-packages (from aiohttp==3.7.2->-r /var/www/html/openWB/requirements.txt (line 7)) (1.8.1)
Requirement already satisfied: beautifulsoup4 in /home/openwb/.local/lib/python3.9/site-packages (from bs4==0.0.1->-r /var/www/html/openWB/requirements.txt (line 11)) (4.11.1)
Requirement already satisfied: dnspython in /home/openwb/.local/lib/python3.9/site-packages (from ipparser==0.3.8->-r /var/www/html/openWB/requirements.txt (line 10)) (2.2.1)
Requirement already satisfied: six>=1.15.0 in /usr/lib/python3/dist-packages (from pymodbus==2.5.2->-r /var/www/html/openWB/requirements.txt (line 3)) (1.16.0)
Requirement already satisfied: pyserial>=3.4 in /usr/local/lib/python3.9/dist-packages (from pymodbus==2.5.2->-r /var/www/html/openWB/requirements.txt (line 3)) (3.5)
Requirement already satisfied: iniconfig in /usr/local/lib/python3.9/dist-packages (from pytest==6.2.5->-r /var/www/html/openWB/requirements.txt (line 4)) (1.1.1)
Requirement already satisfied: toml in /usr/local/lib/python3.9/dist-packages (from pytest==6.2.5->-r /var/www/html/openWB/requirements.txt (line 4)) (0.10.2)
Requirement already satisfied: py>=1.8.2 in /usr/local/lib/python3.9/dist-packages (from pytest==6.2.5->-r /var/www/html/openWB/requirements.txt (line 4)) (1.11.0)
Requirement already satisfied: pluggy<2.0,>=0.12 in /usr/local/lib/python3.9/dist-packages (from pytest==6.2.5->-r /var/www/html/openWB/requirements.txt (line 4)) (1.0.0)
Requirement already satisfied: packaging in /usr/local/lib/python3.9/dist-packages (from pytest==6.2.5->-r /var/www/html/openWB/requirements.txt (line 4)) (21.3)
Requirement already satisfied: requests<3,>=2.3 in /usr/lib/python3/dist-packages (from requests_mock==1.9.3->-r /var/www/html/openWB/requirements.txt (line 5)) (2.25.1)
Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from yarl<2.0,>=1.0->aiohttp==3.7.2->-r /var/www/html/openWB/requirements.txt (line 7)) (2.10)
Requirement already satisfied: soupsieve>1.2 in /home/openwb/.local/lib/python3.9/site-packages (from beautifulsoup4->bs4==0.0.1->-r /var/www/html/openWB/requirements.txt (line 11)) (2.3.2.post1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.9/dist-packages (from packaging->pytest==6.2.5->-r /var/www/html/openWB/requirements.txt (line 4)) (3.0.6)
done
my IP: "192.168.178.99"
load versions...
chgrp: cannot access '/var/www/html/openWB/data/restore/*': No such file or directory
chmod: cannot access '/var/www/html/openWB/data/restore/*': No such file or directory
2023-01-03 16:46:07: boot done :-)
2023-01-03 16:46:15,553 - {root:123} - {DEBUG:MainThread} - Start openWB2.service
2023-01-03 16:46:15,554 - {helpermodules.update_config:320} - {DEBUG:MainThread} - Broker-Konfiguration aktualisieren
2023-01-03 16:46:17,140 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/pv/set/reserved_evu_overhang
2023-01-03 16:46:17,143 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/pv/set/released_evu_overhang
2023-01-03 16:46:17,145 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/pv/set/available_power
2023-01-03 16:46:17,148 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/pv/set/overhang_power_left
2023-01-03 16:46:17,156 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/chargepoint/13/set/plug_state_prev
2023-01-03 16:46:17,158 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/chargepoint/13/set/required_power
2023-01-03 16:46:17,329 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/command/command_completed
2023-01-03 16:46:17,332 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/command/mqttjs_0d3e438d/messages/1672696343595
2023-01-03 16:46:17,335 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/command/mqttjs_b085f115/messages/1672760582891
2023-01-03 16:46:17,338 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/command/mqttjs_b085f115/messages/1672760595170
2023-01-03 16:46:17,341 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/command/mqttjs_b085f115/messages/1672760673764
2023-01-03 16:46:17,345 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/command/mqttjs_b085f115/messages/1672760707135
2023-01-03 16:46:17,348 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/set/chargepoint/0/get/voltages
2023-01-03 16:46:17,350 - {helpermodules.update_config:348} - {DEBUG:MainThread} - Ungültiges Topic zum Startzeitpunkt: openWB/set/chargepoint/13/get/voltages
2023-01-03 16:46:31,755 - {helpermodules.subdata:243} - {ERROR:Thread-5} - Fehler im subdata-Modul
Traceback (most recent call last):
  File "/var/www/html/openWB/packages/helpermodules/subdata.py", line 232, in process_vehicle_topic
    if config["type"] is None:
TypeError: string indices must be integers
2023-01-03 16:46:31,789 - {helpermodules.subdata:243} - {ERROR:Thread-5} - Fehler im subdata-Modul
Traceback (most recent call last):
  File "/var/www/html/openWB/packages/helpermodules/subdata.py", line 232, in process_vehicle_topic
    if config["type"] is None:
TypeError: string indices must be integers
2023-01-03 16:46:31,792 - {helpermodules.subdata:243} - {ERROR:Thread-5} - Fehler im subdata-Modul
Traceback (most recent call last):
  File "/var/www/html/openWB/packages/helpermodules/subdata.py", line 232, in process_vehicle_topic
    if config["type"] is None:
TypeError: string indices must be integers
2023-01-03 16:46:32,002 - {helpermodules.setdata:37} - {DEBUG:Thread-6} - Subdata initialisation completed. Starting setdata loop to broker.
2023-01-03 16:46:32,027 - {modules.devices.sma_shm.utils:17} - {ERROR:Thread-5} - Serial <1900210416> must bei an int or None, but is <<class 'str'>>. Assuming None.
2023-01-03 16:46:40,740 - {schedule:660} - {DEBUG:MainThread} - Running job Job(interval=1, unit=minutes, do=handler10Sec, args=(), kwargs={})
2023-01-03 16:46:40,741 - {root:62} - {INFO:MainThread} - # ***Start*** 
15,2kWp SMA (SB4000TL-21, SB3.0, STP6.0-SE + BYD HVS, EnergyMeter), openWB Standard+, openWB Pro, Peugeot e2008, Tesla Model Y LR.
LutzB
Beiträge: 3494
Registriert: Di Feb 25, 2020 9:23 am

Re: Feedback Nightly 100.1

Beitrag von LutzB »

Kann gut sein. Wir haben auch Probleme, die IP zuverlässig in der atreboot.sh auszulesen. Vermutlich startet der Dienst zu früh.

Hast Du eine Idee, wie wir den Start verzögern können, bis die Netzwerkverbindung steht? Gibt es dafür im systemd einen Trigger?

Die etwas unschöne Lösung wäre eine Schleife in der atreboot.sh.
Benutzeravatar
mrinas
Beiträge: 1904
Registriert: Mi Jan 29, 2020 10:12 pm

Re: Feedback Nightly 100.1

Beitrag von mrinas »

Es gibt eine Option "wait for network" in raspi-config, vielleicht würde das helfen?
15,2kWp SMA (SB4000TL-21, SB3.0, STP6.0-SE + BYD HVS, EnergyMeter), openWB Standard+, openWB Pro, Peugeot e2008, Tesla Model Y LR.
derNeueDet
Beiträge: 4224
Registriert: Mi Nov 11, 2020 7:16 pm

Re: Feedback Nightly 100.1

Beitrag von derNeueDet »

Es gibt Abhängigkeiten zu anderen Diensten, die man eintragen kann.

Muss mal schauen.

VG
Det
10kWp PV mit SMA Tripower 10000TL-10 (PE11 mit SDM72V2); 2,4kWp mit Solis 2.5 G6 (EE11 mit SDM120). OpenWB Standard+. EVU EM540 an einem Raspi mit Venus OS. BEV Mercedes EQA 250 (07/2023)
LutzB
Beiträge: 3494
Registriert: Di Feb 25, 2020 9:23 am

Re: Feedback Nightly 100.1

Beitrag von LutzB »

mrinas hat geschrieben: Di Jan 03, 2023 4:42 pm Es gibt eine Option "wait for network" in raspi-config, vielleicht würde das helfen?
Das hilft aber nicht auf anderen Plattformen. Und 2.0 sollte flexibel einsetzbar sein.
Benutzeravatar
mrinas
Beiträge: 1904
Registriert: Mi Jan 29, 2020 10:12 pm

Re: Feedback Nightly 100.1

Beitrag von mrinas »

guter Punkt, da bin ich dabei. Die Abhängigkeit an andere Dienste hört sich m.E. gut an.
15,2kWp SMA (SB4000TL-21, SB3.0, STP6.0-SE + BYD HVS, EnergyMeter), openWB Standard+, openWB Pro, Peugeot e2008, Tesla Model Y LR.
derNeueDet
Beiträge: 4224
Registriert: Mi Nov 11, 2020 7:16 pm

Re: Feedback Nightly 100.1

Beitrag von derNeueDet »

Code: Alles auswählen

# openwb-version:1
[Unit]
Description="Regelung openWB 2.0"
After=network.target

[Service]
User=openwb
WorkingDirectory=/var/www/html/openWB
ExecStartPre=-/var/www/html/openWB/runs/atreboot.sh
ExecStart=/var/www/html/openWB/packages/main.py
Restart=always

[Install]
WantedBy=multi-user.target

Code: Alles auswählen

After=network-online.target network.target
wäre der 2. Versuch den ich machen würde.

VG
Det
10kWp PV mit SMA Tripower 10000TL-10 (PE11 mit SDM72V2); 2,4kWp mit Solis 2.5 G6 (EE11 mit SDM120). OpenWB Standard+. EVU EM540 an einem Raspi mit Venus OS. BEV Mercedes EQA 250 (07/2023)
Benutzeravatar
mrinas
Beiträge: 1904
Registriert: Mi Jan 29, 2020 10:12 pm

Re: Feedback Nightly 100.1

Beitrag von mrinas »

gibt wohl auch ein network-online.target. https://systemd.io/NETWORK_ONLINE/


Hier wohl aber über eine Wants= definition.
network-online.target
Units that strictly require a configured network connection should pull in network-online.target (via a Wants= type dependency) and order themselves after it. This target unit is intended to pull in a service that delays further execution until the network is sufficiently set up. What precisely this requires is left to the implementation of the network managing service.
https://www.freedesktop.org/software/sy ... ecial.html
Zuletzt geändert von mrinas am Di Jan 03, 2023 5:00 pm, insgesamt 1-mal geändert.
15,2kWp SMA (SB4000TL-21, SB3.0, STP6.0-SE + BYD HVS, EnergyMeter), openWB Standard+, openWB Pro, Peugeot e2008, Tesla Model Y LR.
derNeueDet
Beiträge: 4224
Registriert: Mi Nov 11, 2020 7:16 pm

Re: Feedback Nightly 100.1

Beitrag von derNeueDet »

network-online.target is a target that actively waits until the nework is "up", where the definition of "up" is defined by the network management software. Usually it indicates a configured, routable IP address of some kind. Its primary purpose is to actively delay activation of services until the network is set up. It is an active target, meaning that is may be pulled in by the services requiring the network to be up, but is not pulled in by the network management service itself. By default all remote mounts defined in /etc/fstab pull this service in, in order to make sure the network is up before it is attempted to connect to a network share. Note that normally, if no service requires it, and if no remote mount point is configured this target is not pulled into the boot, thus avoiding any delays during boot should the network not be available. It is strongly recommended not to pull in this target too liberally: for example network server software should generally not pull this in (since server software generally is happy to accept local connections even before any routable network interface is up), its primary purpose is network client software that cannot operate without network.
10kWp PV mit SMA Tripower 10000TL-10 (PE11 mit SDM72V2); 2,4kWp mit Solis 2.5 G6 (EE11 mit SDM120). OpenWB Standard+. EVU EM540 an einem Raspi mit Venus OS. BEV Mercedes EQA 250 (07/2023)
derNeueDet
Beiträge: 4224
Registriert: Mi Nov 11, 2020 7:16 pm

Re: Feedback Nightly 100.1

Beitrag von derNeueDet »

mrinas hat geschrieben: Di Jan 03, 2023 4:56 pm gibt wohl auch ein network-online.target. https://systemd.io/NETWORK_ONLINE/
Ja, hab ich gerade oben auch noch ergänzt

VG
Det
10kWp PV mit SMA Tripower 10000TL-10 (PE11 mit SDM72V2); 2,4kWp mit Solis 2.5 G6 (EE11 mit SDM120). OpenWB Standard+. EVU EM540 an einem Raspi mit Venus OS. BEV Mercedes EQA 250 (07/2023)
Antworten