OH3 installation... Service fails to start - cannot create Java Virtual Machine

I still donā€™t know that this is something that is actually part of openHAB. The core developers are probably not going to know anything about that. In fact I think that is implemented by the Karaf project upon which openHAB runs, not by openHAB itself. You might look at the Karaf forums and github to see if anyone else has reported similar problems.

In point of fact, I think itā€™s actually still a documentation problem. Itā€™s most likely this line thatā€™s causing the problem.

wrapper.java.additional.8=-Djava.endorsed.dirs="%JAVA_HOME%\jre\lib\endorsed;%JAVA_HOME%\lib\endorsed;%KARAF_HOME%\lib\endorsed"

the lines causing the proble are
wrapper.java.additional.8
and
wrapper.java.additional.9
if you remove 8 you get the following error

INFO | jvm 5 | 2020/12/18 00:55:10 | -Djava.ext.dirs=C:\Program Files\Zulu\zulu-11\jre\lib\ext;C:\Program Files\Zulu\zulu-11\lib\ext;C:\openHAB\runtime\lib\ext is not supported. Use -classpath instead.

if you remove them both the service start, but the ui is incomplete. so it appears to be an issue with conf - maybe, supposing there is a feasible way for the current code to properly interface jvm with the same parameter set.

on this I respectfully disagree.
A user expects that the sw development team puts together a set of tools, a compiled code and a configuration set which works together to deliver a functionality.
If they suggest to use Zulu11 and they donā€™t make the compiled code and/or the configuration compatible, the ball is in their OH court.

Now, three days of attempted troubleshhoting. Causes so far is incomplete documentation and -probably-software development issues.

Letā€™s see what they reply. If there is no solution Iā€™ll call it a day as, for me, OH3 is not ready for use, and Iā€™ll roll back without remorse to OH2.5

Well, this is an open source project. in my opinion thatā€™s an unreasonable expectation. Particularly for a project as large and complex as openHAB. There are too many parts, too many variables and and too many options. OH isnā€™t a software application, itā€™s a development platform upon which users develop their home automation application.

We can barely keep up with docs for the stuff we actually wrote ourselves. If you require us to document all the third party stuff as well we may as well pack up and give up. Itā€™s never going to happen.

But itā€™s not a core code problem. That line in the service file that only exists in that documentation page needs some sort of update. The fact that you can run it using start.bat proves itā€™s not a problem with the software itself. The core developers are not going to know anything about that. As I said, none of them run on Windows.

The problem here is in the docs. Youā€™ll either need to find someone who knows Windows service files and Java or figure out that problem yourself. I canā€™t help. I donā€™t know anyone who can help. But I do know enough to know that the OH is working since it works with start.bat.

@J-N-K AFAIK you do. Sorry to bother you but can you comment on this Java startup error and the docs line required ?

Sorry. No idea. Iā€˜m using Windows on my development machine, but not as a service but using the start.bat.

Thanks. Could you please nonetheless have a look after Windows install instruction to get them checked before OH3 release ? Iā€™d think noone else will do.

Could you please check, if the following helps

1 Like

@hmerk You are my hero today! :beers:
Yes, the modifications to the openhab-wrapper.config recommended here Starting openHAB as a Service for openHAB 3.0.0.M1
are the ones allowing the service to run fine with Windows.

@rlkoshak there are therefore two major changes required in the page of the installation steps for windows to make OH3 work in Windows.

  • The note about the JAVA_PATH to be set to the Zulu installation folder (*) (here) and, most important,
  • the text in the section describing the change to the openhab-wrapper.conf has to be updated as indicated in the post linked above(here).

Not sure who should officially take in charge this. Itā€™s not cosmetics.


(*) keeping in mind your remark of different JAVA environment which sometimes are required to run on the same machine, I am not sure if a OH_JAVA_PATH should be defined instead, cascading the change to the .conf files using that environment variable

1 Like

Itā€™d be awesome if you gave it a shot. If not itā€™ll have to wait until after I write a couple more pages for the getting started tutorial before I can get to it (sometime next week I think). Iā€™ll see if there is a way to move faster. This does need to get fixed asap. I can help with logistics. Even if you just make the changes and need me to check in the changes.

The note about JAVA_PATH is pretty straight forward and you can probably do it in the browser without needing to clone the repo and mess with git directly. I havenā€™t looked at the changed needed for the service.

Ok, never done beforeā€¦ so steps are clone repository, modify the fileā€¦ and then?
-OK forget it, Iā€™ll read the GIThub doc too and end up with a pull request (I guess?!)

@rlkoshak mh already stuck. When I read (images/JAVA_HOME.png) and I cannot find a matching image in the images folder and I want to add an updated one, what should I do? Drop an image with that name in the images folder?

OK, each major section of the docs has itā€™s own subfolder. In this case you are working out of the ā€œinstallationā€ folder. Thatā€™s where the windows.md file lives. In that folder there is an images folder and in that folder (i.e. installation/images) I see a JAVA_HOME.png file. Thatā€™s the file you want to replace with your new screenshot.

Links to stuff like Images and links to other pages in the docs get converted from these relative paths to an absolute URL path when the MD files are compiled into HTML.

1 Like

just to understand - that openhab-docs is common to OH2 and 3? So if I have to change a image because it mentions OH2 instead of 3, can I safely delete the old one or should I save with a new name and update the references accordingly?
pls advise

OH 2 docs are fixed at this point. A new static version of the docs get fixed at the point where a release is made. Thatā€™s what lets you choose the version of the docs that correspond with a specific version (upper right hand corner of each page).

So right now, if you are working on the ā€œmainā€ branch you are editing the docs for OH 3. Iā€™d be surprised at this point if many if any updates to the docs get made for the OH 2 versions.

You can safely replace the image with OH 3 specific stuff. It would be best to replace actually.

okay I think I have made some change which make sense to me.
ref https://github.com/edolis/openhab-docs/blob/patch-2/installation/windows.md
Would you kindly review them?
I am actually stuck as I cannot understand how to sign. When youā€™ve got some time pls have a look.
thanks for your patience, @rlkoshak

1 Like

sign-off is done by adding -s to the commit command.

Please see my comment on your PRā€¦ :wink:

1 Like

replied :slight_smile:

opened a pull request and changed branch . https://github.com/openhab/openhab-docs/pull/1327
Unfortunately I get a couple of commits which show unsigned and Iā€™m stuck. Iā€™d like to delete thm and retry to make them fresh but I donā€™t know how.

changed the pull request to fix signatures issues (above link updated).
Jeez, it took one day to get this running. making an edit to a doc in github would deserve a tutorial on its own.
Really hope thatā€™s useful and that I can really get some sweet juice out of openHAB

1 Like