New install of OH2 and Ubuntu - cannot get a sitemap displayed

Ive eventually managed to install OH2 on UBUNTU, PaperUI is working but i cannot see a site map on basicUI

My sitemap is

itemap home label="Home Automation"
{
        Frame label="Smart House"
        {
        Switch item=GarageLEDS
        }
}

My Items file is

Switch GarageLEDS  "Garage LEDs" <lights> [ "Switchable" ]      {mqtt=">[broker:cmnd/sonoff-18/power:command:ON:1],>[broker:cmnd/sonoff-18/power:command:OFF:0],<[broker:st$

I have configured the default sitemap.
Capture1

I am now really stuck on this

What folder did you put home.sitemap?

What do you see in the logs when you save home.sitemap?

Is it just a typo in the posting or does your sitemap really start with “itemap”? It should start with “sitemap” and if it doesn’t you should see errors in openhab.log.

I instelled from one of the tutorials, but it didnt have the best instructions, had to work out installing JAVA myself and one or two other things
sitemap is in etc/openhab2/sitemaps

steve@ubuntu2:/etc/openhab2/sitemaps$ ls
_default  home.sitemap  readme.txt

There is nothing really in the logs

OPENHAB.LOG

 at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1233) ~[?:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$0(FeaturesServiceImpl.java:1132) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2017-11-18 18:20:29.636 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-11-18 18:20:29.688 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-11-18 18:20:29.885 [WARN ] [org.apache.karaf.main.Main          ] - Lock lost. Setting startlevel to 1
2017-11-18 18:20:31.844 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI

SYSLOG

Nov 21 10:47:35 ubuntu2 systemd[1]: Started Session 52 of user steve.
Nov 21 10:47:35 ubuntu2 systemd[34590]: Reached target Paths.
Nov 21 10:47:35 ubuntu2 systemd[34590]: Reached target Sockets.
Nov 21 10:47:35 ubuntu2 systemd[34590]: Reached target Timers.
Nov 21 10:47:35 ubuntu2 systemd[34590]: Reached target Basic System.
Nov 21 10:47:35 ubuntu2 systemd[34590]: Reached target Default.
Nov 21 10:47:35 ubuntu2 systemd[34590]: Startup finished in 12ms.
Nov 21 10:47:35 ubuntu2 systemd[1]: Started User Manager for UID 1000.
Nov 21 10:50:43 ubuntu2 systemd[1]: Started Session 53 of user steve.
Nov 21 10:52:03 ubuntu2 systemd[1]: Started Session 54 of user steve.
Nov 21 10:55:20 ubuntu2 systemd[1]: Started Session 55 of user steve.
Nov 21 10:56:21 ubuntu2 sudo: pam_ecryptfs: pam_sm_authenticate: /home/steve is already mounted

However when I do the same exercise on my Raspberry pi3, then there is a “refresh” entry in the openhab.log file

2017-11-21 09:27:24.697 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 5219486 failed: null
2017-11-21 09:27:24.702 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 5219592 failed: null
2017-11-21 09:27:24.707 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 5219597 failed: null
2017-11-21 10:58:34.273 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.sitemap'

What tutorial?

There are links to instructions for installing the Java Runtime Environments in the OH Installation Instructions.

So did you use apt-get to install?

Can you confirm your actually visiting the correct web address url?

http://pathtomyinstall:8080/classicui/app?sitemap=home

Also. As you get setup with Ubuntu, I find it best and easiest to setup Samba, and then you can access your OH2 files from your windows or other machine and use any text editor or the recommended VS Code program to create your sitemaps, item files, etc.

Did you follow the install docs found here entirely? I run OH2 on Ubuntu Server 16 and things run quite well.

http://docs.openhab.org/installation/linux.html

I used this and followed the APT suystem
http://docs.openhab.org/installation/linux.html

yes I used apt-get

That line (substituted with my IP adress returns the following error

HTTP ERROR 500

Problem accessing /classicui/app. Reason:

    Server Error
Caused by:

javax.servlet.ServletException: Sitemap 'home' could not be found
	at org.eclipse.smarthome.ui.classic.internal.servlet.WebAppServlet.service(WebAppServlet.java:169)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.eclipse.smarthome.ui.classic.render.RenderException: Sitemap 'home' could not be found
	at org.eclipse.smarthome.ui.classic.internal.servlet.WebAppServlet.service(WebAppServlet.java:130)
	... 21 more
Caused by:

org.eclipse.smarthome.ui.classic.render.RenderException: Sitemap 'home' could not be found
	at org.eclipse.smarthome.ui.classic.internal.servlet.WebAppServlet.service(WebAppServlet.java:130)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:748)

However http://192.168.0.40:8080/start/index returns the Openhab screen where I can sellect PaperUI , Habadmin or Hab Panel successfully.

ClassicUI returns the error and BasicUI returns the "No Sitemaps available " screen

Try this:

Also, just confirming here a copy/paste error on your part, but your sitemap code above shows this:

itemap home label="Home Automation"

And is missing the s

sitemap home label="Home Automation"

Is there a preferred way to stop and restart rather than rebooting. I’ve seen different threads with different commands to stop/start OH

I don’t think I am far off as I can access paperui habpanal and habadmin.

I have noticed as well that sitemaps and item config do not refresh when exiting exiting where by they do update if I edit them on the Pi3

Yes
It was a copy paste error which doesn’t help when you are asking for
remote help

It largely depends on which version of Ubuntu you are running. If it is 16 or 17 (maybe 15 or 14 as well, I don’t remember when Ubuntu switched to systemd)

sudo systemctl stop openhab2    # Stops the service
sudo systemctl start openhab2   # Starts the service
sudo systemctl restart openhab2 # Restarts the service
sudo systemctl status openhab2  # Shows the most recent output and running status of the service

16.04 LTS I will try them all thanks

Would you know the directory for the cache folder (ive found /var/cache but there are a few directories in that. Also any idea where the tmp directory is?

Thanks
Steve

Im wondering if it is a permissions issue ?

i found the tmp and cache

Can you put your BasicUI settings back to using the _default sitemap and see if it loads? I noticed when you showed that directory it showed without the sitemap extension.

steve@ubuntu2:/etc/openhab2/sitemaps$ ls
_default  home.sitemap  readme.txt

We’ll get this worked out. Perhaps since your just getting started on the system as well, to do a reinstall of OH2 to ensure no issues.

Also, do you know what version of Java your running? it should be something like the below

ptmuldoon@OpenHab2:/etc/openhab2/sitemaps$ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

yes just starting out on this ubuntu.

This DOESNT produce an error but doesnt show any items

http://192.168.0.40:8080/classicui/app?sitemap=_default

If i put back to _default I get a blank site map for classic and basic (no errors)

What does the default site map contain? You can replace what that file has with the demo sitemap if you would like. I think its the same, but the demo sitemap info can be found here.

https://github.com/openhab/openhab-distro/blob/master/features/distro-resources/src/main/resources/sitemaps/demo.sitemap

I still get the same. I copied the demo sitemap to both _default & home. _default loads a blank sitemap and home, loads a page saying that there are no sitemaps available, I am no linux expert but im wondering if it is a permissions problem. Unfortunately i have to disappear for a bit i have a course to go on (Speed Awareness I’ve been a naughty boy)