OpenHab 2.5 docker does not load kar file in addons folder

I’m one of the person that tried but was unable to migrate from OH 2.5 to 3.x. I have a lot of items, a lot of rules that aparently just don’t work with the new OpenHab so I’m kind of stuck on the latest 2.5.12 version.
My solution to continue using what I have worked on was to migrate OH 2.5 from a classic installation to a docker version.
All went well, except that aparently the oh container does does not load the addons .kar file so that mqtt and other thigs would load and work.

The error I have is,

2022-10-07 15:48:43.750 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-action-mqtt, openhab-binding-mqtt1’

I logged into the running oh container, folders are mounted, I can see the files in, including kar file but that’s all.

My docker-compose file is,

    container_name: openhab
    image: "openhab/openhab:2.5.12"
    restart: always
        - /etc/localtime:/etc/localtime:ro
        - /etc/timezone:/etc/timezone:ro
        - ./openhab/addons:/openhab/addons
        - ./openhab/conf:/openhab/conf
        - ./openhab/userdata:/openhab/userdata
        CRYPTO_POLICY: "unlimited"
        OPENHAB_HTTP_PORT: "8080"
        OPENHAB_HTTPS_PORT: "8443"
        EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Berlin"
    network_mode: host

Any suggestions are more than welcome. Thanks.

All I can suggest is to verify that the permissions on the kar file are such that the openhab user inside the container has permission to read it.

You also might verify that the 1.x addons are actually inside that kar file. I can’t remember if the 1.x addons were in a separate kar file or not. A kar file is just a zip file so any tool you use to open .zip files will work.

I’m skeptical that you can’t migrate to OH 3. Do you just mean it’s more work than you are willing to spend? There were indeed a few minor changes to rules mostly to do with how to work with time (e.g. now). They could be a little tedious to track down.

And it is true that 1.x add-ons are no longer supported. But if the only 1.x add-ons you are using, based on these errors, are the MQTT add-ons, then there is nothing that those add-ons did that the current 3.x add-on can’t do.

Yes, they are. OP needs the ‘legacy adds-on’ kar.

1 Like


I don’t think is a permission problem. The addons folder that contain the .kar file has the same permission like the userdata and log folder. I also logged into the docker container and I can see the files. I even give 777 to that file (I know is not best practice, but I had to try). I got the same error.

Regarding OH3, I don’t know what exactly has changed between 2.x and 3.x versions but by copying the configuration files (sitemap items rules), they just don’t work. It is true that I did not spend much time debugging but for the moment I just would like to see this docker version run into the new OS (22.04LTS, current functioning version is on 16.04).

For OH 2.5.12 you need to add these KAR files to the /addons dir:


Thanks! That was the issue. It was missing the package called openhab-addons-legacy-2.5.12.kar.

1 Like

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