Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openhab user not created OpenHAB-2.1.0.005-syno-noarch-0.001.spk #71

Closed
HeikoB opened this issue Jul 4, 2017 · 58 comments
Closed

openhab user not created OpenHAB-2.1.0.005-syno-noarch-0.001.spk #71

HeikoB opened this issue Jul 4, 2017 · 58 comments

Comments

@HeikoB
Copy link

HeikoB commented Jul 4, 2017

Installing OpenHAB-2.1.0.005-syno-noarch-0.001.spk on a DS412+ no user openhab was created on install.

@cniweb
Copy link
Member

cniweb commented Jul 11, 2017

I released a new version:
https://github.com/openhab/openhab-syno-spk/releases/tag/2.1.0.006
Can you try it, please.

Thanks,
Chris

@HeikoB
Copy link
Author

HeikoB commented Jul 11, 2017 via email

@HeikoB
Copy link
Author

HeikoB commented Jul 11, 2017 via email

@ghost
Copy link

ghost commented Jul 12, 2017

I have same issues... :( OpenHAB interface will not start I just get black screen and no user is made. I made the folders /volume1/public/OpenHAB/conf and /Volume1/public/OpenHAB/addons

@SchoppAx
Copy link
Collaborator

Hi,

i think there is an error in the installer.sh at line 6 (download path). You have to remove the last slash.
https://bintray.com/openhab/mvn/download_file?file_path=org/openhab/distro/openhab/2.1.0//openhab-2.1.0.zip

@ghost
Copy link

ghost commented Jul 12, 2017

How do I do that? I'm using Synology version there is only one file I need to run from the package center.

@SchoppAx
Copy link
Collaborator

SchoppAx commented Jul 12, 2017

Also line 83 and 84 return addgroup: command not found but the script seems running.

@DanNielsen: Hi, I'm running the Script manually in the shell to see what happens. @cniweb has to change the installer.sh and release a new .spk, so you can easily reinstall. Just wait :-)

Now openHAB2 can started by shell or package center:
image
image

@ghost
Copy link

ghost commented Jul 12, 2017

@SchoppAx Thanks for your answer. i will wait then :) Thanks for working on a fix!!! NICE! :) 👍

@BClark09
Copy link
Member

BClark09 commented Jul 12, 2017

Nice find @SchoppAx, I think the only major problem is the last slash as you have found. The addgroup lines will need to be changed in order to get openHAB working "out-of-the-box" with serial devices but isn't a blocker for installing the package.

More specifically line 83 and 84 should use the synogroup command instead of addgroup. i.e. from:

addgroup ${DAEMON_USER} dialout
addgroup ${DAEMON_USER} uucp

to

synogroup --member dialout ${DAEMON_USER}
synogroup --member uucp ${DAEMON_USER}

If you're feeling up to it, can you make a PR to help @cniweb out?

@SchoppAx
Copy link
Collaborator

SchoppAx commented Jul 12, 2017

@BClark09 I can do it tomorrow in the evening.

If nothing has happened before :P

@SchoppAx
Copy link
Collaborator

Yeah, WLAN inside the train.

Pull request created. Hope that fixes the issues.

@cniweb
Copy link
Member

cniweb commented Jul 12, 2017

@bcrippsy38
Copy link

for some reason I still can't get the folders and scripts to populate in the openHAB2 folder. I get these errors when i try to run the start_runtime.sh scripts:
capture

any thoughts?

@SchoppAx
Copy link
Collaborator

SchoppAx commented Jul 13, 2017

Sorry, I'm not familiar with the .spk install logic. The installer.sh script is not be executed by the "Manuel Install" process. So the runtime script can't start/call the daemon.pid, because it will be created by the installer.sh.

After the .spk installation:

  • The folder /volume1/@appstore/openHAB2/ inculdes only the runtime scripts.
  • The folder /var/packages/openHAB2/ includes the important install scripts.

I stopped the openHAB2 instance via package center and run the installer.sh manually (clean install):
https://github.com/SchoppAx/openhab-syno-spk/blob/SchoppAx-patch-1/scripts/manuel_install.sh

Then I started the openHAB2 package via package center and after 8-10 minutes openHAB2 was started.

What can we do to get the .spk running instantly?

@dmorri18
Copy link

I have the same issue as SchoppAx above, although I'm not much of a linux guy so I don't know how to do the manual install.. Until then, I'm patiently waiting! :)

Thanks!

@ghost
Copy link

ghost commented Jul 13, 2017

I tryed "2.2.0.002-SNAPSHOT" same problem....:disappointed_relieved: Does not make a user and only make a folder (volume1/@appstore/openHAB2/OpenHAB2) with: start_debug_runtime.sh, start_runtime.sh and stop_runtime. I made the patch volume1/public/openHAB2/conf and volume1/public/openHAB2/addons.

@cniweb
Copy link
Member

cniweb commented Jul 13, 2017

Sorry guys, but I do not understand why the installation does not work anymore. After some comparisons with previous versions, I noticed nothing.

@bcrippsy38
Copy link

did any of the permissions change? seems odd how I can't even install now without using the public folder for config. any chance the additional code for the public folder is causing the issue? because ever since that was introduced I haven't been able to install.

@SchoppAx
Copy link
Collaborator

Seems that there are some permission problems. The openhab2 user will be created now, but then the script fails again.

@cniweb and I will look for a fix this weekend or the next week.

@cniweb
Copy link
Member

cniweb commented Jul 16, 2017

@SchoppAx Thanks for your PR #74
I left some comments as a review.

@cniweb
Copy link
Member

cniweb commented Jul 17, 2017

@SchoppAx
Copy link
Collaborator

There is a issue at the 7z command. I created a PR and released a new Version.

https://github.com/SchoppAx/openhab-syno-spk/releases/tag/2.1.0.006-DSM6

@bcrippsy38
Copy link

Thanks SchoppAx,
everything installs fine from a clean install. Only thing i noticed was I'm still not getting the /public/openHAB2/conf folder to populate. Is there a specific syntax that I don't have right for the hierarchy?

@SchoppAx
Copy link
Collaborator

@ghost
Copy link

ghost commented Jul 18, 2017

i used "openHAB-2.1.0.007-DSM6-syno-noarch-0.001.spk" and it worked. It made a user and i can run openHAB. it makes dir in volume1/public/openHAB2/conf and volume1/public/openHAB2/conf and places a readme file in volume1/public/openHAB2/conf and volume1/public/openHAB2/addons. But i cant finde files to change config files :(
openhab - filestation openhab-2 1 0 007-dsm6-syno-noarch-0 001 spk

@SchoppAx
Copy link
Collaborator

I installed the IHC binding and got a file at conf/services/ihc.cfg

Please have a look at your folder.

@ghost
Copy link

ghost commented Jul 18, 2017

Do you finde the file in "volume1/public/openHAB2/conf and volume1/public/openHAB2/conf". I can not finde the file you are talking about?
As I understand the file should be there and not in the installation folder
openhab - filestation services openhab-2 1 0 007-dsm6-syno-noarch-0 001 spk

@SchoppAx
Copy link
Collaborator

The binding has been successfully installed?

Please look at the event.log located in /volume1/@appstore/openHAB2/userdata/logs.
Are there any errors?

@ghost
Copy link

ghost commented Jul 18, 2017

I can not acces /volume/@appstore/ when i'm not home. I will look at the event.log when i get home.

@cniweb
Copy link
Member

cniweb commented Jul 18, 2017

vindings
cant der The

?

@ghost
Copy link

ghost commented Jul 19, 2017

Yes i can install all bindings including IHC in PaperUI but i can't finder The config file in public.

If i go to Bindings in PaperUI IHC binding is blue as it is installed, but i do not know if it really is.

When i try to installe the IHC binding using PaperUI it keeps updating
openhab - ihc binding install

When i update the page (F5) and search for "IHC binding" it seems to be installed
openhab - ihc binding install2

I have tryed to uninstall and install again.

in /volume1/@appstore/openHAB2/userdata/logs/events.log i only see this:
2017-07-19 07:55:36.963 [ExtensionEvent ] - Extension 'package-standard' has been installed.
2017-07-19 07:55:53.059 [ExtensionEvent ] - Extension 'ui-basic' has been installed.
2017-07-19 07:55:53.072 [ExtensionEvent ] - Extension 'ui-habpanel' has been installed.
2017-07-19 07:55:53.081 [ExtensionEvent ] - Extension 'ui-paper' has been installed.
2017-07-19 08:06:38.660 [ExtensionEvent ] - Extension 'binding-ihc1' has been uninstalled.

in /volume1/@appstore/openHAB2/userdata/logs/openhab.log i see this line:
2017-07-19 08:01:10.388 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-ihc1': Permission denied

I tryed to run sudo chown -hR openhab2 /volume1/@appstore/openHAB2 and try again.
openhab - putty

Still the same :(

i used my "admin" user, maybe i need to use the "openhab2" user but what are the password? to run sudo chown -hR openhab2 /volume1/@appstore/openHAB2

UPDATE!; It works... You have to go to user rights and give "Openhab2" user R/W rights to the Public folder. :)

@SchoppAx
Copy link
Collaborator

@DanNielsen we want to know why the user rights were not set during the installation. So can you tell us:

  • How is your User Account "openHAB2" written? (upper and lower case)
  • What is the result of this command $(sudo synoshare --get public | grep -oP 'Path.+\[\K[^]]+')

Thanks :-)

@ghost
Copy link

ghost commented Jul 19, 2017

the user account is "openhab2" (all lower case)

I can try the command. Which username and password should i use (i don't know the password for the "openhab2" user?)

@SchoppAx
Copy link
Collaborator

Use your root pw, the command only return the path of your public folder ;-)

@ghost
Copy link

ghost commented Jul 19, 2017

When i use "putty" it ask for a user and password as the first thing...? Is the a better way to run the command. Sorry but i am really a beginner :(

@SchoppAx
Copy link
Collaborator

Easily log in as admin like before ;-)

@ghost
Copy link

ghost commented Jul 19, 2017

Okay. I will try tonight, when i get home :)

@cniweb
Copy link
Member

cniweb commented Jul 19, 2017

The installation seems to work with the new release. Can we close this issue?

@cniweb
Copy link
Member

cniweb commented Jul 19, 2017

The installation seems to work with the new release.
Can we close this issue?
You can open a new issue for other problems, Thanks!

@ghost
Copy link

ghost commented Jul 19, 2017

YES!! 👍 THANKS!!! :)

@cniweb cniweb closed this as completed Jul 19, 2017
@ghost
Copy link

ghost commented Jul 19, 2017

I did the command you asked SchoppAx
openhab - putty2

@SchoppAx
Copy link
Collaborator

Thx, we are working on a fix...coming soon 😄

@cniweb cniweb reopened this Jul 21, 2017
@ghost
Copy link

ghost commented Jul 21, 2017

Happy if I could help. Is really impressed with how helpful people are here. Thank you! :)

cniweb pushed a commit that referenced this issue Jul 25, 2017
* Fix public folder permissions #62 + #71 + #80 
* Change 7z to tar for < DSM 6 support
* Fix Backup functionality #61
@cniweb
Copy link
Member

cniweb commented Jul 26, 2017

@DanNielsen we are released a new version:
https://github.com/openhab/openhab-syno-spk/releases/tag/2.2.0.005-SNAPSHOT
Can you try it, please!

@ghost
Copy link

ghost commented Jul 27, 2017

I will, but i cant see a file i can use for install? I need .SPK file

@SchoppAx
Copy link
Collaborator

@ghost
Copy link

ghost commented Jul 27, 2017

It makes the user, but give it "write-protected" acces to "Public".

@ghost
Copy link

ghost commented Jul 27, 2017

When i try to install IHC-binding now in "2.2.0.005-SNAPSHOT.spk" i get this in "Openhab.log:
2017-07-27 21:05:00.971 [WARN ] [org.apache.karaf.shell.ssh.SshUtils ] - Configured keyexchange 'ecdh-sha2-nistp521' not available
2017-07-27 21:05:00.978 [WARN ] [org.apache.karaf.shell.ssh.SshUtils ] - Configured keyexchange 'ecdh-sha2-nistp384' not available
2017-07-27 21:05:00.979 [WARN ] [org.apache.karaf.shell.ssh.SshUtils ] - Configured keyexchange 'ecdh-sha2-nistp256' not available

@cniweb
Copy link
Member

cniweb commented Jul 27, 2017

@DanNielsen is it a Synology problem, or a IHC-binding (configuration) problem?

@cniweb
Copy link
Member

cniweb commented Jul 27, 2017

@HeikoB We would like to close this "Monster" issue, it goes here, as mentioned at the beginning only about the installation and it works now!

@ghost
Copy link

ghost commented Jul 28, 2017

Bur The installation still does not work...It makes the user, but give it "write-protected" acces to "Public".

@SchoppAx
Copy link
Collaborator

Hi @DanNielsen,

the openhab2 user get read permissions to the public folder and R / W permissions to the addons and conf folder. This will be done by using the syno ACL's.
The old packages uses the linux mode chmod. If the conf and addons folder is still in linux mode we can't set the syno ACL. To fix it, please save your your conf and addons files if existing, delete the conf and addons folder and create it new with your DSM user.

Sorry for this inconveniences.

@cniweb
Copy link
Member

cniweb commented Aug 8, 2017

I think it works, so I close this issue?

@ghost
Copy link

ghost commented Aug 8, 2017

Yes i Think so

@cniweb cniweb closed this as completed Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants