openhab / openhab-syno-spk

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

Package won't start #127

Closed elcodeo closed 6 years ago

elcodeo commented 6 years ago

Hi guys, I've updated to 2.3.0.001-SNAPSHOT. The update process was successful but the package won't start. When I try to start via the GUI the status still remains on "stopped".

bildschirmfoto 2018-03-30 um 19 50 56

The start-stop log says it's running:

bildschirmfoto 2018-03-30 um 19 52 22

I also tried to start it via command line. There I get various messages but the state is running. Anyway the openHAB Web Interface is not reachable.

bildschirmfoto 2018-03-30 um 19 53 47

Can anyone help me?

cniweb commented 6 years ago

Hi @elcodeo can you look in your /var/log/openhab/openhab.log file?

elcodeo commented 6 years ago

Hi @cniweb unfortunately there is no /var/log/openhab/openhab.log file. I only have openHAB-install.log and openHAB-start_stop.log under /var/log/

cniweb commented 6 years ago

Sorry, I mean: /volume1/@appstore/openhab/userdata/logs/openhab.log

andysei commented 6 years ago

@elcodeo I probably had the same issue. Check openhab.log for address in use error message. Do you have CardDAV server installed? It uses 8443 as the https port - the same as openHAB.

The issue is tricky to find: in my case openHAB was "half alive, half dead"... netstat -an|grep 8080 showed the port was in use. ps axu|grep java showed the java process of openHAB.

I uninstalled CardDAV and rebooted the NAS. Startup of openHAB took very long. openhab.log shows the "dashboard started" message, but in package center the openHAB service is reported as "stopped", but accessing http://:8080 works.

cniweb commented 6 years ago

Yes, netstat -an can help!

elcodeo commented 6 years ago

@cniweb /volume1/@appstore/openhab/userdata/logs/openhab.log is empty.

@andysei I have nothing else installed which uses port 8080 or 8443.

slydlake commented 6 years ago

I had the same problem. My solution was this:

For me this worked

cniweb commented 6 years ago

@elcodeo Yes, this is the best solution at the moment.

Polooo2 commented 6 years ago

Same issue here. After the successful update process I can not start it. From var/log/openHAB-start-stop.log:

Start service . 
  call start.sh.   
  FAILED (su) . 
Stop service.  
  openHAB is not running . 
done.
manudar commented 6 years ago

Hi I have the exact same issue [update: with the latest package 2.3.0.002]. In my case the feasibility check fails so no install is done. In spite of this, the user openhab is removed and all the configuration (fortunately I had a backup). I installed the previous version, I copied my backup and everything works. I have a DS3617xs with DSM 6.1.6-15266 Update 1. This is the error in /var/log/synofeasibilitycheck.log:

2018-05-31T16:03:49+02:00 nas synoscgi_SYNO.Core.Package_1_feasibility_check[31119]: feasibility_check.cpp:87 FeasibilityCheck: [Info] Start feasibility check [package_install] with type [hard]. 2018-05-31T16:03:49+02:00 nas synoscgi_SYNO.Core.Package_1_feasibility_check[31119]: feasibility_check.cpp:106 FeasibilityCheck: [Info] [0] of feasibility check [package_install] failed. 2018-05-31T16:03:49+02:00 nas synoscgi_SYNO.Core.Package_1_feasibility_check[31119]: feasibility_check.cpp:79 FeasibilityCheck: [Info] No [package_install] feasibility check config with type [soft].

shaag7967 commented 6 years ago

having the same problem as manudar (feasibility check fails at installation). (Had a backup of my config too. I'm so glad...)

But I cannot install previous version 2.3.0.001, because the zip file is gone:

  seven@datastation:/var/log$ tail openHAB-install.log 
  Java version 1.8.0_172
  Version is more than 1.8
  The User Home service is enabled. UH_SERVICE=yes
  The shared folder '/var/services/homes' exists.
  Get new version
  Processing openhab-2.3.0-SNAPSHOT.zip
  ERROR:
  There was a problem downloading openhab-2.3.0-SNAPSHOT.zip from the download link:
  'https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.3.0-SNAPSHOT.zip'
  Alternatively, download this file manually and place it in the '/var/services/homes' shared folder and start installation again.

When I visit the cloudbees website, there is no openhab-2.3.0-SNAPSHOT.zip (only openhab-2.4.0-SNAPSHOT.zip). Right now I'm openHab-less. Feeling so naked... ;)

@cniweb Could you please unrelease 2.3.0.002? I think more people (maybe without backups) will fail installing this version. @cniweb How can we support you fixing the issue?

Polooo2 commented 6 years ago

I had CardDAV installed and deinstalled it. Uninstalling and reinstalling 2.3 did not help. Uninstalling, rebooting and installing 2.3 did not help. Uninstall and installing 2.2 again fixed it.

Can I provide you with any logs or additional debugging info? I have DSM 6.1.7-15284

rberger commented 6 years ago

I can't get the openHAB-2.3.0.002-syno-noarch-0.001 to properly install. It doesn't seem to be writing to /var/log/openHAB-install.log. It fails to start.

I had openHAB-2.3.0.001-SNAPSHOT-syno-noarch-0.001 running previously. I had uninstalled it (using the DSM Package manager) and then installed openHAB-2.3.0.002-syno-noarch-0.001 and it fails to run and there are no updates to /var/log/openHAB-install.log

I tried to rollback to openHAB-2.3.0.001-SNAPSHOT-syno-noarch-0.001 but that now fails as it seems the download link is no longer valid.

I did notice that in synopkg.log I see the message su: user openhab does not exist

Can't seem to find anything more specific. Not sure why the log file isn't being written to.

I've tried uninstalling, rebooting, reinstalling and no difference.

I tried creating the user openhab, and it said it installed, but it still wouldn't run.

shaag7967 commented 6 years ago

@rberger To install version openHAB 2.3.0.001 again, you need to download openhab-2.4.0-SNAPSHOT.zip from here. Rename the file to openhab-2.3.0-SNAPSHOT.zip and place it in the '/var/services/homes' shared folder and start installation again. I have it running on my NAS and everything I use is working, but of course I'm not sure if it is identical to version 2.3.0.

edit: just looked into the installer.sh file of the synology packages. Both packages (2.3.0.001 and 2.3.0.002) have the same download link: DOWNLOAD_PATH="https://bintray.com/openhab/mvn/download_file?file_path=org/openhab/distro/openhab/2.3.0" DOWNLOAD_FILE1="openhab-2.3.0.zip"

Thinking about it, by downloading manually and renaming the file you are actually installing the new version (2.3.0.002)?. Maybe something got mixed up in the build process.

shaag7967 commented 6 years ago

Back to topic...

@elcodeo On my NAS, DSM reported openHab as stopped but it was running (I could acess paperUi and everything was working). The problem is in the start script of openHab. The start script gives openHab 5 seconds to start. If it is not started after 5 seconds the script reports to DSM that openHab is not running. If you don't like this, then edit the following script: /var/packages/openHAB/scripts/start-stop-status.sh

Find the comment #start OpenHAB runtime in background mode. Below that there should be a line: wait_for_status 0 5

Change that to wait_for_status 0 100 or another value which suits you.

The last start of openHab on my diskstation (DS918+; 4 cores) took ~16 seconds.

rhusername commented 6 years ago

Hello, I'm experiencing the same issue. I was running DSM 6.1 with the 2.3.0.001 with no problems. Overnight my NAS upgraded to DSM 6.2 (I know, it will never happen again). OH failed to start, I believe with the "Failed to run the package service" error. I honestly didn't pay that much attention, I just thought it needed a reinstall. I tried to install both 2.3.0.001 and 2.3.0.002 and both appear to install correctly however, the service will not start, giving the above error.

I've noticed the following: ~ The openhab user is not created ~ The /volume1/@appstore/openHAB directory only contains the UI directory, no wonder it's not starting. ~ The /var/pacakges/openHAB/scripts and /volume1/SmartHome/openHAB directoried seem to be intact ~ The 2.3 versions are failing however, I am able to install 2.2.0.008 successfully

rberger commented 6 years ago

The symptoms @rhusername described are pretty much the same as me, but I am still on DSM 6.1.7-15284

cniweb commented 6 years ago

You can try the new release: https://github.com/openhab/openhab-syno-spk/releases/tag/2.3.0.003

loovanloon commented 6 years ago

I tried to (fresh) install 2.3.0.003. Package won't start. OpenHAB user is created. DSM version: 6.1.7-15284

Log: 2018-06-09 15_50_51-microsoft edge

loovanloon commented 6 years ago

Installing (updating) v2.3.0.003 over a running v2.2.0.010 works: package starts. but appears as a fresh installation with options how to setup (simple, standard etc.) Maybe due to previous install attempts that deleted the setup.