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

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)

Steve,

This does not appear to be a permissions issue. The sitemap should load. Getting a blank sitemap with the default I think (not certain) is possibly if you have none of that information is your items file,

But when you copied the demo information into your home.sitemap, did you copy the entire thing and then just change the name to home?

Just an FYI,Sitemaps and items info are CAP sensitive. Can you confirm your sitemap is starting/using a lower s. ie, Sitemap will not work, and needs to be sitemap.

Hi Paul

case and syntax are all OK, but to double check I have copied a working items and sitemap to the new server.

What i have noticed is whatever changes i make to paperui, i.e active sitemap (classic & Basic), there is no difference when i open the browser. Classic always shows a blank sitemap and Basic always says there are no sitemaps available.

it appears that maybe openhab isnt looking in the directories where i am changing the files. i am changing /etc/openhab2/sitemaps and /etc/openhab2/items