Password failure accessing Karaf in Docker Installation on Synology

I am currently setting up Openhab 3.4 in a Docker container running on a synology NAS. Installation of Livisi Binding worked and things were detected. So far so good. The logging feature on port 9001 however is not working an i learned from a post in this community that this feature can be activated via the Karaf console with „sudo openhab-conf“.

I open the docker container on the Synology NAS and acess the Terminal.

The standard password should be “habopen”, which does not work. I read here in the community that there are three different types of users. But the user “openhab” seems to be the correct one in the Karaf console, so password “habopen” should word.

I thought i might be in another type of console which is probably not Karaf so i checked the logs and found:

This looks like the Karaf console. I read here that the pasword for the console is stored in /openhab/userdata/etc/users.properties. I found the encrypted version of the password:

openhab = {CRYPT}4F61A0FD056BC0FD8231899EC4D9F9CA06AF0DEC895B2A3B0773F6FBC1C99776{CRYPT},g:admingroup_g_:admingroup = group,admin,manager,viewer,systembundles

In
[Post 29064]
it is described that the code seems to be the cyphered “habopen” string.

I tried several other default passwords which i found on the web but none of them worked. I can acess the web UI on port 8080 with my password but this password does also not work in the console as expected.

Next i tried to acess the Karaf konsole via ssh, which did not work either. Regardless the user i was trying, acess to console was not permitted. See the two examples:

admin@MyNAS:~$ docker exec -ti openhab-openhab1 /openhab/runtime/bin/client

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/openhab-openhab1/json”: dial unix /var/run/docker.sock: connect: permission denied

openhab@MyNAS:~$ docker exec -ti openhab-openhab1 /openhab/runtime/bin/client

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/openhab-openhab1/json”: dial unix /var/run/docker.sock: connect: permission denied

Finally I checked uid and guid of the user openhab.

admin@MyNAS:~$ id openhab
uid=1033(openhab) gid=100(users) groups=100(users),101(administrators),65537(dialout),1023(http),65536(openhab)

Both are the same as they are in the docker container:

Can anyone help me what to do next? I have not found further hints to try. Many thanks for your efforts.

There are a couple of things that I did in order to access Karaf on Synology/Docker. For a one time set up edit \conf\services\runtime.cfg, un-comment the “org.apache.karaf.shell:sshHost = 0.0.0.0” line, and restart the OpenHAB container.

Then to access Karaf SSH into the Synology on port 8101. That will take you to the user name/password for Karaf.

HTH
Jim

Hi Jim,

many thanks for this. I can now log into Karaf directly from my PC without using the terminal which is provided by the Synology NAS. I get the password request and the default password is working. The Karaf screen appears, which means my default password should be ok.

However the command “sudo openhab-config” triggers the su password request. I enter the default password again and it still keeps saying:

“Error executing command: login failed”

Kind regards

Tha’t’s not a Karaf command but a Linux shell command (to run a script with root privilege). I’m not aware of a Karaf command that can configure this.
BTW, are you sure it’s not `openhabian-config’? That only works if you do an OpenHABIAN installation, not on your Synology Docker installation.

I know this is not solving your problem, but only a hint to start looking elsewhere for solutions. For instance: is port 9001 open to begin with?

I’m not sure what you are attempting to do with logging. Once logged in I use the following command to change zwave logging from INFO to DEBUG.

log:set DEBUG org.openhab.binding.zwave

HTH
Jim

Thanks for your answer. I read that the command to configure openhab would be “sudo openhab-config”. In that post it was stated that a text based menu would be displayed, by which you can activate the output of the log file to port 9001. I am not sure whether this is true.

I am trying to code my first automations in openhab (coming from Livisi who discontinued their service) but none of them work. I thought i might be using incorrect triggers and wanted to see which output is written to the logfile when i press for example a button on a switch which i have integrated as a thing in my model.

I could see that the log file is accessable on the NAS and shows these messages on the network, but it is very cumbersome to always download the log file from the NAS and then view it with an editor.

I tried to access the logview on port 9001 with the browser but this page is not existing. I therefore thought the relevant feature within the openhab container might not be activated. This is why i wanted to start a manual configuration with “sudo openhab-config”.

So the login problem i mentioned in my post is the first thing i wanted to resolve. Maybe I am on the wrong track here, am I?

That is only true when running openHABian. You are not running openHABian. You are running openHAB alone in a Docker container. All you get is openHAB. If you want any of the other stuff that openHABian sets up and configures (e.g. Frontrail serving up openHAB’s logs on port 9001) you have to set that stuff up yourself.

openHAB does not come with a log viewer. That’s a third party service that openHABian sets up. If you are not running openHABian you have to set that up yourself.

There is no such command.

There is an openhabian-config command but that only exists on an openHABian install and nowhere else.

There is an openhab-cli command but that only exists on a Linux apt/yum installed instance of OH and nowhere else.

You are running in Docker so have access to none of these tools. All you have is openHAB.

1 Like

Assuming the log file you are attempting to view is in a DSM Share folder you don’t need to download the file to view it in Windows. Open File Explorer and enter the IP address of the NAS. A list of the shares will be displayed. Right click on the share containing the log file and select Map Network Drive. You can then use that drive letter to view the log file.

SMB can be activated in DSM (Control Panel > File Services > SMB).

1 Like

Many thanks for your detailed answer. I was not aware of the difference between openhab and openhabian.

Thanks a lot. I will try this as a workaround.