1.7.1 Web Interface Access

Hi guys,

I’m trying to access the web interface from a Win7 machine on my network @ 192.168.1.60. I have an Ubuntu server (no GUI) running openHAB 1.7.1 @ 192.168.1.38.

I use the URL http://192.168.1.38:8080/openhab.app?sitemap=demo, to try and open the web interface from my Win7 PC, but I get the following error:

HTTP ERROR 500

Problem accessing /openhab.app. Reason:

Sitemap 'demo' could not be found

Caused by:

org.openhab.ui.webapp.render.RenderException: Sitemap ‘demo’ could not be found
at org.openhab.ui.webapp.internal.servlet.WebAppServlet.service(WebAppServlet.java:114)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:350)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Thread.java:745)

I have renamed the file openhab_default.cfg to openhab.cfg as outlined in this Wiki article:

Is there some other obvious step i’m missing? I have not modified the .cfg file at this point

Thanks for any help you could give me

You haven’t installed a demo.sitemap. In the openhab sitemap folder (/etc/ooenhab/configurations/sitemaps) there needs to be a file of the name “demo.sitemap”.

Ok thank you. I’ll do some research on that. The instructions made it seem like there would be a default/demo page to view

I have the same error, server look running but when access by browser . It get Error: Access Error: 404 – Not Found
Cannot open document for: /openhab.app.
I follow step at http://www.openhab.org/getting-started/index.html but still can can not.

I search many times but can not find solution. Did I miss something?

Look in your openhab sitemaps folder, locate a file with xyz.sitemap, where xyz is either demo if you have installed the demo or a name you saved your sitemap file to.

Then point your browser to
http://your_ip_adress:8080/openhab.app?sitemap=xyz and then you should see your items and switches and whatever you have put in there …

Good luck.

Yes, exitst sitemaps folder and sitemap file but the same error.

Link: http://localhost:8080/openhab.app?sitemap=demo but Still Error:

  • Access Error: 404 – Not Found, Cannot open document for: /openhab.app
    Did you have any idea?
1 Like

Thanks for your assistance. I created a file called “default.sitemaps” but wasn’t able to access it.

I was having trouble finding the available demo sitemaps in the ‘distribution-demo-*.zip’ archive. I don’t know where that archive is or how to access it.

Most likely i’ll install the gnome desktop on top of my Ubuntu server so I can paste in the configuration from the demo.sitemap file

The demo is a separate download available here.

Are you sure that openHAB is running and it is running on port 8080? “Cannot open document for: /openhab.app” indicates that what ever web server you are hitting can’t even find openHAB’s webapp, let alone the sitemap.

Are there any errors in the openHAB logs?

Thanks rlkoshak, I’ve just fix the problem, port 8080 can not use by Java in my computer.

I finally figured out how to download this file via the command line with the wget “www.example.com”, command.

I now have the demo.sitemap file in my /etc/openhab/configurations/sitemaps folder. However i’m still getting a similar HTTP error.

I made sure the program was running using the /etc/init.d/openhab start, command. I can ping the Ubuntu server from my Windows machine as well. I’ve tried Chrome, IE, and Firefox.

It seems my Ubuntu server is not accepting incoming HTTP connections. Could I possibly need Apache to accomplish this?

No, openHAB comes with its own web server.

Try moving openHAB to a different port like @catcute35 did and see if that helps.

You also might try looking at your firewall to make sure it isn’t blocking that port on your server, though I would imagine that if that were the case you would just get a timed out error rather than 500 permission denied.

It looks like the issue has resolved after I came back to work on the server this evening. Stopping and starting openHAB using /etc/init.d/openhab stop/start command did the trick.

Thanks for all your help guys. I’m sure i’ll have more. I’m a Cisco networking guy that’s just diving into the Linux OS, and to programming in general, I appreciate your patience

I came across this thread - I am facing the same issue.
I get:

org.openhab.ui.webapp.render.RenderException: Sitemap ‘demo’ could not be found

Yet, that site exists, and it was working until I rebooted:

pi@raspberrypi:/usr/share/openhab $ ls -l /etc/openhab/configurations/sitemaps
total 8
-rw-r–r-- 1 openhab openhab 2737 Feb 14 01:55 demo.sitemap
-rw-r–r-- 1 openhab openhab 36 Feb 14 03:21 home.sitemap

This is the process:

pi@raspberrypi:/usr/share/openhab $ ps -ef|grep java
openhab 5805 5777 17 22:55 ? 00:01:03 /usr/bin/java -Dlogback.configurationFile=/etc/openhab/logback.xml -Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Djetty.port=8080 -Dopenhab.configfile=/etc/openhab/configurations/openhab.cfg -Dopenhab.configdir=/etc/openhab/configurations -Dopenhab.logdir=/var/log/openhab -Dsmarthome.userdata=/var/lib/openhab -Djetty.home=/usr/share/openhab -Djetty.port.ssl=8443 -Djetty.config=/etc/openhab/jetty -Djetty.logs=/var/log/openhab -Djetty.rundir=/usr/share/openhab -Dfelix.fileinstall.dir=/usr/share/openhab/addons -Dfelix.fileinstall.filter=.*.jar -Djava.library.path=/usr/share/openhab/lib -Djava.security.auth.login.config=/etc/openhab/login.conf -Dorg.quartz.properties=/etc/openhab/quartz.properties -Dequinox.ds.block_timeout=240000 -Dequinox.scr.waitTimeOnBlock=60000 -Dfelix.fileinstall.active.level=4 -Djava.awt.headless=true -jar /usr/share/openhab/server/plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar -configuration /var/lib/openhab/workspace -data /var/lib/openhab/workspace -console 5555

Again, everything worked until the reboot and now I’m not able to figure out from the logs what’s wrong.

Thank you.

Please provide the openhab.log (/var/log/openhab/openhab.log), if possible in debug mode …
How did you access the demo sitemap?
http://<your_ip>:8080/openhab.app?sitemap=demo ?

yes, and I figured out the problem looking at another thread- the .cfg file was missing.
I have no idea why it worked until the restart.
I did everything following this tutorial which is excellent.

Anyway, the issue can be closed now, but I would recommend a more explicit error message.
Thanks for your help!

sitemap demo label=“Main Menu”: This will be the first line in the sitemap file. It is mandatory and it states the name of your sitemap (demo) and the title of the main screen.