EXTRA_JAVA_OPTS changed back to "Standard" after Upgrade to OH2.5.2

After Upgrading to OH2.5.2 my environment-variable (/etc/default/openhab2) was set back from

EXTRA_JAVA_OPTS="-Xms250m -Xmx350m -Xbootclasspath/a:/etc/openhab2/automation/jython/jython-standalone-2.7.0.jar -Dpython.home=/etc/openhab2/automation/jython -Dpython.path=/etc/openhab2/automation/lib/python"


EXTRA_JAVA_OPTS="-Xms250m -Xmx350m"

Is there a possibility to fix my setting ?

Just copy the setting back? Just a guess.


Nice Bruce :wink:. That’s what I have done to get it work again :stuck_out_tongue_winking_eye:.

But what I meant is to fix it and not to get overwritten again at the next upgrade.

1 Like

Well you did not give us much information and I answered your question as directly as I could. :rofl: :smiley:
Since you did not say my guess is you are running openHABian on a Pi? I think I have heard of similar issue. Perhaps @mstormi has some idea what happened.

Sorry, my fault.

Hardware: RPi 3b (Test-Machine for jsr223 tinkering)
Software: Openhabian-Distro, OH-Version 2.5.2 stable. NGRE, jsr223, Mail-Binding, MQTT,OpenWeatherMap, SystemOInfo
Some PY.Scripts are running (Hello World, OWM)
No Errors in logs.

1 Like

I think Scott was working on jsr223 install without the need for Extra_Java_Opts so maybe that’s somehow connected to the issue.

Install a fresh image, review any changes to installing jsr223 and see if you still have issues. If so, stop OH clean the cache and restart (after allowing a full start up) two more times.

@fibu-freak I dare not say there is no way to prevent this. In general apt packages will reconfigure and overwrite some files.

I have however seen apt packages ask what to do when they see duplicated config files. I think the question is can we build some protections into the apt install to ask the question and not overwrite certain files.

Unfortunately I don’t know the answer to this question. But I do know samba packages do this.

1 Like

There is already override option file in linux distribution (2.5.x). Location for file is ${OPENHAB_CONF}/linux.parameters which by default is /etc/openhab2/linux.parameters. File doesn’t exists by default, so you need the create it. This file is NOT updated by the update.

Example from my env: cat /etc/openhab2/linux.parameters

MEMORY_OPTS="-Xms1024m -Xmx2048m"
JYTHON_OPTS="-Xbootclasspath/a:/etc/openhab2/automation/jython/jython-standalone-2.7.0.jar -Dpython.home=/etc/openhab2/automation/jython -Dpython.path=/etc/openhab2/automation/lib/python"


If you or someone else want to use default options from distribution and just add some extra options, it should be possible with following (not tested):



The beta Jython bundle removes the need for configuring Jython in your EXTRA_JAVA_OPTS. You can test it now and it will be available in a distribution soon, possibly included as a default core OH feature in OH 3.0… possibly as an addon.

1 Like

everything is working fine again, after I found the reason, which was the reverse to “standard setting” of Extra_Java_Opts. After completing again with the Jython-information everything working fine again. So no need for fresh install.

No need for hurry. It was just a question concerning the environment variable.

So for now I know the reason, I can live with, 'til official start of Scripted Automation. I made my installation as described here.

You know I’m a little Dummy :upside_down_face:, who don’t know how to install a Beta-Bundle.

My intention for now is to learn a bit more about jython/python/Scripted Automation to understand the basics, e.g. how to deal with items (item name, item state, item label, etc). Can you give me some hints or where to find examples for fools :innocent:

Sorry… I forgot the link!

1 Like

It´s a real pain in the bu**, that configuration files is getting overwritten when doing upgrade… I have “lost” several log file settings on this as well as exstra_java_opts settings.
I try to make it a strict procedure to make a copy of the files beeing overwritten, everytime I change anything in them… But sometimes I simply forget, and then… gone!. :rage:
Well, I guess I didnt have anything better to do that day anyway :smiley: