[support] Bungy's docker repository


Recommended Posts

 

Problem accessing /openhab.app. Reason:

 

    Sitemap 'default' could not be found

 

 

Having a problem with the OpenHAB install. It installs fine but it can't find either the default or demo config or indeed any other that I try. It seems that there are perhaps two configuration methods? .cfg files and a folder (configurations) of more detailed files which are now at release 18. Anyway, I continually get the sitemap not found message so I'm obviously not putting it in the right place? I loaded an addons.cfg file which is being found and Openhab seems to be running, just the Web UI won't work? I have had a similar problem trying to run Openhab under OS X and there I'm sure the problem is ports and difficulty in start/stopping Openhab. That's easy with the Docker.

 

Anyone else got this working and can help to get me started?

Link to comment

All,

 

I'm sorry for the delayed response for the openhab docker issues. I believe the issue is a bad link to the demo configuration files and I'm working to fix it now. I will hopefully have a new build tonight or tomorrow that will fix the problem. Stay tuned!

Link to comment

If you are trying to just run the openhab demo, you should not link the volumes. Linking the volumes overwrites the openhab configuration with the configuration that you are providing.

 

If you would like to run the demo, remove the volume mounts, run the docker, and browse to http://hostname:port/openhab.app?sitemap=demo

 

If you would like to begin starting your own configuration, set up the volume mounts as you have and extract the demo configuration into your configuration directory. The demo configuration provides a good basis for getting started.

 

For me, the configuration directory is located at /mnt/user/appdata/openhab/config. Inside this directory there should be an items, persistence, rules, scripts, and sitemaps directories. There should also be the openhab.cfg and addons.cfg file.

 

Let me know if you have any problems, I hope this clears things up. I'm working on a more elegant way of handling this specifically having the docker set up the demo in your provided volume mount path if configuration is not already found.

Link to comment

I have changed around the initial boot of the docker so that it now copies the demo configuration files into the volume mapped config directory if configuration files do not already exist. I hope this helps with the initial configuration. New build should be finished shortly.

 

Next up: Include all the addons so you no longer have to configure the addons.cfg file

Link to comment

Done! Next up: Include habmin by default.

 

HABmin is now included by default and there is no need for the addons.cfg file. You can all remove the volume mounts and addons.cfg. The build should be done in a few minutes.

 

Are there any other feature requests out there?

Link to comment

Hi,

 

I thought I had this cracked but 'user' error has defeated me again. I re-installed this latest version and then realised I should have created a proper place for the openhab config directory. So I did this and then got a load of errors about python and something being full. The error didn't say what was full. Anyway this has now killed the installation and I get this error whenever I try to create a new docker image?

 

root@localhost:# /usr/bin/docker run -d --name="openhab" --net="bridge" -e TZ="Europe/Berlin" -p 8080:8080/tcp -v "/mnt/user/apps/Docker/apps/openhab/config/":"/etc/openhab":rw jshridha/openhab

 

Error response from daemon: EOF

 

Has anyone any clues as to what might have been full abd what I should do to fix it. Could it be the Docker.img file isn't big enough at 10GB as I also have three other docker apps (Plex, Emby and Uboquity) installed and running?

Link to comment

It looks like you ran out of space in your docker.

 

I did find one issue with automatically installing all addons. The souliss addon has a bug where it continuously throws up errors if there is no configuration specified in the openhab.cfg file. The problem with this is the log file continues to grow, which may be why your docker.img filled up. The quick fix for now is to delete (or move) this addon from the addons directory inside your openhab config directory. Simply renaming the extension from .jar to .bak won't work (I already tried it).

 

You can check the size of your log files by executing this command:

docker exec -it openhab ls -l /opt/openhab/logs

 

Let me know if recreating your docker.img and removing the souliss addon helps.

Link to comment

Thanks for the quick reply. You're almost certainly right. Selecting the advanced docker view shows up four old docker image files but the remove command doesn't remove them. So I researched increasing the docker.img file size and came across "btrfs filesystem resize +20G /docker.img" but trying that gave an error that basically states the wrong action will happen if the command is completed.

 

<trfs filesystem resize +20G /mntimgche/apps/Docker/docker.          s          ERROR: resize works on mounted filesystems and accepts only

directories as argument. Passing file containing a btrfs image

would resize the underlying filesystem instead of the image.

 

So I think I will have to delete the image and start again. That will have to wait as Plex is currently being used and I have to schedule downtime!

Link to comment

Thanks for the quick reply. You're almost certainly right. Selecting the advanced docker view shows up four old docker image files but the remove command doesn't remove them. So I researched increasing the docker.img file size and came across "btrfs filesystem resize +20G /docker.img" but trying that gave an error that basically states the wrong action will happen if the command is completed.

 

<trfs filesystem resize +20G /mntimgche/apps/Docker/docker.          s          ERROR: resize works on mounted filesystems and accepts only

directories as argument. Passing file containing a btrfs image

would resize the underlying filesystem instead of the image.

 

So I think I will have to delete the image and start again. That will have to wait as Plex is currently being used and I have to schedule downtime!

You can resize in the GUI.
Link to comment

You're definitely better off recreating the image. When you run out of space, the data that should get written to the docker image gets trimmed and leaves you with corruptions. Recreating the docker img only takes as long as it takes to re-download the images from docker hub. If you haven't recreated your docker.img before, you'll be very happy with how little setup you now need to do and with how quickly you'll be back up and running.

Link to comment

OK recreated the Docker.img and can now run openhab without log errors as below. Note I deliberately restarted the openhab because the UI is back to complaining there is no config file.

"NO openhab.cfg CONFIGURATION FOUND"

 

Anyway if I type http://192.168.1.103:8080/openhab.app?sitemap=demo then it works. Any chance this could be corrected in the script that starts the wenGUI or is this something I need to do somewhere.

 

Anyways now I can have a play!

 

Thanks. And deleting the img file and re-creating it is a breeze as all previous settings are retained!

 

 

Link to comment

OK recreated the Docker.img and can now run openhab without log errors as below. Note I deliberately restarted the openhab because the UI is back to complaining there is no config file.

"NO openhab.cfg CONFIGURATION FOUND"

 

Anyway if I type http://192.168.1.103:8080/openhab.app?sitemap=demo then it works. Any chance this could be corrected in the script that starts the wenGUI or is this something I need to do somewhere.

 

Anyways now I can have a play!

 

Thanks. And deleting the img file and re-creating it is a breeze as all previous settings are retained!

 

The configuration not found message should only appear on the first boot if you're not mounting your own configuration. It'll then populate the configuration location with the openhab.cfg file, so you shouldn't see this message on your second boot.

 

In order to avoid having to type in the sitemap=demo in the url, rename demo.sitemap to default.sitemap. This file will be found in the sitemap directory of your volume mount. Things were set up this way so you can simultaneously run the demo and your own configuration.

 

Let me know how it goes and if you need any more help!

Link to comment

Thank you for the updates, Bungy. I've been able to get openhab running, and I'm probably going to buy way too much hardware now that I've got such a neat platform running.

 

I've got an issue specific to openhab being run in a docker container though;  I can't get Wake-On-Lan to work.

 

According to ifconfig, docker is running on:

 

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 172.17.42.1  netmask 255.255.0.0  broadcast 0.0.0.0

 

The box I'm trying to hit is at 192.168.2.102 with a netmask of 255.255.255.0.

 

I'm not 100% sure whether or not the failure is because of the docker's IP or the netmask. Is there some way I can choose the IP and netmask of the docker container?

Link to comment

Hmm I got wake on Lan working at some point but no longer use it. I remember it being a big pain but I'll try to dig up the configuration details.

 

That would be greatly appreciated, and thank you for your work on this docker.

 

This is a snippet from my Office.items file that works for WOL:

Switch	Desktop	"Desktop"	(Office)		{ wol="192.168.1.100#FF:FF:FF:FF:FF:FF"}

 

You'll have to change the ip address and the mac address to match the computer you're trying to wake up.

Link to comment

Bungy Bhai-

 

I am desperate need of getting Owncloud on My SQL up and working.. I have a version up and running on a standalone linux box, but not I cannot get your version up and running.. I cannot even get to the web UI ?

 

I can get Gjfhardim's version on SQL lite up and running but that won't scale for my needs.

 

 

I am not working on the local machine, so everytime I try to go to the IP/Port I get nothing ? even though it looks like its up and running ?

 

I have checked your docker page but I can't even see where I am getting lost ?

 

 

-Ashok-

Link to comment

Hmm I got wake on Lan working at some point but no longer use it. I remember it being a big pain but I'll try to dig up the configuration details.

 

That would be greatly appreciated, and thank you for your work on this docker.

 

This is a snippet from my Office.items file that works for WOL:

Switch	Desktop	"Desktop"	(Office)		{ wol="192.168.1.100#FF:FF:FF:FF:FF:FF"}

 

You'll have to change the ip address and the mac address to match the computer you're trying to wake up.

 

 

Thank you! I mistakenly was starting to think that the first three parts of my openhab instance's IP address had to match that of the computer I was trying to wake, but it turns out that this was incorrect.

 

Thanks again!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.