OH3 dont run anymore after update

Hello,

I have trouble to get oh3 running again an i get the below message when i check status of oh3

xxx@xxx:~$ sudo systemctl status openhab.service
● openhab.service - openHAB - empowering the smart home
** Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)**
** Active: activating (auto-restart) (Result: exit-code) since Sat 2022-07-02 09:41:40 CEST; 3s ago**
** Docs: https://www.openhab.org/docs/**
** https://community.openhab.org**
** Process: 15554 ExecStart=/usr/share/openhab/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=200/CHDIR)**
** Main PID: 15554 (code=exited, status=200/CHDIR)**
** CPU: 8ms**

I try to find any solution on the forum, and i did not found any answer

i also removed al the bindings in addons.config whit no result

restart, reboot, update, upgrade have no result
sudo apt --reinstall install openhab give no solution.

hardware : **
** cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="Debian -- User Support"
BUG_REPORT_URL="https://bugs.debian.org/"

OH3 version : 3.4.0 S6980-1

some one any idea what the next steps are, or remove everything and start from scrats ?

Is there any message in /var/log/openhab/openhab.log that may give a hint ?
Does

sudo journalctl -u openhab.service

give any hint ?

According to the message

code=exited, status=200/CHDIR

it sounds like a directory is not found.

Openhab.log :

2022-06-26 11:45:19.304 [ERROR] [Events.Framework ] - FrameworkEvent ERROR
java.io.IOException: Exception in opening zip file: /var/lib/openhab/cache/org.eclipse.osgi/89/0/bundleFile
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:360) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.doOpen(ZipBundleFile.java:51) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.open(CloseableBundleFile.java:135) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.lockOpen(CloseableBundleFile.java:77) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.storage.bundlefile.CloseableBundleFile.getEntry(CloseableBundleFile.java:274) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.classpath.ClasspathEntry.findEntry(ClasspathEntry.java:195) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:621) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:607) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:587) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:566) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:335) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:397) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:488) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168) ~[org.eclipse.osgi-3.17.200.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
at javax.activation.CommandMap.setDefaultCommandMap(CommandMap.java:87) ~[org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:1.2.1_3]
at org.apache.servicemix.specs.activation.Activator.stop(Activator.java:52) ~[org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:1.2.1_3]
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:870) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) ~[org.eclipse.osgi-3.17.200.jar:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:862) [org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1046) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:376) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.container.Module.doStop(Module.java:660) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.container.Module.stop(Module.java:521) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1888) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1763) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.17.200.jar:?]
Caused by: java.nio.file.AccessDeniedException: /var/lib/openhab/cache/org.eclipse.osgi/89/0/bundleFile
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]
at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149) ~[?:?]
at sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) ~[?:?]
at java.nio.file.Files.readAttributes(Files.java:1764) ~[?:?]
at java.util.zip.ZipFile$Source.get(ZipFile.java:1259) ~[?:?]
at java.util.zip.ZipFile$CleanableResource.(ZipFile.java:733) ~[?:?]
at java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:850) ~[?:?]
at java.util.zip.ZipFile.(ZipFile.java:248) ~[?:?]
at java.util.zip.ZipFile.(ZipFile.java:177) ~[?:?]
at java.util.zip.ZipFile.(ZipFile.java:191) ~[?:?]
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:342) ~[org.eclipse.osgi-3.17.200.jar:?]
… 31 more

sudo journalctl -u openhab.service :

jun 27 09:40:04 dvdhab systemd[12972]: openhab.service: Changing to the requested working directory failed: Permission denied
jun 27 09:40:04 dvdhab systemd[12972]: openhab.service: Failed at step CHDIR spawning /usr/share/openhab/runtime/bin/karaf: Permission denied
jun 27 09:40:04 dvdhab systemd[1]: openhab.service: Main process exited, code=exited, status=200/CHDIR
jun 27 09:40:04 dvdhab systemd[1]: openhab.service: Failed with result ‘exit-code’.
jun 27 09:40:10 dvdhab systemd[1]: openhab.service: Scheduled restart job, restart counter is at 8580.
jun 27 09:40:10 dvdhab systemd[1]: Stopped openHAB - empowering the smart home.
jun 27 09:40:10 dvdhab systemd[1]: Started openHAB - empowering the smart home.
jun 27 09:40:10 dvdhab systemd[12973]: openhab.service: Changing to the requested working directory failed: Permission denied
jun 27 09:40:10 dvdhab systemd[12973]: openhab.service: Failed at step CHDIR spawning /usr/share/openhab/runtime/bin/karaf: Permission denied
jun 27 09:40:10 dvdhab systemd[1]: openhab.service: Main process exited, code=exited, status=200/CHDIR
jun 27 09:40:10 dvdhab systemd[1]: openhab.service: Failed with result ‘exit-code’.
jun 27 09:40:15 dvdhab systemd[1]: openhab.service: Scheduled restart job, restart counter is at 8581.
jun 27 09:40:15 dvdhab systemd[1]: Stopped openHAB - empowering the smart home.
jun 27 09:40:15 dvdhab systemd[1]: Started openHAB - empowering the smart home.
jun 27 09:40:15 dvdhab systemd[12974]: openhab.service: Changing to the requested working directory failed: Permission denied
jun 27 09:40:15 dvdhab systemd[12974]: openhab.service: Failed at step CHDIR spawning /usr/share/openhab/runtime/bin/karaf: Permission denied
jun 27 09:40:15 dvdhab systemd[1]: openhab.service: Main process exited, code=exited, status=200/CHDIR
jun 27 09:40:15 dvdhab systemd[1]: openhab.service: Failed with result ‘exit-code’.
jun 27 09:40:20 dvdhab systemd[1]: openhab.service: Scheduled restart job, restart counter is at 8582.

the folder seems the problem

/var/log/openhab$ cd /usr/share/openhab/runtime/bin/karaf
-bash: cd: /usr/share/openhab/runtime/bin/karaf: Is geen map
ronny@dvdhab:/var/log/openhab$ cd /usr/share/openhab/runtime/bin/
ronny@dvdhab:/usr/share/openhab/runtime/bin$ ls
backup client common.psm1 inc instance karaf oh_dir_layout restore setenv shell start status stop update update.lst userdata_sysfiles.lst
ronny@dvdhab:/usr/share/openhab/runtime/bin$ cd karaf
-bash: cd: karaf: Is geen map
ronny@dvdhab:/usr/share/openhab/runtime/bin$

seems that karaf is a file and not a folder anymore

/usr/share/openhab/runtime/bin$ ls -l
totaal 128
-rwxr-xr-x 1 openhab openhab 7545 2 jul 06:50 backup
-rwxr-xr-x 1 openhab openhab 4232 2 jul 06:50 client
-rwxr-xr-x 1 openhab openhab 6418 2 jul 06:50 common.psm1
-rwxr-xr-x 1 openhab openhab 9469 2 jul 06:50 inc
-rwxr-xr-x 1 openhab openhab 4242 2 jul 06:50 instance
-rwxr-xr-x 1 openhab openhab 13151 2 jul 06:50 karaf
-rwxr-xr-x 1 openhab openhab 874 2 jul 06:50 oh_dir_layout
-rwxr-xr-x 1 openhab openhab 8084 2 jul 06:50 restore
-rwxr-xr-x 1 openhab openhab 5331 2 jul 06:50 setenv
-rwxr-xr-x 1 openhab openhab 4182 2 jul 06:50 shell
-rwxr-xr-x 1 openhab openhab 2808 2 jul 06:50 start
-rwxr-xr-x 1 openhab openhab 2656 2 jul 06:50 status
-rwxr-xr-x 1 openhab openhab 2659 2 jul 06:50 stop
-rwxr-xr-x 1 openhab openhab 259 2 jul 06:50 update
-rw-r–r-- 1 openhab openhab 18315 2 jul 06:50 update.lst
-rw-r–r-- 1 openhab openhab 958 2 jul 06:50 userdata_sysfiles.lst

I have remove openhab and install it from scratch

and now it is
openhab.service - openHAB - empowering the smart home
Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-07-02 16:27:46 CEST; 1min 18s ago
Docs: Introduction | openHAB
https://community.openhab.org
Main PID: 23000 (java)
Tasks: 133 (limit: 4305)
Memory: 383.1M
CPU: 3min 18.671s
CGroup: /system.slice/openhab.service
└─23000 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.userdata=/var/lib/openhab -Dopenhab.logdir=/var/log/openhab -Dfelix>

jul 02 16:27:46 dvdhab systemd[1]: Started openHAB - empowering the smart home.

and now it is working again, start from scratch again :frowning:

no. Has been a shell script and still needs to be one.

I think the related WorkingDirectory is:

grep Work /usr/lib/systemd/system/openhab.service

which results in :

WorkingDirectory=/usr/share/openhab

You have enough free diskspace ?

the diskspace is :
udev 897M 0 897M 0% /dev
tmpfs 183M 2,2M 181M 2% /run
/dev/sda2 54G 8,3G 43G 17% /
tmpfs 915M 0 915M 0% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
/dev/sda1 511M 2,8M 509M 1% /boot/efi
tmpfs 183M 56K 183M 1% /run/user/1000

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.