j-a-n / raspberrymatic-addon-rmupdate

Addon for RaspberryMatic to (auto) update system
GNU General Public License v3.0
34 stars 10 forks source link

An error occurred: Internal Server Error #3

Closed chrostek closed 7 years ago

chrostek commented 7 years ago

the update fails on my rpi3. log output:

Downloading firmware from https://github.com/jens-maus/RaspberryMatic/releases/download/2.27.8.20170615/RaspberryMatic-2.27.8.20170615-rpi3.zip.

     0K ........ ........ ........ ........ 15% 2.24M 75s
 32768K ........ ........ ........ ........ 31% 2.77M 55s
 65536K ........ ........ ........ ........ 47% 3.35M 39s
 98304K ........ ........ ........ ........ 63% 2.95M 26s
131072K ........ ........ ........ ........ 79% 2.93M 15s
163840K ........ ........ ........ ........ 95% 3.97M 3s
196608K ........ .                         100% 3.67M=68s
Download completed.
Extracting firmware /usr/local/addons/rmupdate/var/img/RaspberryMatic-2.27.8.20170615-rpi3.zip.
Checking size of filesystems.
Mounting parition 1 of image /usr/local/addons/rmupdate/var/img/RaspberryMatic-2.27.8.20170615.img.
Remounting filesystem /boot (rw).
Current filesystem (1) size: 104632320, new filesystem used bytes: 7630848.
Mounting parition 2 of image /usr/local/addons/rmupdate/var/img/RaspberryMatic-2.27.8.20170615.img.
Remounting filesystem / (rw).
Current filesystem (2) size: 1881929728, new filesystem used bytes: 349147136.
Sizes of filesystems checked successfully.
Updating filesystems.
Updating partition 1.
Mounting parition 1 of image /usr/local/addons/rmupdate/var/img/RaspberryMatic-2.27.8.20170615.img.
Remounting filesystem /boot (rw).
Rsyncing filesystem of partition 1.
Rsync finished.
Updating partition 2.
Mounting parition 2 of image /usr/local/addons/rmupdate/var/img/RaspberryMatic-2.27.8.20170615.img.
Remounting filesystem / (rw).
Rsyncing filesystem of partition 2.

seems fine, but after this the red error "An error occurred: Internal Server Error" appears above the log. tried two times - same result.

on the second run i watched /var/log/messages and found this problems:

Jun 16 17:50:20 homematic-raspi user.err kernel: [  681.387610] EXT4-fs (loop7): couldn't mount as ext3 due to feature incompatibilities
Jun 16 17:50:20 homematic-raspi user.err kernel: [  681.387978] EXT4-fs (loop7): couldn't mount as ext2 due to feature incompatibilities
Jun 16 17:50:20 homematic-raspi user.info kernel: [  681.391593] EXT4-fs (loop7): mounted filesystem with ordered data mode. Opts: (null)
Jun 16 17:50:20 homematic-raspi user.info kernel: [  681.605470] EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro,data=ordered
Jun 16 17:50:21 homematic-raspi user.err kernel: [  683.078250] EXT4-fs (loop7): couldn't mount as ext3 due to feature incompatibilities
Jun 16 17:50:21 homematic-raspi user.err kernel: [  683.078900] EXT4-fs (loop7): couldn't mount as ext2 due to feature incompatibilities
Jun 16 17:50:21 homematic-raspi user.info kernel: [  683.082041] EXT4-fs (loop7): mounted filesystem with ordered data mode. Opts: (null)
Jun 16 17:50:21 homematic-raspi user.info kernel: [  683.101912] EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro,data=ordered
j-a-n commented 7 years ago

This should be a warning only. The filesystem seem to be mounted successfully ("mounted filesystem with ordered data mode"). The problem seems to be elsewhere. I added a dryrun option in version 0.9.5 which is calling rsync with --dry-run for testing.

chrostek commented 7 years ago

sorry, does not work

http:///addons/rmupdate/rest.cgi?/start_install_firmware

returns with checked "Perform a trial run with no changes made"

{"error":"called \"rmupdate::install_firmware_version\" with too many arguments"}

j-a-n commented 7 years ago

The Problem is a change of libc version which errors out with "Kernel too old". I am working on a permanent fix.

chrostek commented 7 years ago

that seems logic as i got this error for every command via ssh after your updater started (ssh also does not work, but it works if you login before the update)

j-a-n commented 7 years ago

I completely switched the update process to a more stable approach. Now, there are two separate root partitions (partitions 2 and 3). The system always installs the update to the root partition which is currently not in use. After that the cmdline.txt is updated to boot from the other root partition. This major change requires to do a completely fresh install with the new adjusted image.

chrostek commented 7 years ago

Thanks. that seems to be the best way to do an update. unfortunately i cannot download the adjusted image. it shows only git lfs informations:

version https://git-lfs.github.com/spec/v1 oid sha256:ba180b6ce0cfc7d847a9bd9468ebd97ca5291bf09304b635fffa960d33c759e2 size 212433523

j-a-n commented 7 years ago

Git LFS quota. Images now available via dropbox.

chrostek commented 7 years ago

works wonderful. thanks for your great work!

j-a-n commented 7 years ago

Thanks for your feedback!