Closed TBail closed 3 years ago
Hi @TBail, I edited your post to display the formatting correctly.
There have been a couple of reports on this, but there's no indication which line produces an exit code. There's only a few lines that occur after the "post-update tasks", could you use the following command and tell me what the response is?
java -version 2>&1 | awk -F '"' '/version/ {print $2}' | sed -e 's/_.*//g; s/^1\.//g; s/\..*//g; s/-.*//g;'
Output from the command is a simple 11. Here is the full java -version output
openjdk version "11.0.8" 2020-07-14 LTS
OpenJDK Runtime Environment Zulu11.41+23-CA (build 11.0.8+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.41+23-CA (build 11.0.8+10-LTS, mixed mode)
Created today acomplete fresh install and had no errors. Will check that on the next updates.
The first update brought the error again. but the next update i changed some things.
1.) Stopped OH before update 2.) Run openhab-cli clean-cache 3.) Run openhab-cli reset-ownership
No error in Update. Will try tomorrow other/less combinations
Updated today to the latest.
Stopped oh3 before updating
No errors during install/update
Updates to #1999 without stopping openhab an get the error again. Will check that with the next build
And another try. Stopped openhab befor i run the upgrade. With oh3 not running the upgrade works like a charm.
Based on this i assume that there is something wrong with the automatic stop during the upgrade.
Just hit the same error. Seems the migration is incomplete, while /etc/openhab/* LGTM, /var/lib/openhab only has "etc" and "persistence" so e.g. jsondb is missing (and with it the things and items).
This should be fixed from ~S2041 and up. Please let me know if you run into anything else!
I have just update to S2042 from 2039 and still got the error
Unpacking openhab (3.0.0~S2042-1) over (3.0.0~S2039-1) ...
Setting up openhab (3.0.0~S2042-1) ...
[openHAB] Performing post-update tasks for version 3.0.0:
Replacing: String org.eclipse.smarthome.i18n to org.openhab.i18n in file /var/lib/openhab/config/org/openhab/i18n.config
Replacing: String org.eclipse.smarthome.persistence to org.openhab.persistence in file /var/lib/openhab/config/org/openhab/persistence.config
Replacing: String org.eclipse.smarthome.audio to org.openhab.audio in file /var/lib/openhab/config/org/openhab/audio.config
Replacing: String org.eclipse.smarthome.voice to org.openhab.voice in file /var/lib/openhab/config/org/openhab/voice.config
Replacing: String org.eclipse.smarthome.folder to org.openhab.folder in file /var/lib/openhab/config/org/openhab/folder.config
Replacing: String org.eclipse.smarthome.threadpool to org.openhab.threadpool in file /var/lib/openhab/config/org/openhab/threadpool.config
Replacing: String org.eclipse.smarthome.autoupdate to org.openhab.autoupdate in file /var/lib/openhab/config/org/openhab/autoupdate.config
Replacing: String org.eclipse.smarthome.chart to org.openhab.chart in file /var/lib/openhab/config/org/openhab/chart.config
Replacing: String org.eclipse.smarthome.core to org.openhab.core in file /var/lib/openhab/jsondb/automation_rules.json
Replacing: String org.eclipse.smarthome to org.openhab.core in file /var/lib/openhab/jsondb/automation_rules.json
Replacing: String org.eclipse.smarthome.core to org.openhab.core in file /var/lib/openhab/jsondb/org.openhab.core.config.discovery.DiscoveryResult.json
Replacing: String org.eclipse.smarthome to org.openhab.core in file /var/lib/openhab/jsondb/org.openhab.core.config.discovery.DiscoveryResult.json
Replacing: String org.eclipse.smarthome.core to org.openhab.core in file /var/lib/openhab/jsondb/org.openhab.core.items.Item.json
Replacing: String org.eclipse.smarthome to org.openhab.core in file /var/lib/openhab/jsondb/org.openhab.core.items.Item.json
Replacing: String org.eclipse.smarthome.core to org.openhab.core in file /var/lib/openhab/jsondb/org.openhab.core.thing.link.ItemChannelLink.json
Replacing: String org.eclipse.smarthome to org.openhab.core in file /var/lib/openhab/jsondb/org.openhab.core.thing.link.ItemChannelLink.json
Replacing: String org.eclipse.smarthome.core to org.openhab.core in file /var/lib/openhab/jsondb/org.openhab.core.thing.Thing.json
Replacing: String org.eclipse.smarthome to org.openhab.core in file /var/lib/openhab/jsondb/org.openhab.core.thing.Thing.json
dpkg: error processing package openhab (--configure):
installed openhab package post-installation script subprocess returned error exit status 1
This is on a ubuntu system. Let me know if there is anything i can do to try and help identify the problem.
@BClark09 I think i have found what is causing the problem. If openhab has been shutdown but was running then in findpid() the pgrep -f 'openhab.*java' will exit with -1 so the script exits with -1. I tested with putting set +e & set -e before and after that and then it doesnt exit at that point. Not sure if that is the best fix but i cant think of a better one.
I've hit this again on installing S2051. Second run went fine. @BClark09 did you already incorporate @jpharvey's comment ?
Having thought about the issue I've seen and when it occurs the post installation work has completed and it is just trying to restart OpenHab so that is the only thing that hasn't happened. Also it wont go through this work if openhab wasn't running so it also matches the analysis from @TBail So at least this is harmless but it is annoying.
Thanks for the debugging @jpharvey! You were of course spot on. The previous PR caught other instances of non-zero exits, but I had missed the issue with the findpid
function. We should be good on the next snapshot build.
Hi there,
today i updated to the latest OH3 version 1930 and whil using apt upgrade i got the following error
Performing a second apt upgrade gave me the following messages
The system recognises that something is missing and finished the upgrade without errors.
The system is a virtual machine with Debian 10 on a synology NAS.