Update-Fehler

Raspi 3B
Installation: Openhabian
openHAB 2.4.0 Build # 1380
Aeotec Z-Stick Gen5

When updating with the config tool, the following error occurred:

dpkg: warning: openhab2: unable to stat config file ‘/var/lib/openhab2/etc/scripts/shell.colors.script’
(= ‘/var/lib/openhab2/etc/scripts/shell.colors.script’): Structure needs cleaning
dpkg: error processing archive /var/cache/apt/archives/openhab2_2.4.0~20181006154235-1_all.deb (–unpack):
unable to stat ‘./var/lib/openhab2/etc/scripts/shell.colors.script’ (which I was about to install): Structure needs cleaning
Errors were encountered while processing:
/var/cache/apt/archives/openhab2_2.4.0~20181006154235-1_all.deb
Updating FireMotD available updates count … 2018-10-08 19:51:44,749: FireMotD: Error: Template folder doesn’t exist. Upgrading from an older version? Please run make again or run the install function “FireMotD -I -v”.

E: Sub-process /usr/bin/dpkg returned an error code (1)
FAILED

What can I do?

This looks like file system corruption… Are you receiving any other strange errors?

What at the outputs of the following commands:

openhab-cli info
ls -l /var/lib/openhab2/etc
[08:36:28] openhabian@openHABianPi:~$ openhab-cli info

Version:     2.4.0-SNAPSHOT (#1380)

User:        openhab (Environment Variable Set)
User Groups: openhab tty dialout audio bluetooth gpio

Directories: Folder Name      | Path                        | User:Group
             -----------      | ----                        | ----------
             OPENHAB_HOME     | /usr/share/openhab2         | openhab:openhab
             OPENHAB_RUNTIME  | /usr/share/openhab2/runtime | openhab:openhab
             OPENHAB_USERDATA | /var/lib/openhab2           | openhab:openhabian
             OPENHAB_CONF     | /etc/openhab2               | openhab:openhabian
             OPENHAB_LOGDIR   | /var/log/openhab2           | openhab:openhabian

URLs:        http://192.168.178.28:8080
             https://192.168.178.28:8443

[10:52:59] openhabian@openHABianPi:~$ ls -l /var/lib/openhab2/etc
ls: cannot access '/var/lib/openhab2/etc/org.ops4j.pax.logging.cfg': Structure needs cleaning
ls: cannot access '/var/lib/openhab2/etc/jetty.xml': Structure needs cleaning
total 232
-rw-rw-r--  1 openhab openhab     1035 Oct  4 00:12 all.policy
-rw-rw-r--  1 openhab openhab     1067 Oct  4 00:12 branding.properties
-rw-rw-r--  1 openhab openhab     1067 Oct  4 00:12 branding-ssh.properties
-rw-rw-r--  1 openhab openhab       10 Oct  4 00:12 com.eclipsesource.jaxrs.connector.cfg
-rw-rw-r--  1 openhab openhabian    59 Sep 29 10:06 com.eclipsesource.jaxrs.swagger.config.cfg
-rw-rw-r--  1 openhab openhab    12924 Oct  4 09:01 config.properties
-rw-rw-r--  1 openhab openhab      318 Oct  4 00:12 custom.properties
-rw-rw-r--  1 openhab openhab      459 Oct  4 00:12 custom.system.properties
-rw-rw-r--  1 openhab openhab     1144 Oct  4 00:12 distribution.info
-rw-rw-r--  1 openhab openhabian  4616 May 28 10:33 equinox-debug.properties
-rw-rw-r--  1 openhab openhab     1704 Oct  1 17:16 host.key
-rw-rw-r--  1 openhab openhabian   252 May 28 10:33 java.util.logging.properties
-?????????? ? ?       ?              ?            ? jetty.xml
-rw-rw-r--  1 openhab openhab     1664 Oct  4 00:12 jmx.acl.org.apache.karaf.bundle.cfg
-rw-rw-r--  1 openhab openhab     3316 Oct  4 00:12 jmx.acl.org.apache.karaf.config.cfg
-rw-rw-r--  1 openhab openhab    20084 Oct  4 00:12 jre.properties
-rw-rw-r--  1 openhab openhabian  2091 May 28 10:33 keys.properties
-rw-rw-r--  1 openhab openhabian   604 Sep 29 10:06 keystore
-rw-rw-r--  1 openhab openhab      493 Oct  4 00:12 org.apache.felix.eventadmin.impl.EventAdmin.cfg
-rw-rw-r--  1 openhab openhab      371 Oct  4 00:12 org.apache.felix.fileinstall-deploy.cfg
-rw-rw-r--  1 openhab openhab     1737 Oct  4 00:12 org.apache.karaf.command.acl.bundle.cfg
-rw-rw-r--  1 openhab openhab     2025 Oct  4 00:12 org.apache.karaf.command.acl.config.cfg
-rw-rw-r--  1 openhab openhab     1156 Oct  4 00:12 org.apache.karaf.command.acl.feature.cfg
-rw-rw-r--  1 openhab openhab     1154 Oct  4 00:12 org.apache.karaf.command.acl.jaas.cfg
-rw-rw-r--  1 openhab openhab     1219 Oct  4 00:12 org.apache.karaf.command.acl.kar.cfg
-rw-rw-r--  1 openhab openhab     1376 Oct  4 00:12 org.apache.karaf.command.acl.scope_bundle.cfg
-rw-rw-r--  1 openhab openhab     1118 Oct  4 00:12 org.apache.karaf.command.acl.shell.cfg
-rw-rw-r--  1 openhab openhab     1384 Oct  4 00:12 org.apache.karaf.command.acl.system.cfg
-rw-rw-r--  1 openhab openhab     2705 Oct  4 00:12 org.apache.karaf.features.cfg
-rw-rw-r--  1 openhab openhab     3724 Oct  4 00:12 org.apache.karaf.features.repos.cfg
-rw-rw-r--  1 openhab openhab      834 Oct  4 00:12 org.apache.karaf.jaas.cfg
-rw-rw-r--  1 openhab openhab      532 Oct  4 00:12 org.apache.karaf.kar.cfg
-rw-rw-r--  1 openhab openhab      758 Oct  4 00:12 org.apache.karaf.log.cfg
-rw-rw-r--  1 openhab openhab     4151 Oct  4 00:12 org.apache.karaf.shell.cfg
-rw-rw-r--  1 openhab openhabian    33 Sep 29 10:06 org.eclipse.smarthome.audio.cfg
-rw-rw-r--  1 openhab openhabian    22 Sep 29 10:06 org.eclipse.smarthome.voice.cfg
-rw-rw-r--  1 openhab openhab       65 Oct  4 00:12 org.jupnp.cfg
-?????????? ? ?       ?              ?            ? org.ops4j.pax.logging.cfg
-rw-rw-r--  1 openhab openhab     4446 Oct  4 00:12 org.ops4j.pax.url.mvn.cfg
-rw-rw-r--  1 openhab openhabian  1346 Sep 29 10:06 org.ops4j.pax.web.cfg
-rw-rw-r--  1 openhab openhab        0 Oct  4 00:12 overrides.properties
-rw-rw-r--  1 openhab openhab     9105 Oct  4 00:12 profile.cfg
drwxrwxr-x+ 2 openhab openhabian  4096 Oct  4 09:01 scripts
-rw-rw-r--  1 openhab openhabian  1848 May 28 10:33 shell.init.script
-rw-rw-r--  1 openhab openhab      814 Oct  4 00:12 startup.properties
-rw-rw-r--  1 openhab openhab     5316 Oct  4 00:12 system.properties
-rw-rw-r--  1 openhab openhabian  1525 Sep 29 10:06 users.properties
-rw-rw-r--  1 openhab openhab      447 Oct  4 00:12 version.properties
[10:53:44] openhabian@openHABianPi:~$ 
``

As I thought, there is file system corruption in these folders. Are you running off an SD card, or a USB hard-drive?

On a SD-Card

Remains only a new installation?

Now I do not understand anything anymore.

I removed the SD and plugged it in again. After a reboot, I was able to access the terminal:
Now: Update openHAB 2.4.0 Build # 1386.

With ls -l / var / lib / openhab2 / etc there are no more errors.

The password “openhabian” works in the terminal.
In the browser now comes a login window and there is a password required, but that of the terminal does not work.

There was an update in 1386 that enabled authentication by default…
https://community.openhab.org/t/after-snapshot-update-login-to-paperui-required-user-password/53457

Thanks, after the downgrade it works again.

Good to hear you got it working! Now that you have, it might be a good time to create a backup of openHAB to save off of the SD Card.

I thought so too.
I have already saved my items, sitemaps and rules.
Is there an optimal backup solution?

openhab-cli backup <filename> will create a backup of all openHAB configuration files which can be restored with openhab-cli restore <filename.zip>. For a backup of more than just this, openHABian comes with Amanda.