alexreinert / piVCCU

piVCCU is a project to install the original Homematic CCU3 firmware inside a virtualized container (lxc) on ARM based single board computers.
Apache License 2.0
302 stars 64 forks source link

piVCCU3 startet keinen Webserver #449

Closed theozordako closed 2 years ago

theozordako commented 2 years ago

Hallo zusammen, nachdem ich jetzt 2 Stunden den Fehler eingekreist habe, komme ich nicht mehr weiter und Frage hier:

Hintergrund: Ich betreibe einige Raspis zur Hausautomatisierung und bin selbst Informatiker. Ich hatte vorher eine uralte Version von debmatic installiert, habe diese deinstalliert und steige jetzt auf pivCCU3 um.

Setup: Raspi 3 mit HM-MOD-RPI-PCB zur Steuerung meiner Homatic Thermostate --> Funktionierte bisher einwandfrei in debmatic

Problem: Nach der Migration auf piVCCU3 laufen zwar offenbar alle Services korrekt sowie der Container, aber im Container selbst spawnt offenbar kein Webserver; lighttpd läuft im container nicht. Entsprechend bekomme ich auch keine WebUI angezeigt, wenn ich die IP des Containers im Webbrowser aufrufe. Irgendeine Idee woran das liegen könnte und wie ich das fixe?

Was ich gemacht habe: Neuer Kernel+Header installiert, Kernelmodule installiert, Hardwaretreiber eingebunden, Bridge eingebunden so wie es im Installationsleitfaden beschrieben steht. https://github.com/alexreinert/piVCCU/blob/master/docs/setup/raspberrypi.md

Raspi System (stretch)

root@lothos:/etc/apt/sources.list.d# cat /etc/issue
Raspbian GNU/Linux 9 \n \l

piVVCU Ökosystem

root@lothos:/etc/apt/sources.list.d# pivccu-info
piVCCU version: 3.65.6-73
Kernel modules: Available
Raw UART dev:   Available
HMRF Hardware:  HM-MOD-RPI-PCB
 Connected via: GPIO@3f201000.serial (/dev/raw-uart)
 Board serial:  PEQ2217496
 Radio MAC:     0x6BD279
HMIP Hardware:  HM-MOD-RPI-PCB
 Connected via: GPIO@3f201000.serial (/dev/raw-uart)
 SGTIN:         3014F711A061A7D8A9AB3E18
 Radio MAC:     0xB786E0
State:          RUNNING
PID:            821
IP:             192.168.1.229
CPU use:        78.83 seconds
BlkIO use:      65.59 MiB
Memory use:     171.43 MiB
KMem use:       4.16 MiB
Link:           vethpivccu
 TX bytes:      56.38 KiB
 RX bytes:      1.05 MiB
 Total bytes:   1.11 MiB

Netzwerkkonfiguration:

root@lothos:/etc/apt/sources.list.d# sudo sudo brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.b827eb0b6e56       no              enxb827eb0b6e56
                                                        vethpivccu

Containerstatus

root@lothos:/etc/apt/sources.list.d#   journalctl -u pivccu
-- Logs begin at Fri 2022-08-19 11:33:06 CEST, end at Fri 2022-08-19 13:25:06 CEST. --
Aug 19 11:33:14 lothos systemd[1]: Starting piVCCU...
Aug 19 11:33:24 lothos start_container.sh[528]: kernel.sched_rt_runtime_us = -1
Aug 19 11:33:25 lothos systemd[1]: Started piVCCU.

Logs im Container

root@lothos:/etc/apt/sources.list.d# sudo pivccu-attach cat /var/log/messages
Aug 19 11:33:26 piVCCU syslog.info syslogd started: BusyBox v1.29.2
Aug 19 11:33:26 piVCCU user.notice kernel: klogd started: BusyBox v1.29.2 (2022-06-23 16:14:07 CEST)
Aug 19 11:33:26 piVCCU syslog.info syslogd exiting
Aug 19 11:33:26 ccu3-webui syslog.info syslogd started: BusyBox v1.29.2
Aug 19 11:33:26 ccu3-webui user.notice kernel: klogd started: BusyBox v1.29.2 (2022-06-23 16:14:07 CEST)
Aug 19 11:33:26 ccu3-webui daemon.err udhcpc[159]: started, v1.29.2
Aug 19 11:33:26 ccu3-webui daemon.err udhcpc[159]: sending discover
Aug 19 11:33:26 ccu3-webui daemon.err udhcpc[159]: sending select for 192.168.1.229
Aug 19 11:33:26 ccu3-webui daemon.err udhcpc[159]: lease of 192.168.1.229 obtained, lease time 86400
Aug 19 11:33:27 ccu3-webui user.info firewall: configuration set
Aug 19 11:33:28 ccu3-webui daemon.info ifplugd(eth0)[217]: ifplugd 0.28 initializing.
Aug 19 11:33:28 ccu3-webui daemon.info ifplugd(eth0)[217]: Using interface eth0/BA:D8:CF:AB:C1:9B with driver <veth> (version: 1.0)
Aug 19 11:33:28 ccu3-webui daemon.info ifplugd(eth0)[217]: Using detection mode: SIOCETHTOOL
Aug 19 11:33:28 ccu3-webui daemon.info ifplugd(eth0)[217]: Initialization complete, link beat detected.
Aug 19 11:33:28 ccu3-webui daemon.warn ifplugd(eth0)[217]: Could not open /dev/tty, cannot beep.
Aug 19 11:33:28 ccu3-webui daemon.info ifplugd(eth0)[217]: Executing '/etc/ifplugd/ifplugd.action eth0 up'.
Aug 19 11:33:28 ccu3-webui daemon.warn ifplugd(eth0)[217]: client: ifup: interface eth0 already configured
Aug 19 11:33:28 ccu3-webui daemon.info ifplugd(eth0)[217]: Program executed successfully.
Aug 19 11:33:47 ccu3-webui daemon.notice ntpdate[225]: step time server 193.158.22.13 offset 10.282090 sec
Aug 19 11:33:50 ccu3-webui daemon.notice ntpd[226]: ntpd 4.2.8p12@1.3728-o Thu Jun 23 16:11:58 CEST 2022 (1): Starting
Aug 19 11:33:50 ccu3-webui daemon.info ntpd[226]: Command line: /usr/sbin/ntpd -g 0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org 3.de.pool.ntp.org
Aug 19 11:33:51 ccu3-webui daemon.info ntpd[228]: proto: precision = 1.250 usec (-20)
Aug 19 11:33:51 ccu3-webui daemon.err ntpd[228]: restrict: ignoring line 6, address/host '[::1]' unusable.
Aug 19 11:33:51 ccu3-webui daemon.info ntpd[228]: Listen and drop on 0 v4wildcard 0.0.0.0:123
Aug 19 11:33:51 ccu3-webui daemon.info ntpd[228]: Listen normally on 1 lo 127.0.0.1:123
Aug 19 11:33:51 ccu3-webui daemon.info ntpd[228]: Listen normally on 2 eth0 192.168.1.229:123
Aug 19 11:33:51 ccu3-webui daemon.info ntpd[228]: Listening on routing socket on fd #19 for interface updates
Aug 19 11:33:51 ccu3-webui daemon.info ntpd[228]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized
Aug 19 11:33:51 ccu3-webui daemon.info ntpd[228]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized
Aug 19 11:33:51 ccu3-webui daemon.err xinetd[246]: Unable to read included directory: /etc/config/xinetd.d [file=/etc/xinetd.conf] [line=14]
Aug 19 11:33:51 ccu3-webui daemon.crit xinetd[246]: 246 {init_services} no services. Exiting...
Aug 19 11:33:51 ccu3-webui user.info root: Updating RF Lan Gateway Coprocessor Firmware
Aug 19 11:33:51 ccu3-webui user.debug update-coprocessor: firmware filename is: coprocessor_update_hm_only.eq3
Aug 19 11:33:51 ccu3-webui user.info root: Updating RF Lan Gateway Firmware
Aug 19 11:33:51 ccu3-webui user.info update-lgw-firmware: No gateway found in config file /etc/config/rfd.conf
Aug 19 11:33:51 ccu3-webui user.info kernel: [   38.761723] eq3loop: created slave mmd_bidcos
Aug 19 11:33:53 ccu3-webui user.info kernel: [   40.947893] eq3loop: eq3loop_open_slave() mmd_bidcos
Aug 19 11:34:22 ccu3-webui user.info kernel: [   69.433505] eq3loop: eq3loop_close_slave() mmd_hmip
Aug 19 11:34:22 ccu3-webui user.info kernel: [   69.435867] eq3loop: eq3loop_close_slave() mmd_hmip
Aug 19 11:34:22 ccu3-webui user.info kernel: [   69.453634] eq3loop: eq3loop_open_slave() mmd_hmip

Prozesse im Container:

root@lothos:/etc/apt/sources.list.d# sudo pivccu-attach ps -Aef
PID   USER     TIME  COMMAND
    1 root      0:00 init
   91 root      0:06 /bin/hss_led -l 6
  124 dbus      0:00 dbus-daemon --system
  154 root      0:00 /sbin/syslogd -n -m 0
  157 root      0:00 /sbin/klogd -n
  177 root      0:00 /sbin/udhcpc -b -t 100 -T 3 -S -x hostname:ccu3-webui -i eth0 -F ccu3-webui -V eQ3-CCU3 -s /bin/dhcp.script -p /var/run/udhcpc_eth0.pid
  217 root      0:00 /usr/sbin/ifplugd -i eth0 -fI -u0 -d10
  228 root      0:01 /usr/sbin/ntpd -g 0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org 3.de.pool.ntp.org
  251 root      0:00 /bin/eq3configd
  265 root      0:00 /bin/ssdpd
  316 root      0:01 /bin/multimacd -f /etc/multimacd.conf -l 5
  343 root      0:03 /bin/rfd -f /etc/config/rfd.conf -l 5
  363 root      1:06 java -Xmx128m -Dos.arch=arm -Dlog4j.configurationFile=file:///etc/config/log4j2.xml -Dfile.encoding=ISO-8859-1 -Dgnu.io.rxtx.SerialPorts=/dev/mmd_hmip -cp /opt/HMServer/HMIPServer.jar:/opt/
  476 root      0:00 /bin/eq3-uds-services
  482 root      0:01 /bin/ReGaHss.community -f /etc/rega.conf -l 2
  560 root      0:00 /usr/sbin/crond -f -l 9
  738 root      0:00 ps -Aef

Wenn ich versuche den lighttpd im Container zu starten kommt nur ein "OK" es passiert aber nichts weiter

root@lothos:/var/log# sudo pivccu-attach

/etc/init.d # cat /etc/issue
Welcome to CCU3

/etc/init.d # /etc/init.d/S50lighttpd start
Starting lighttpd: OK

Laufende Prozesse danach:

/etc/init.d # ps -Aef
PID   USER     TIME  COMMAND
    1 root      0:00 init
   91 root      0:06 /bin/hss_led -l 6
  124 dbus      0:00 dbus-daemon --system
  154 root      0:00 /sbin/syslogd -n -m 0
  157 root      0:00 /sbin/klogd -n
  177 root      0:00 /sbin/udhcpc -b -t 100 -T 3 -S -x hostname:ccu3-webui -i eth0 -F ccu3-webui -V eQ3-CCU3 -s /bin/dhcp.script -p /var/run/udhcpc_eth0.pid
  217 root      0:00 /usr/sbin/ifplugd -i eth0 -fI -u0 -d10
  228 root      0:01 /usr/sbin/ntpd -g 0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org 3.de.pool.ntp.org
  251 root      0:00 /bin/eq3configd
  265 root      0:00 /bin/ssdpd
  316 root      0:01 /bin/multimacd -f /etc/multimacd.conf -l 5
  343 root      0:03 /bin/rfd -f /etc/config/rfd.conf -l 5
  363 root      1:08 java -Xmx128m -Dos.arch=arm -Dlog4j.configurationFile=file:///etc/config/log4j2.xml -Dfile.encoding=ISO-8859-1 -Dgnu.io.rxtx.SerialPorts=/dev/mmd_hmip -cp /opt/HMServer/HMIPServer.jar:/opt/
  476 root      0:00 /bin/eq3-uds-services
  482 root      0:01 /bin/ReGaHss.community -f /etc/rega.conf -l 2
  560 root      0:00 /usr/sbin/crond -f -l 9
  742 root      0:00 /bin/sh
  776 root      0:00 ps -Aef
alexreinert commented 2 years ago

Ist IPv6 deaktiviert? Wenn ja, dürfte darin das Problem liegen.

theozordako commented 2 years ago

Hi Alex, in der Tat ist ipv6 deaktiviert, da ich ein reines ipv4 Netz betreibe. Gibt es eine Alternative zur Aktivierung von ipv6? Ich habe es bewusst ausgeschaltet, um keinen dual stack betreiben zu müssen. Danke fürs Feedback.

alexreinert commented 2 years ago

Nicht aktiv deaktivieren, sondern einfach nicht konfigurieren. Dann gibt es zwar eine Link Local Adresse, aber die wird nicht weiter genutzt, sofern kein IPv6 Router gefunden wird.

theozordako commented 2 years ago

Hi Alex, leider hat es etwas gedauert die Einstellung zu verifizieren. Du hast Recht, sobal dich IPV6 über vi /etc/sysctl.conf wieder aktiviere ist der Server unter der genannten (IPV4 ;) erreichbar. Ich hatte zwischenzeitlich Probleme mit dem restore eines alten Backups, das offenbar pivccu dazu bringt nicht mehr zu starten, aber das ist eine andere Geschichte. Danke. Ticket kann geschlossen werden