Online Install Error

I just setup a seperate VM running Ubuntu Server 14. Its a fresh/clean install. I then downloaded the latest OH2 On-line Build version and copied it across to the Server.

First I had some permission error and after fixing that then get some stranger Karaf error when trying to start it as follows:

root@OpenHab2:/opt/openhab# ls
addons LICENSE.TXT start.bat start_debug.sh userdata
conf runtime start_debug.bat start.sh
root@OpenHab2:/opt/openhab# ./start.sh
-bash: ./start.sh: Permission denied
root@OpenHab2:/opt/openhab# cd …
root@OpenHab2:/opt# cd …
root@OpenHab2:/# chmod +x -R /opt
root@OpenHab2:/# cd /opt/openhab
root@OpenHab2:/opt/openhab# ./start.sh
Launching the openHAB runtime…
./runtime/karaf/bin/karaf: 165: ./runtime/karaf/bin/setenv: die: not found
./runtime/karaf/bin/karaf: 178: [: Illegal number:
./runtime/karaf/bin/karaf: 239: [: Illegal number:
./runtime/karaf/bin/karaf: 281: [: Illegal number:
./runtime/karaf/bin/karaf: 420: exec: ./bin/java: not found
root@OpenHab2:/opt/openhab#

Any idea if i am doing something incorrect?

Setting the executable bit on every single file and directory under /opt could be a problem.

I gave that a try but didn’t want to start.

I removed the entire directory and then recopied over OH2. I then chmod 777 the userdata directory only. And chmod +x only the start.sh and start_debug.sh files. It still didn’t want to start, but reduced to just the one error"

root@OpenHab2:/opt/openhab# ./start.sh
Launching the openHAB runtime…
./start.sh: 6: exec: ./runtime/karaf/bin/karaf: Permission denied
root@OpenHab2:/opt/openhab# chmod +x start_debug.sh
root@OpenHab2:/opt/openhab# ./start_debug.sh
Launching the openHAB runtime…
./start.sh: 6: exec: ./runtime/karaf/bin/karaf: Permission denied

I will try set permissions to 777 on the bin/karaf and report back in a few as well.

Do have a need to be doing this all as the root user? Typically, you should avoid doing anything as the root user.

No special reason as root user. Only because its test VM. I’ll switch over and try again, Making Karaf 777 didnt want to help.

root@OpenHab2:/opt/openhab# chmod +777 runtime/karaf/bin/karaf
root@OpenHab2:/opt/openhab# ./start.sh
Launching the openHAB runtime…
./runtime/karaf/bin/karaf: 165: ./runtime/karaf/bin/setenv: die: not found
./runtime/karaf/bin/karaf: 178: [: Illegal number:
./runtime/karaf/bin/karaf: 239: [: Illegal number:
./runtime/karaf/bin/karaf: 281: [: Illegal number:
./runtime/karaf/bin/karaf: 420: exec: ./bin/java: not found
root@OpenHab2:/opt/openhab#

Just tried as normal user and similar error. This is after first removing all files and recopying over as well.

ptmuldoon@OpenHab2:/opt/openhab$ chmod +X start.sh
ptmuldoon@OpenHab2:/opt/openhab$ chmod +777 userdata
ptmuldoon@OpenHab2:/opt/openhab$ ./start.sh
Launching the openHAB runtime…
./start.sh: 6: exec: ./runtime/karaf/bin/karaf: Permission denied
ptmuldoon@OpenHab2:/opt/openhab$

I need to take my son out for a bit. But will try again later with the offline install and see what happens.

Just wanted to report back that I get the same error using the offline install.

It could very well be something with Ubuntu and not OH. I’m just not an expert at this stuff and learn most by trial and error.

If anyone else is running OH2 on Ubuntu Server 14, can you confirm no issues with the latest build?

Another update as I just did another fresh install of Ubuntu Server 14. But this time did run apt-get update and upgrade after the install.

But still getting the same error. This time doing everything as a default user setup, and nothing as root either.

Does anyone have the latest 103 build working on Ubuntu to confirm its just something in my setup or something?

Actually…I just thought. On a new build install, I likely need to install Java?

Just type java -version to see which - or if any - java version is installed.
Cannot help you with the other stuff, don’t use ubuntu …

Well, i guess i feel stupid now!. Java was not installed on the machine. Once that was done, OH2 started up just fine.

Now I can start playing some more with testing out what I can.

Hello. I am having the same issue with getting OH2 to start. I have installed java but still get the same error. I am wondering what version you used and how you installed it. I have tried several version to no avail. Thank.

I don’t think i did anything special to install it.

What OS are you using? I know i always do a reboot after installing something though.