openHABian upgrade hangs need to press Enter

Confusing output:

After login the MotD reports a different installed version than the

apt-cache policy openhab2

command

Also the web frontend still displays 2.5.11

Maybe I am already upgraded, just that this ist not displayed correctly?

2.5.11 is being grabbed from the version.properties file in /var/lib/openhab2/etc. This is strange because the file is correct 2.5.12 in the .deb package provided (just checked).

Itā€™s likely that openHABian masked the output of an apt decision (@mstormi, Iā€™d recommend not absorbing the output so that decisions can be made).

Try sudo apt install --reinstall openhab2, this will not remove any configuration but may prompt you if you would like to replace anything. If it belongs to openHAB and you donā€™t recognize the file, the usual answer should be yes.

1 Like

yes, I second that, if for some reason the Upgrade process needs user input (e.g. changing config files), the masking prevents the upgrade. Especially in my case I had to login in a second shell and kill openhabian-config, and update again with apt, and Iā€™m not sure, if the openhabian-started update went straight through all kinds of ā€œmagicā€ā€¦

Packages must not ask for input if DEBIAN_NONINTERACTIVE is set when run with apt --yes so the root cause is a bad package (install script).

I nonetheless used to unmask that in menu 02 in openHABian but when I just checked I noticed my change was gone so Iā€™ve re-added that.
@ndye fyi

2 Likes

Only if a decision is made for them, --yes works (-q also may be needed) for some cases but replacing configuration isnā€™t a yes or no question. You may also need the following options set

-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"

to ignore maintainers new version and keep user configuration (assumed if dialog is skipped) or

-o Dpkg::Options::="--force-confnew"

to always install maintainers version.

But this isnā€™t a choice that you could likely make on behalf of a user for all packages and since this option is always triggered interactively, it makes sense to keep the prompt up.

1 Like

Thanks a lot, just here to confirm that
sudo apt install --reinstall openhab2
fixed things for me.

Thanks!

1 Like

Yes I forgot to check that. It used to be in the code as well (keeping user conf).
@ndye any idea why itā€™s gone ? We might have moved it to an apt config file but there I donā€™t find it either.

apt upgrade is apt upgrade, that implicates to keep user conf doesnā€™t it ? (yeah this may not be desireable in some cases but one death you have to die if you want this to happen automatically)

I understand only half of whatā€™s going on with that! :wink:
but, I did not install any other packages other the ones coming with openHAB2 in openHABian. But from what I know from former times of upgrading, the openHAB core updates sometimes ask whether some configuration (log4j or the like) can be overwritten. Not sure, if one of that was the case here, but as I started menu 02, it went something like ā€œUpdating nowā€ and then it stuck there for looooong. I then sshā€™ed into another bash and killed openhabian-config, and apt-get upgraded from the bash - but there was nothing for me to chose anywaysā€¦ so Iā€™m not sure, what happened here exactlyā€¦

It may have been lost when we did a branch change or overwritten by one of us pushing a commit close together, Iā€™m not sure.

New finding: - (please move, if unrelated)
In the last days I (actually twice) tried to install normal package updates through the openhabian-config (ā€œ02 - Upgrade systemā€-option). Each time I observed, that the process was getting stuck atā€¦

Updating FireMotD available updates count ā€¦

ā€¦ and the process would stay there ā€œforeverā€ and not return (as in the past) to the blue-ish openhabian-config menu (as normal) after finalizing.

Packages get installed nicely though (as seen in seperate ssh window, which I opened to check for the same), but the MotD topcis seems to not progress at all.


So obvious question is: Could this be related to the latest fixes or if this is just a seperate problem, unrelated to the changes made recently?

Any hints or advice how to produce good logs which allow to ā€œdig deeperā€ are highly appreciated, as I did not encounter this before.

Bert

The following link jumps to the section in the docs that describe how to create a debug log with maximum level of information:

As Wolfgang already responded, use the debug guide.
If it is really FireMotd your system hangs at, note it can take some time to complete.
You can try to disable it in /etc/apt/apt.conf.d/15firemotd.

After the message
Updating FireMotD available updates count ā€¦
I have to hit >return< once to return to openhabian-config. This has been the case since update messages started appearing again. I donā€™t care much as I expect this to go away with one update or another.

Selecting 02 even if there is no update available, last message is

0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

And system is wating. Hitting >return< brings up

OK

and the the menu afterwards.

Iā€™m not shure, if

OK

is shown after hitting >return< when an update was available and

Updating FireMotD ā€¦

is displayed.

I have now tested this twice.

  1. on my (old, original) OH2.5.12 SD card and
  2. on my clone of the original old SD-card (using ā€œddā€) , which I upgraded to OH3 stable.

Finding:

  • On OH2.5.12 I need to press ā€œenterā€, then the ā€œOKā€ will appear and the blue menu comes up.
  • The 1:1 copy of the original SD card, which I freshly upgraded to OH3 will display the ā€œOKā€ without pressing enter and directly return to the menu.

So only seems to be a problem on OH2.5.12, as far as I can see it.

Now that I know that I only need to press ā€œenterā€ using OH2.5.12 I am fine, though.
That for that suggestion, which will give me some time to slowly, step-by-step migrate my stuff over to OH3.

I forgot to mention: Iā€™m on 2.5.12 too. openhabian-config tells me:

[stable]patchday-20210119-1116(5e807c0)

Yes, same OH2.5.12 version here.

This happens when any of the packages that gets upgraded on selecting menu 02 requires input.
You can run apt-get upgrade instead then youā€™ll see the output.

PS: only older openHABian versions suppress the output on 02.

As stated above, input is required even if there is no update available.

[19:59:54] root@openHABianPi:~# apt-get upgrade
Paketlisten werden gelesenā€¦ Fertig
AbhƤngigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesenā€¦ Fertig
Paketaktualisierung (Upgrade) wird berechnetā€¦ Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
[20:00:10] root@openHABianPi:~# openhabian-config
2021-02-27_20:00:31_CET [openHABian] Checking for root privilegesā€¦ OK
2021-02-27_20:00:31_CET [openHABian] Loading configuration file ā€˜/etc/openhabian.confā€™ā€¦ OK
2021-02-27_20:00:32_CET [openHABian] openHABian configuration tool version: [stable]patchday-20210119-1116(5e807c0)
2021-02-27_20:00:32_CET [openHABian] Checking for changes in origin branch stableā€¦ OK
2021-02-27_20:00:33_CET [openHABian] Switching to branch stableā€¦ OK
2021-02-27_20:00:36_CET [openHABian] Updating Linux package informationā€¦ OK
Paketlisten werden gelesenā€¦ Fertig Updating repositories and upgrading installed packagesā€¦
AbhƤngigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesenā€¦ Fertig
Paketaktualisierung (Upgrade) wird berechnetā€¦ Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

awaiting input here

OK
2021-02-27_20:01:13_CET [openHABian] Checking for default openHABian username:password combinationā€¦

I had this happen today also, while updating from 3.0.1 to 3.0.2. It was stuck at Updating FireMotD available updates count. After 30 minutes I searched, found this post and hit Enter. The menu screen came back. I do show that I am now on 3.0.2.

2 Likes