openhab / openhab-syno-spk

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

Update to openHAB 2.4.0 failed / port already in use #143

Closed Tost69 closed 5 years ago

Tost69 commented 5 years ago

Hi Cniweb,

thanks a lot for the update to 2.4.0. I've tried to update from 2.3.0.005 and the installation stopped with message 'Port 8080 already in use. Please try again'. Is there something I can do to avoid this issue before starting the update?

Thanks and kind regards, Tom

yphyph01 commented 5 years ago

Hi Tost69, Have you tried the "not updating" process? ... remove the 2.3.0.005 package before installing the new one? Yann

Tost69 commented 5 years ago

Hi Yann,

what was strange in the Package control of the installed 2.3 version: only a Deinstall was provided, but no Start/Stop of openhab. It seems the previous installation had issues. I tried several times to update and finally brought my NAS to not start openhab 2.3. After this the update to 2.4 was successful ... but could not start openhab 2.4. Finally I saved my settings, deinstalled and started from scratch. Now 2.4 is running.

Kind regards, Tom

ingof commented 5 years ago

Maybe same problem:

After update from latest 2.3.x i get the message Port 8443 in use. I changed to Port 8444 and i can install the 2.4 but i can not get the openhab start page at port 8080. (Edit: after restarting the diskstation the second try works now)

I deinstalled 2.4 and installed it again. I get port 8443 allready in use.

But there is no port 8443 in use.

netstat -nlp | grep 8443
tcp        0      0 0.0.0.0:38443           0.0.0.0:*               LISTEN      11230/nginx: master
tcp6       0      0 :::9443                 :::*                    LISTEN      22358/python2.7
tcp6       0      0 :::38443                :::*                    LISTEN      11230/nginx: master

I suppose the line 63 in "scripts/installer.sh" is the problem. On my diskstation is port 38443 in use. if netstat -tlpn | grep ${pkgwizard_txt_ports}; then finds port 38443 and stops installation.

Is it possible to include ":" in front of the port? Searching for :8443 instead of 8443 in my case.

Could if netstat -tlpn | grep :${pkgwizard_txt_ports}; then do the job instead?

yphyph01 commented 5 years ago

Same issue with 8443 port already in use ... I've removed openhab 2.3 and I've launched a fresh new install of openhab 2.4 without success. @ingof may have point the issue :-)

OllO18 commented 5 years ago

Hey from Oldenburg. When installing 2.4 i hab same issue. I found carddav already using Port 8443. Try change port during setup. BTW. Uninstaling 2.3 failed, without notice. onlyafter removing openhab folder from homes manually and deleting openhab user i succeded in installing 2.4 thanks for your work cniweb

ingof commented 5 years ago

I extracted the spk-file inserted the ":" in front of the ${ in line 52 and 62 of installer.sh and tar it again. It works fine for me. Installation on Port 8443 without problems.

ingof commented 5 years ago

Thats my first pull request. I hope it is useful ;-)l

cniweb commented 5 years ago

@ingof Thank you! I package a new release in the next time.