openhab / openhab-syno-spk

openHAB Synology SPK Install Package
Eclipse Public License 2.0
161 stars 42 forks source link

install problem with 2.1.0.008-DSM6 #87

Closed ms777 closed 7 years ago

ms777 commented 7 years ago

this may also be related to DSM 6.1.3-15152 Update 3, but I am not sure.

I tried to install 2.2.0.006-SNAPSHOT-WIP, but got errors like

2017-08-17 22:03:22.305 [WARN ] [org.jline] - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
2017-08-17 22:03:22.502 [WARN ] [org.jline] - Unable to retrieve infocmp for type vt102
java.io.IOException: Cannot run program "infocmp": error=2, No such file or directory
(snip)
Caused by: java.io.IOException: error=2, No such file or directory
(snip)

Then I tried to go back to 2.1.0.008-DSM6 (prior version was .0004). Now it does not recognize my conf and addons file on /volume1/public/openHAB2 anymore:

My @appstore directory looks good after installation of the spk:

admin@DiskStation:/volume1/@appstore/openHAB2$ ls -al
total 56
drwxr-xr-x  4 openhab2 root   4096 Aug 20 12:44 .
drwxrwxrwx 22 root     root   4096 Aug 20 12:43 ..
lrwxrwxrwx  1 openhab2 root     31 Aug 20 12:44 addons -> /volume1/public/openHAB2/addons
lrwxrwxrwx  1 openhab2 root     29 Aug 20 12:44 conf -> /volume1/public/openHAB2/conf
-rwxrwxrwx  1 openhab2 users 11232 Jun 27 23:14 LICENSE.TXT
drwxrwxrwx  6 openhab2 users  4096 Aug 20 12:44 runtime
-rwxrwxrwx  1 openhab2 users   121 Jan 20  2017 start.bat
-rwxrwxrwx  1 openhab2 users    72 Jan 20  2017 start_debug.bat
-rwxr-xr-x  1 openhab2 root   1132 Nov 17  2013 start_debug_runtime.sh
-rwxrwxrwx  1 openhab2 users    73 Jan 20  2017 start_debug.sh
-rwxr-xr-x  1 openhab2 root    930 Nov 17  2013 start_runtime.sh
-rwxrwxrwx  1 openhab2 users   116 Jan 20  2017 start.sh
-rwxr-xr-x  1 openhab2 root     65 Nov 17  2013 stop_runtime.sh
drwxrwxrwx  5 openhab2 users  4096 Aug 20 12:44 userdata

but the conf and addons folders are not recognized:

admin@DiskStation:/volume1/@appstore/openHAB2/userdata/logs$ cat openhab.log
2017-08-20 12:46:18.308 [WARN ] [org.apache.felix.fileinstall        ] - /volume1/@appstore/openHAB2/addons does not exist, please create it.
2017-08-20 12:46:18.356 [WARN ] [org.apache.felix.fileinstall        ] - Root path does not exist: /volume1/@appstore/openHAB2/addons
2017-08-20 12:46:53.966 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.178.79:8080
2017-08-20 12:46:53.972 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.178.79:8443
2017-08-20 12:47:02.670 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'things' does not exist in '/volume1/@appstore/openHAB2/conf'. Please check your configuration settings!
2017-08-20 12:47:02.674 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'scripts' does not exist in '/volume1/@appstore/openHAB2/conf'. Please check your configuration settings!
2017-08-20 12:47:02.678 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'items' does not exist in '/volume1/@appstore/openHAB2/conf'. Please check your configuration settings!
2017-08-20 12:47:02.681 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'persistence' does not exist in '/volume1/@appstore/openHAB2/conf'. Please check your configuration settings!
2017-08-20 12:47:02.684 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'sitemaps' does not exist in '/volume1/@appstore/openHAB2/conf'. Please check your configuration settings!
2017-08-20 12:47:02.686 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'rules' does not exist in '/volume1/@appstore/openHAB2/conf'. Please check your configuration settings!
2017-08-20 12:47:07.440 [WARN ] [thome.ui.internal.chart.ChartServlet] - Illegal argument in chart: No Persistence service found.

As a workaround, I mount --bind my directories. This works well

SchoppAx commented 7 years ago

Hi @ms777

there is a problem on DSM 6.1.3-15152 Update 3 to start openhab as background process. We are looking for a fix...

ms777 commented 7 years ago

Thanks :-)

For the 2.1.0.008-DSM6 issue I found a workaround:

1. Install the package, but do not check the box "run after installation"
2. From the Synology UI, give the openhab2 user full access to /volume1/public/openHAB2
3. sudo chown -hR openhab2:users /volume1/@appstore/openHAB2
4. sudo chown -hR openhab2:users /volume1/public/openHAB2
5. Then run the package

Edit Sep 9: Added "sudo"

sylvainpaquet commented 7 years ago

Hello I'm sorry my English is not very good. I also try to install openHab2 on a synology. My installation is fine but impossible to connect on the web page of openhab, it is as if he could not find the page I tried on another synology model as well as on XPenology I have the same thing I came across this topic, I am at version 6 with the same DSM I tried to put the right folders but I have an error message chown -hR openhab2: users /volume1/@appstore /openHAB2 failed with for return code 1 and for message 'operation not permitted' and this for all files

Regards,

aurelio1 commented 7 years ago

Hello Any progress on this problem?

sylvainpaquet commented 7 years ago

Hello

I wanted to start the file start.sh in manual and I have this as error message

Launching the openHAB runtime ...
Unable to update instance pid: / volume1 / @ appstore / openHAB2 / userdata / tmp / instance s / instance.properties (Permission denied)
java.lang.RuntimeException: /volume1/@appstore/openHAB2/userdata/logs/openhab.lo g (Permission denied)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInter nal (BootstrapLogManager.java:102)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlersInte rnal (BootstrapLogManager.java:137)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlers (Boo tstrapLogManager.java:70)
        at org.apache.karaf.main.util.BootstrapLogManager.configureLogger (Bootst rapLogManager.java:75)
        at org.apache.karaf.main.Main.launch (Main.java:244)
        at org.apache.karaf.main.Main.main (Main.java:178)
Caused by: java.io.FileNotFoundException: / volume1 / @ appstore / openHAB2 / userdata / l ogs / openhab.log (Permission denied)
        at java.io.FileOutputStream.open0 (Native Method)
        at java.io.FileOutputStream.open (FileOutputStream.java:270)
        at java.io.FileOutputStream. <init> (FileOutputStream.java:213)
        at org.apache.karaf.main.util.BootstrapLogManager $ SimpleFileHandler.open (BootstrapLogManager.java:193)
        at org.apache.karaf.main.util.BootstrapLogManager $ SimpleFileHandler. <ini t> (BootstrapLogManager.java:182)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInter nal (BootstrapLogManager.java:100)
        ... more
SESSION 2017-09-04 17: 27: 08.668 -------------------------------------- ---------
eclipse.buildId = unknown
java.version = 1.8.0_144
java.vendor = Oracle Corporation
BootLoader constants: OS = linux, ARCH = arm, WS = gtk, NL = en_US

! ENTRY org.eclipse.osgi 4 0 2017-09-04 17: 27: 08.675
MESSAGE Error reading configuration: / volume1 / @ appstore / openHAB2 / userdata / cache /org.eclipse.osgi/.manager/.fileTableLock (Permission denied)
! STACK 0
java.io.FileNotFoundException: /volume1/@appstore/openHAB2/userdata/cache/org.ec lipse.osgi / .manager / .fileTableLock (Permission denied)
        at java.io.RandomAccessFile.open0 (Native Method)
        at java.io.RandomAccessFile.open (RandomAccessFile.java:316)
        at java.io.RandomAccessFile. <init> (RandomAccessFile.java:243)
        at org.eclipse.osgi.internal.location.Locker_JavaNio.lock (Locker_JavaNio .java: 36)
        at org.eclipse.osgi.storagemanager.StorageManager.lock (StorageManager.ja goes: 388)
        at org.eclipse.osgi.storagemanager.StorageManager.open (StorageManager.ja goes: 701)
        at org.eclipse.osgi.storage.Storage.getChildStorageManager (Storage.java: 1792)
        at org.eclipse.osgi.storage.Storage.getInfoInputStream (Storage.java:1809)
        at org.eclipse.osgi.storage.Storage. <init> (Storage.java:129)
        at org.eclipse.osgi.storage.Storage.createStorage (Storage.java:88)
        at org.eclipse.osgi.internal.framework.EquinoxContainer. <init> (EquinoxCo ntainer.java:66)
        at org.eclipse.osgi.launch.Equinox. <init> (Equinox.java:31)
        at org.eclipse.osgi.launch.EquinoxFactory.newFramework (EquinoxFactory.ja goes: 24)
        at org.apache.karaf.main.Main.launch (Main.java:256)
        at org.apache.karaf.main.Main.main (Main.java:178)
sylvainpaquet commented 7 years ago

I move a little I managed to start the start.sh manually by doing this: sudo su - we type the password admin and there we have the rights to launch the file and in my console I see well openhab by cons in my browser when I run http: // xxxxxxxx: 8080 it always tells me the connection failed

SchoppAx commented 7 years ago

Hi guys,

please checkout these pre-release: https://github.com/SchoppAx/openhab-syno-spk/releases/tag/2.2.0.007-SNAPSHOT

If there are errors, please post the logfiles from /var/log/openhab-install.log or /var/log/openhab-start-stop.log

sylvainpaquet commented 7 years ago

I just tested the 2.2.0.007 first thing weird when wanting to pass the version it made me a reset of my NAS I was forced to redo my nas i installed java 8 ok by cons I am failing to install openhab with this message:

failed to install "openHAB2". /var/packages/java8/target/ejdk1.8.0_144/linux_arm_sflt/jre/bin/java

Antic5 commented 7 years ago

Just tested on Synology 213+ PPC running DSM 6.1.3-15152 Update 3 and it worked perfectly.

igbor commented 7 years ago

I installed 2.2.0.007-SNAPSHOT on the DS1815 + INTEL Atom C2538 DSM 6.1.3-15152 Update 3 All works well.

sylvainpaquet commented 7 years ago

do you know if you can install openhab on a ds213 air or ds112j because I managed to install java and openhab on it but I do not connect on my browser Thank you

SchoppAx commented 7 years ago

Hi @sylvainpaquet,

can you post your openHAB2-install.log located at /var/log/? If openHAB is installed and you have problems by starting it, please post your openHAB2-start-stop.log.

To access openHAB via browser you have to enter http://your-ip:8080/start/index

sylvainpaquet commented 7 years ago

I reinstalled the version 2.2.0.006

to access openhab I do the link well but I have in return "the connection failed" by cons I do not have the file openHAB2-start-stop.log openHAB2-install.zip for

igbor commented 7 years ago

you need to run commands as root: sudo chown -hR openhab2:users /volume1/_appstore/openHAB2 sudo chown -hR openhab2:users /volume1/public/openHAB2 as he wrote about this ms777 in his post

SchoppAx commented 7 years ago

Mhh, ok.

  1. Please backup your conf files if they are located at the home dir.
  2. Uninstall all openHAB components.
  3. Be sure, that the @tmp folder has no openHAB files (/yourvolume/@tmp)
  4. Check if you have installed the Java8 package from the package center
  5. Download the 2.2.0.007-SNAPSHOT
  6. Install openHAB
  7. Check the install dir (/yourvolume/@appstore/openHAB2) 7.1 does the file start.sh exists 7.2 does the folder userdata and ui exists 7.3 does the folder runtime/bin exists 7.3.1 does the files karaf and stop exists
  8. Check if openHAB is running (can take up to 10 minutes)
  9. Restore your conf files
sylvainpaquet commented 7 years ago

I just noticed that during the installation the user openhab was not created alor that with the previous version the user was created I think I will redo my nas and tried to redo the installation I'll keep you posted tonight

sylvainpaquet commented 7 years ago

by cons I tried with xpenology avec modèle DS3615xc with the installation of version 2.2.0.007 and then I realize that the folder / volume1 / public / openhab2 is empty

aurelio1 commented 7 years ago

I tried with 2.2.0.007 on a DS115j, unsuccessfully, even without starting automatically.

SchoppAx commented 7 years ago

Hi @aurelio1,

is the openhab2 user created? Can you manually start openHAB2?

If exists please post the openHAB2-start_stop.log from /var/log/

aurelio1 commented 7 years ago

@SchoppAx Since DSM doesn't install it, I can't start it manually. The openhab2 has not been created. There is no openHAB2 related logfile in /var/log, and not even an openHAB2 entry in synopkg.log.

aurelio1 commented 7 years ago

Argh. Sorry about that, I was checking the logfile of my other Synology. Coming back with the "right" logfile info this evening.

sylvainpaquet commented 7 years ago

here I remade my total enter as a new configuration I installed java and when I want to install openhab2 version 2.2.0.007 I had this opportunity to install /var/packages/java8/target/ejdk1.8.0_144/linux_arm_sflt/jre/bin/java

sylvainpaquet commented 7 years ago

I put the last log file of my installation with version 2.2.0.006 by cons in the public folder / openHAB2 this one is empty in (/ yourvolume / @ appstore / openHAB2) 1) the file start.sh exite 2) the userdata folder and what is there 3) I have a runtime but bin file 4) no karaf file and stop and always paeil when I launch my browser

sylvainpaquet commented 7 years ago

with the file openHAB2-install.zip

aurelio1 commented 7 years ago

@SchoppAx I checked openHAB-install.log and found the following lines:

S T A R T - o p e n H A B S P K

2017-09-04:12:52:17

Set instance variables... primary: /volume1 share: /volume1/public oh: /volume1/public/openHAB2 backup: -backup-201709 done Start preinst... ERROR: Java is not installed or not properly configured. Download and install as described on http://wp.me/pVshC-z5 The Synology provided Java may not work with OpenHAB.

Actually I am using the Synology provided Java. I did use the other Loadletter Java on another (older) system but it crashed frequently so it would not be wise to change the Synology Java for the Loadletter Java.

SchoppAx commented 7 years ago

@aurelio1 please checkout the documentation: http://docs.openhab.org/installation/synology.html The DS115j is an Marvell Armada 370 system.

@sylvainpaquet the package says: The User Home service is not enabled. Please enable this feature in the User control panel in DSM. Control panel -> User -> Advanced -> Check "Enable user home service"

aurelio1 commented 7 years ago

@SchoppAx. Thank you. The DS115j is a Marvell Armada 370 system, but the restriction is only valid for the Armada 370/XP, not the "regular" Armada 370. Now I tried to uninstall Java8 and reinstall it, and now openHAB2 installs perfectly :-) It seems that for some reason Java8 was not installed properly. However I noticed that in older openHAB2 versions when the installation failed the error message that appeared in the log file was shown in a window during the installation. In the latest version that doesn't happen anymore.

sylvainpaquet commented 7 years ago

Hello; I have activated the user home service " by cons I reinstalled openHAB and I realize that in the public folder / openhab2 this one is empty every time otherwise I started the start.sh manually this one starts well by cons always with the browser problem "the connection failed"

sylvainpaquet commented 7 years ago

I will attach you the journal of openhab2 erreur journal openhab2

SchoppAx commented 7 years ago

OK, this error will occur with the current version 2.2.0.006-SNAPSHOT on DSM 6.1.3. (See the first post of this issue #87)

So please use the pre-release 2.2.0.007-SNAPSHOT ;-)

zuernc commented 7 years ago

on DSM 6.1.3-15152 Update 3:

@SchoppAx Thank you so much ;)

sylvainpaquet commented 7 years ago

by wanting to install version 2.2.0.007 same same problem and version 2.2.0.006 similar failed connection

sylvainpaquet commented 7 years ago

Hello to you guys do you have a solution to my problem

Regards,

SchoppAx commented 7 years ago

@sylvainpaquet i can't reconstruct your failure. 😕

So after you have enabled your user home service please look again inside the log files. Version 2.2.0.007 has now a deeper logging as 2.2.0.006. I hope there is a hint about your problem.

sylvainpaquet commented 7 years ago

Hello sorry i can not install version 2.2.0.007 because every time I do an update over version 2.2.0.006 it makes me reset my synology or if I try to do an installation directly with the 2.2.0.007 I get message /var/packages/java8/target/ejdk1.8.0_144/linux_arm_sflt/jre/bin/java so I can not give you the log

thank you,