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

Update des Containers nicht möglich #159

Closed
tis-cs opened this issue Jan 26, 2018 · 24 comments
Closed

Update des Containers nicht möglich #159

tis-cs opened this issue Jan 26, 2018 · 24 comments

Comments

@tis-cs
Copy link

tis-cs commented Jan 26, 2018

Hi,
ich habe versucht meine alte 2.25.15 zu updaten. Habe erst yahm auf die 1.9 gehoben und dann versucht die CCU zu updaten. Bekomme dann folgenden Fehler:

`pi@raspberrypi_dev:~ $ sudo yahm-lxc update
New CCU2 firmware: 2.31.25 available, update with 'yahm-lxc update' possible

Installed version: 2.25.15
Available version: 2.31.25

ERROR: Can not find any patches for 2.31.25, please call 'yahm-ctl update' and try again`

Wenn ich das update dann noch mal ausführe kommt wiederum das hier:

`pi@raspberrypi_dev:~ $ sudo yahm-ctl update
New CCU2 firmware: 2.31.25 available, update with 'yahm-lxc update' possible
Updating YAHM installation, for updatate CCU2 please use 'yahm-lxc update'
Fetching submodule share/tools/Network-Interfaces-Script
Fetching submodule share/tools/arm-board-detect
Fetching submodule share/tools/rpi-source
Already up-to-date.
Updating all YAHM modules
Betrete 'share/tools/Network-Interfaces-Script'
Von https://github.com/leonsio/Network-Interfaces-Script

  • branch master -> FETCH_HEAD
    Already up-to-date.
    Betrete 'share/tools/arm-board-detect'
    Von https://github.com/leonsio/arm-board-detect
  • branch master -> FETCH_HEAD
    Already up-to-date.
    Betrete 'share/tools/rpi-source'
    Von https://github.com/notro/rpi-source
  • branch master -> FETCH_HEAD
    Already up-to-date.
    Betrete 'share/tools/Network-Interfaces-Script'
    Betrete 'share/tools/arm-board-detect'
    Betrete 'share/tools/rpi-source'
    Updating CCU2-FW archive
    YAHM version 1.9 found`

Wie bekomme ich denn die Patches und wo müssen sie hin?
Viele Dank im Voraus.

@leonsio
Copy link
Owner

leonsio commented Jan 26, 2018

hi es scheinen bei dir einige Submodule zu fehlen für patches
was steht bei dir unter /opt/YAHM/share/firmware ?

falls der Ordner fehlt mach folgendes

cd /opt/YAHM/share
rm -rf firmware
git submodule add https://github.com/leonsio/YAHM-Firmware.git firmware

und so wie es aussieht fehlen auch die aktuellen Module

cd /opt/YAHM/share
rm -rf modules
git submodule add https://github.com/leonsio/YAHM-Module.git modules

Falls es zu Problemen kommt, poste den Output hier

@tis-cs
Copy link
Author

tis-cs commented Jan 26, 2018

Danke für die schnelle Antwort. Leider hat es nicht funktioniert. Oder habe ich noch einen Schritt vergessen?!

Bekomme das hier:

`
pi@raspberrypi_dev:~ $ cd /opt/YAHM/share/
pi@raspberrypi_dev:/opt/YAHM/share $ ls
firmware include.sh modules tools yahm_completion

pi@raspberrypi_dev:/opt/YAHM/share $ sudo rm -rf firmware
pi@raspberrypi_dev:/opt/YAHM/share $ git submodule add https://github.com/leonsio/YAHM-Firmware.git firmware
'share/firmware' ist bereits zum Commit vorgemerkt

pi@raspberrypi_dev:/opt/YAHM/share $ sudo rm -rf modules
pi@raspberrypi_dev:/opt/YAHM/share $ git submodule add https://github.com/leonsio/YAHM-Module.git firmware
'share/firmware' ist bereits zum Commit vorgemerkt

pi@raspberrypi_dev:/opt/YAHM/share $ sudo yahm-ctl update
New CCU2 firmware: 2.31.25 available, update with 'yahm-lxc update' possible
Updating YAHM installation, for updatate CCU2 please use 'yahm-lxc update'
Fetching submodule share/tools/Network-Interfaces-Script
Fetching submodule share/tools/arm-board-detect
remote: Counting objects: 3, done.
remote: Total 3 (delta 2), reused 3 (delta 2), pack-reused 0
Entpacke Objekte: 100% (3/3), Fertig.
Von https://github.com/leonsio/arm-board-detect
d13de04..e31d3a6 master -> origin/master
Fetching submodule share/tools/rpi-source
Already up-to-date.
Updating all YAHM modules
Betrete 'share/tools/Network-Interfaces-Script'
Von https://github.com/leonsio/Network-Interfaces-Script

  • branch master -> FETCH_HEAD
    Already up-to-date.
    Betrete 'share/tools/arm-board-detect'
    Von https://github.com/leonsio/arm-board-detect
  • branch master -> FETCH_HEAD
    Aktualisiere d13de04..e31d3a6
    Fast-forward
    armhwinfo.sh | 9 +++++++--
    1 file changed, 7 insertions(+), 2 deletions(-)
    Betrete 'share/tools/rpi-source'
    Von https://github.com/notro/rpi-source
  • branch master -> FETCH_HEAD
    Already up-to-date.
    Betrete 'share/tools/Network-Interfaces-Script'
    Betrete 'share/tools/arm-board-detect'
    Betrete 'share/tools/rpi-source'
    Updating CCU2-FW archive
    YAHM version 1.9 found

pi@raspberrypi_dev:/opt/YAHM/share $ sudo yahm-lxc update
New CCU2 firmware: 2.31.25 available, update with 'yahm-lxc update' possible

Installed version: 2.25.15
Available version: 2.31.25

ERROR: Can not find any patches for 2.31.25, please call 'yahm-ctl update' and try again
`

@leonsio
Copy link
Owner

leonsio commented Jan 26, 2018

kein Problem

  1. Möglichkeit
cd /opt/YAHM/share
rm -rf firmware
mkdir firmware && cd firmware
git submodule update --recursive --remote

Das gleiche dann mit Modulen
falls dies nicht geht, geht auch knallhart Methode ^^

wget -nv -O- https://raw.githubusercontent.com/leonsio/YAHM/master/yahm-init | sudo -E  bash -

es wird YAHM neu installiert. Die Bestehende Konfiguration und CCU Installation bleibt bestehen. (Achtung kein quickinstall, sondern nur den Link oben)

@tis-cs
Copy link
Author

tis-cs commented Jan 26, 2018

Da ich gestehen muss, dass ich nicht wusste, wie der Befehl "git submodule update --recursive --rem" für die modules aussehen muss und

"sudo git submodule modules --recursive --remote"
sowie
"sudo git submodule module --recursive --remote"

nicht ging, habe ich die knallharte Variante gewählt:

pi@raspberrypi_dev:/ $ sudo wget -nv -O- https://raw.githubusercontent.com/leonsio/YAHM/master/yahm-init | sudo -E bash - 2018-01-26 11:06:10 URL:https://raw.githubusercontent.com/leonsio/YAHM/master/yahm-init [6485/6485] -> "-" [1] Found ARM based distribution Updating sources (can take some time).. ..done Installing dependencies.. bash-completion is installed wget is installed dos2unix is installed python is installed git is installed lxc is installed liblzo2-dev is installed bridge-utils is installed python-lzo is installed patch is installed gzip is installed openssl is installed ..done Clean up YAHM directory (removing old versions).. ...done Downloading actual version from git repository.. ..done Including YAHM into PATH.. ..done Installing bash command completion.. done Please see 'yahm-lxc' for creating new container, 'yahm-network' for network configuration and 'yahm-modules' for additional modules

Danach lief alles erst mal:

`pi@raspberrypi_dev:/ $ sudo yahm-ctl info
New CCU2 firmware: 2.31.25 available, update with 'yahm-lxc update' possible
YAHM Version: 1.9
CCU2 Version: 2.25.15

LXC container information
Name: yahm
State: RUNNING
PID: 795
IP: 192.168.xxx.xxx
CPU use: 8.08 seconds
BlkIO use: 25.75 MiB
Memory use: 40.08 MiB
Link: vethK567Y8
TX bytes: 35.78 MiB
RX bytes: 49.81 MiB
Total bytes: 85.59 MiB`

Dann Update:

pi@raspberrypi_dev:/ $ sudo yahm-lxc update
New CCU2 firmware: 2.31.25 available, update with 'yahm-lxc update' possible

Installed version: 2.25.15
Available version: 2.31.25

Trying to create a config-backup from installed version 2.25.15, calling: 'yahm-backup data_backup' script
New CCU2 firmware: 2.31.25 available, update with 'yahm-lxc update' possible
Clean up TMP directory
Ask Rega to save the DOM
Creating Backup from /usr/local folder
Creating Homematic backup file
Clean up
STATUS: CCU2 Backup was successfully created: /tmp/YAHM/homematic-ccu2-1516961355.sbk
Backup old LXC config
Backup installed modules
INFO: Config backup file location: /tmp/YAHM_update/yahm/homematic-ccu2-1516961355.sbk
Creating full backup from installed version 2.25.15, calling: 'yahm-backup full_backup' script
New CCU2 firmware: 2.31.25 available, update with 'yahm-lxc update' possible
Trying to stop yahm container
Creating new backup from yahm version 2.25.15
tar: yahm/root/tmp/udev/control: Socket ignoriert
tar: yahm/root/tmp/log: Socket ignoriert
STATUS: Backup was successfully created: /tmp/YAHM/yahm_backup-2.25.15.tgz
Please start yahm container with 'sudo yahm-ctl -n yahm start' manually
INFO: Full backup file location: /tmp/YAHM_update/yahm/yahm_backup-2.25.15_20180126.tgz
Delete old YAHM Container version: 2.25.15
Backup virtual SD-Card
Deleting installed YAHM container: yahm version: 2.25.15 To cancel this operation type CTRL+C you have 5 seconds...
... too late ;)
Stopping LXC container
yahm is not running
Container can not be found or is not running
Deleting LXC container
Clean up
Create new YAHM Container version: 2.31.25
Creating new lxc container name: yahm, version 2.31.25
Downloading CCU Firmware
Extracting firmware
Extract ubi image
Writing to: /var/lib/lxc/yahm/root
Cleanup CCU2 source
Applying patch
Applying scripts
Creating SD card
Clean Up
Creating lxc config file
Container version 2.31.25 is created, please use 'yahm-ctl -n yahm start' to start and 'yahm-ctl -n yahm join' for console access
For network configuration see yahm-network script
Restoring old LXC config
Trying to restore old CCU2 backup, calling 'yahm-backup data_restore'
Clean up TMP directory
Extracting CCU2 backup
WARNING: /usr/local folder with all settings inside yahm container will be removed. You have 5 seconds to cancel this operation...
... to late ;)
Extracting Backup Data
STATUS: Backup version 2.25.15 was successfully restored into yahm container version 2.31.25
Please start yahm container with 'sudo yahm-ctl -n yahm start' manually
Starting yahm LXC container
Restoring old installed modules
Restoring hm-mod-rpi-pcb Module
Executing hm-mod-rpi-pcb module_install()
Found hardware: Raspberry Pi 2
Trying to disable serial console
Serial already disabled
Preparing devices inside LXC container
Creating device /dev/ttyAMA0...
Creating symlink /dev/mmd_bidcos...
Creating symlink /dev/ccu2-ic200...
Preparing modification rfd.conf...
[Interface 0] block found in rfd.conf checking it...
disabling new coprocessor initialization
Modification rfd.conf done.
HM-MOD-RPI-PCB was installed successfully, please restart YAHM to apply changes
Trying to start service
Synchronizing state for hm-mod-rpi-pcb.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d hm-mod-rpi-pcb defaults
Executing /usr/sbin/update-rc.d hm-mod-rpi-pcb enable
STATUS: Module hm-mod-rpi-pcb was successfully installed
STATUS: Update was successfully new version is: 2.31.25
STATUS: Old config backup file: /tmp/YAHM_update/yahm/homematic-ccu2-1516961355.sbk
STATUS: Old full lxc backup file: /tmp/YAHM_update/yahm/yahm_backup-2.25.15_20180126.tgz

Aber nun lässt sich der Container nicht mehr starten:

`pi@raspberrypi_dev:/ $ sudo yahm-ctl info
YAHM Version: 1.9
CCU2 Version: 2.31.25

LXC container information
Name: yahm
State: STOPPED
pi@raspberrypi_dev:/ $ sudo yahm-ctl start
Starting yahm LXC container
pi@raspberrypi_dev:/ $ sudo yahm-ctl info
YAHM Version: 1.9
CCU2 Version: 2.31.25

LXC container information
Name: yahm
State: STOPPED`

noch eine Idee außer den Container auch komplett neu aufzusetzen? :D

@leonsio
Copy link
Owner

leonsio commented Jan 26, 2018

keine Panik
ich nehme an ich weiß woran es liegt, aber zur Sicherheit bitte

geh ins /var/lib/lxc/yahm
da liegt eine Datei yahm.log

poste die letzten ~20 Zeilen, da steht bestimmt dass irgendwas nicht gefunden wurde
Wahrscheinlich irgendwas mit der SD-Karte

@tis-cs
Copy link
Author

tis-cs commented Jan 26, 2018

Ahhh! Dein Tip war Gold wert!
Ich hatte völlig verdrängt, dass ich in der Config noch Mounts drin hatte (USB Sticks für das Archiv sowie eine ramdisk).

Die Verzeichnisse innerhalb des Containers fehlten nur nach dem update.
Habe sie daher kurz auskommentiert, Container gestartet, Verzeichnisse angelegt und wieder rückwärts.... nun startet der Container auch wieder!

Perfekt, danke!

@leonsio leonsio closed this as completed Jan 26, 2018
@Loewenkoenig
Copy link

Hi!
Habe leider das gleiche Problem.

Installed version: 2.35.16
Available version: 2.45.7

ERROR: Can not find any patches for 2.45.7, please call 'yahm-ctl update' and try again

Wie finde ich den Fehler?

LG Peter

@leonsio
Copy link
Owner

leonsio commented May 3, 2019 via email

@Loewenkoenig
Copy link

Loewenkoenig commented May 3, 2019

Danke!
Weiters verwende ich auf meinem Raspberry das System von IP-Symcon. Im Forum wurde mir mitgeteilt, dass YAHM nicht weiter gewartet wird und der Umstieg auf piVCCU3 angeraten wird. Bin aber mit YAHM sehr zufrieden und alles läuft super.
Wie ist wirklich der Stand?

LG Peter

@Loewenkoenig
Copy link

Hallo!
Habe es jetzt nochmals mehrfach probiert. Leider ist das Update nicht möglich. Er findet die patches nicht. Da Symcon ein Update rausgebracht hat und mit meiner (alten) Version nicht mehr richtig funktioniert, bitte ich dich um Unterstützung, da Homematic somit auch nicht mehr funktioniert.
Danke, Peter

@leonsio
Copy link
Owner

leonsio commented May 3, 2019 via email

@Loewenkoenig
Copy link

Hi Leo,

reicht ein Backup über die Weboberfläche der CCU?

@Loewenkoenig
Copy link

Loewenkoenig commented May 3, 2019

Hi!
Habe das Update durchgeführt. Soweit ich sehen konnte, gab es keine Fehler, jedoch kann ich mich nicht mehr auf die Weboberfläche verbinden. Wenn ich sudo yahm-ctl info aufrufe, kommt folgende Meldung:

YAHM Version: 1.9
CCU2 Version: 2.45.7

LXC container information
Name: yahm
State: STOPPED

Dies bleibt unverändert, auch wenn ich mit sudo yahm-ctl start YAHM starte.

@leonsio
Copy link
Owner

leonsio commented May 4, 2019 via email

@Loewenkoenig
Copy link

Wo ist der Log gespeichert?

@leonsio
Copy link
Owner

leonsio commented May 4, 2019 via email

@Loewenkoenig
Copy link

Das habe ich im yahm.log gefunden:

 lxc-start 20190503222646.796 ERROR    lxc_conf - conf.c:run_buffer:405 - Script exited with status 127.
      lxc-start 20190503222646.796 ERROR    lxc_start - start.c:lxc_init:450 - Failed to run lxc.hook.pre-start for container "yahm".
      lxc-start 20190503222646.796 ERROR    lxc_start - start.c:__lxc_start:1302 - Failed to initialize container "yahm".
      lxc-start 20190503222651.814 ERROR    lxc_start_ui - tools/lxc_start.c:main:366 - The container failed to start.
      lxc-start 20190503222651.814 ERROR    lxc_start_ui - tools/lxc_start.c:main:368 - To get more details, run the container in foreground mode.
      lxc-start 20190503222651.814 ERROR    lxc_start_ui - tools/lxc_start.c:main:370 - Additional information can be obtained by setting the --logfile and --logpriority options.

@leonsio
Copy link
Owner

leonsio commented May 4, 2019 via email

@Loewenkoenig
Copy link

Da bin ich etwas überfordert. Habe folgende Ordner und Unterordner gesichert: /lxc/... + /yahm/...
Kann ich die bestehenden überschreiben bzw. welche Datei ist die relevante?

@leonsio
Copy link
Owner

leonsio commented May 4, 2019 via email

@Loewenkoenig
Copy link

DAS war der entscheidende Hinweis!! Jetzt funktioniert wieder alles!
Danke Leo 👍

@Loewenkoenig
Copy link

Loewenkoenig commented Jul 7, 2019

Hallo Leo!
Wollte gerade das aktuelle Update meiner CCU durchführen. Leider wieder das gleiche Problem wie letztes mal:

Installed version: 2.45.7
Available version: 2.47.12

ERROR: Can not find any patches for 2.47.12, please call 'yahm-ctl update' and try again

Gruß
Peter

@leonsio
Copy link
Owner

leonsio commented Jul 7, 2019 via email

@Loewenkoenig
Copy link

Loewenkoenig commented Jul 8, 2019 via email

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