[REGRESSION] 3.2 to 3.3 : don't start & infinite loop : Some .kar files are not installed yet. Delaying add-on installation by 15s

Hello,

Thank you for openhab !

Upgrading from 3.2 to 3.3 (after several restarts and cache cleaning), I face the following infinite loop preventing openhab starting :

18:50:16.350 [WARN ] [.core.karaf.internal.FeatureInstaller] - Could not determine addons folder, its content or the list of installed repositories!
18:50:16.351 [INFO ] [.core.karaf.internal.FeatureInstaller] - Some .kar files are not installed yet. Delaying add-on installation by 15s.

Reverting to 3.2 makes it work again.

Help ! :smiling_face:

Did you wait few minutes?

I believe a restart with a clean cache would solve the issue as well.

Yes, I’ve done more than 5 restarts, openhab-cli clean-cache and waited something like 5 minutes at every start trial. It doesn’t work :frowning:

Please also notice that when I revert openhab to 3.2, I also need to restore a backup, because all my things and services have vanished.

Hello @rappc : I see you deleted your post… did you by any chance solve the problem on your side ?

What looks strange in your case is this error: “Could not determine addons folder, its content or the list of installed repositories!”
In my case, at first startup, I have to wait but I don’t thing I got this error.

Yes it is strange :frowning: Any idea for me to try to understand then fix ?

I‘m pretty sure that using the search function either here or on GitHub will bring up the steps to fix that. I can‘t recall from memory, but I walked someone through that some time ago.

I have the same problem. Unfortunately, my search has brought nothing so far. All hints and tips bring nothing.

Does your /var/lib/openhab/etc/org.apache.felix.fileinstall-deploy.cfg look like this org.apache.felix.fileinstall-deploy.cfg?

What output do you see when you execute the following command on the Console:

config:list "(service.pid=org.apache.felix.fileinstall~deploy)"

1 Like

Better check config:list "(service.pid=org.apache.felix.fileinstall*)" as we have seen that ~deploy seems to be OS specific: Fix KAR installation check by J-N-K · Pull Request #2845 · openhab/openhab-core · GitHub. I guess we again an issue where there are different configurations and the first listed is an outdated one. This could also be the cause for the add-on jars not loading issue.

1 Like

Thank you for your attention.
Here are the output :

root# cat /var/lib/openhab/etc/org.apache.felix.fileinstall-deploy.cfg

Standard settings of Karaf

felix.fileinstall.start.level = 80
felix.fileinstall.log.level = 3

Custom openHAB configuration

felix.fileinstall.dir = ${openhab.home}/addons
felix.fileinstall.tmpdir = ${karaf.data}/tmp/bundles
felix.fileinstall.poll = 10000
felix.fileinstall.active.level = 90
felix.fileinstall.subdir.mode = skip

It misses

felix.fileinstall.filter = .*\.(jar|kar)

openhab> config:list "(service.pid=org.apache.felix.fileinstall*)"
----------------------------------------------------------------
Pid:            org.apache.felix.fileinstall.1001677b-911f-4d06-88b0-6dd566e76b23
FactoryPid:     org.apache.felix.fileinstall
BundleLocation: ?
Properties:
   felix.fileinstall.active.level = 90
   felix.fileinstall.dir = /usr/share/openhab/addons
   felix.fileinstall.filename = file:/var/lib/openhab/etc/org.apache.felix.fileinstall-deploy.cfg
   felix.fileinstall.log.level = 3
   felix.fileinstall.poll = 10000
   felix.fileinstall.start.level = 80
   felix.fileinstall.subdir.mode = skip
   felix.fileinstall.tmpdir = /var/lib/openhab/tmp/bundles
   service.factoryPid = org.apache.felix.fileinstall
   service.pid = org.apache.felix.fileinstall.1001677b-911f-4d06-88b0-6dd566e76b23
----------------------------------------------------------------
Pid:            org.apache.felix.fileinstall.1b253c7d-1033-4848-8708-c778e47abccc
FactoryPid:     org.apache.felix.fileinstall
BundleLocation: mvn:org.apache.felix/org.apache.felix.fileinstall/3.7.2
Properties:
   felix.fileinstall.active.level = 90
   felix.fileinstall.dir = /opt/openhab/addons
   felix.fileinstall.filename = file:/opt/openhab/userdata/etc/org.apache.felix.fileinstall-deploy.cfg
   felix.fileinstall.log.level = 3
   felix.fileinstall.poll = 10000
   felix.fileinstall.start.level = 80
   felix.fileinstall.subdir.mode = skip
   felix.fileinstall.tmpdir = /opt/openhab/userdata/tmp/bundles
   service.factoryPid = org.apache.felix.fileinstall
   service.pid = org.apache.felix.fileinstall.1b253c7d-1033-4848-8708-c778e47abccc

What precisely should I check ? /opt/openhab/addons does not exist but I’m pretty sure it never existed (I’m debian based)

root# ls -l /usr/share/openhab/addons
total 4
-rw-r--r-- 1 openhab openhab 70 Dec 20  2021 README
root# ls -l /opt/openhab/addons
ls: cannot access '/opt/openhab/addons': No such file or directory

If that directory does not exist, try config:delete org.apache.felix.fileinstall.1b253c7d-1033-4848-8708-c778e47abccc and restart. Did you restore the configuration from another system? That could explain why that configuration is there.

2 Likes

Thank you @J-N-K , it works :slight_smile:

I neved restored from anywhere else, I’m using the same server since openhab 2 and I updated to every 3.x

Please also note that I first deleted the configuration on 3.2, then installed (with debian aptitude) the 3.3 and the configuration for /opt/openhab/addons came back again. It is only after deleting it on 3.3 and restarting that it began to work.

I suggest a bugfix on the released 3.3 because I think I won’t be the only user impacted.

This can‘t be fixed for everyone. It‘s an issue with the local configuration and it‘s impossible to detect which configuration is correct. There have also been reports in the past with two invalid (and one valid) configurations.

1 Like

Unfortunately it doesn’t do anything for me. I still get the error.

openhab> config:list "(service.pid=org.apache.felix.fileinstall*)"
openhab>

I’ve restarted several times and also set up the Docker container again.

No file-install configuration is as bad as two configurations. Please check if there is any org.apache.felix.fileinstall*.cfg in /var/lib/openhab/etc and post the content if it is. If not, please create one with the content linked above by @wborn.

I missing the folder:

root@openhab:/openhab# ls -al /var/lib/
total 0
drwxr-xr-x 1 root root  48 Jun 27 01:50 .
drwxr-xr-x 1 root root  90 Jun 22 02:00 ..
drwxr-xr-x 1 root root  70 Jun 27 01:51 apt
drwxr-xr-x 1 root root 220 Jun 27 01:51 dpkg
drwxr-xr-x 1 root root   0 Mär 19 14:46 misc
drwxr-xr-x 1 root root 104 Jun 22 02:00 pam
drwxr-xr-x 1 root root  52 Jun 22 02:00 systemd
drwxr-xr-x 1 root root  32 Jun 27 01:50 ucf
root@openhab:/openhab# 

My OpenHab runs in a Docker. On a Synology NAS.
So far without any problems.

Now i have found a folder for config (i think so) and createt a file like @wborn :

root@openhab:/openhab/userdata/config/org/apache/felix/fileinstall# ls -al
total 4
drwxr-xr-x 1 openhab openhab  44 Jul  3 20:43 .
drwxr-xr-x 1 openhab openhab  42 Dez  2  2020 ..
-rwxrwxrwx 1 openhab openhab 431 Jul  3 20:44 fileinstall-deploy.cfg
root@openhab:/openhab/userdata/config/org/apache/felix/fileinstall#

Unfortunately that doesn’t help either. :frowning:

The filename is /openhab/userdata/etc/org.apache.felix.fileinstall-deploy.cfg

Ok…nor i got this:

openhab> config:list "(service.pid=org.apache.felix.fileinstall*)"                                           
----------------------------------------------------------------
Pid:            org.apache.felix.fileinstall~deploy
FactoryPid:     org.apache.felix.fileinstall
BundleLocation: ?
Properties:
   felix.fileinstall.active.level = 90
   felix.fileinstall.dir = /openhab/addons
   felix.fileinstall.filename = file:/openhab/userdata/etc/org.apache.felix.fileinstall-deploy.cfg
   felix.fileinstall.filter = .*\.(jar|kar)
   felix.fileinstall.log.level = 3
   felix.fileinstall.poll = 10000
   felix.fileinstall.start.level = 80
   felix.fileinstall.subdir.mode = skip
   felix.fileinstall.tmpdir = /openhab/userdata/tmp/bundles
   service.factoryPid = org.apache.felix.fileinstall
   service.pid = org.apache.felix.fileinstall~deploy
openhab>

But it still doesn’t work. The following entry still comes up in the openhab.log:

2022-07-03 23:03:00.065 [WARN ] [core.karaf.internal.FeatureInstaller] - Could not determine addons folder, its content or the list of installed repositories!
2022-07-03 23:03:00.066 [INFO ] [core.karaf.internal.FeatureInstaller] - Some .kar files are not installed yet. Delaying add-on installation by 15s.