Can't Update openHAB - Bad Date Format Error


I normally use openHABian to update/install/configure openHAB and have never had issues before. However, my Synaptic Package Manager tried to update my system today and the openHAB server threw an error:

Err:10 unstable Release                                     
  Unknown date format Bad header data [IP: 443]

Manually running “sudo apt-get update” or using openHABian throws the same error of course.

I am running MX Linux (Debian GNU/Linux 10 [buster]). I recently migrated my openHAB installation from ZorinOS/Xubuntu 18.04 to MX Linux/Debian 10 using the openhab-cli backup/restore script. My openHAB server is working fine, but am I having this update issue because I’m on a different version of Linux now? Or perhaps someone make a typo on a server somewhere?

Thank you for your help!

Just looking at the link in the log posted the dates are 2017.

This link is updated to 2020.

BTW what version are you trying to update from and too?

1 Like

All Unstable release issues need to be reported to GitHub.
Anybody running them should already know this since unstable snapshot releases are designed mainly for developer testing.

1 Like

Thank you - I can do this.

I originally switched to using the unstable release because I recall one of my add-ons required being on the unstable release (is that even possible though? I swear this was the issue at the time, but can’t find this now in any of the documentation for my installed add-ons. I don’t mind downgrading to stable if all my add-ons will work without issue…).

You can downgrade and try using a snapshot binding for any addon that does not work properly.

Let me know if you need a link to a specific snapshot jar file and I will try to provide it. FYI, the jar file location is /usr/share/openhab2/addons.

1 Like

You can install snapshot addons manually. In fact, there is a script tp help install Z-Wave or Zigbee snapshot addons. Z-Wave, in particular, includes the device database in the binding.

1 Like

Thank you for your helpful explanations here and useful links - very much appreciated!

It seems that the update somehow went through by itself without my changing anything?? :thinking: :man_shrugging:t2: However, “apt-get update” is still throwing the date error (I will update the link, or downgrade to stable).

I currently have unstable version 2.5.4~20200329102544-1 installed.

The server date error eventually went away by itself as well. I went ahead and downgraded from unstable 2.5.4~20200329102544-1 to stable 2.5.3-1 and so far no apparent performance issues!

(Well… aside from the usual errors I have always thrown in my log which have been there for at least a year now but which I tend to ignore, until I find time to sit down and review/troubleshoot each issue, one by one. I have never been able to get persistence to work properly, whether MySQL or InfluxDB/Grafana, via openHABian and there are all sorts of errors thrown.)

But staying on the topic of add-ons… there is also a file permission error shown every time I restart openHAB which I have also just allowed to persist. Would this potentially be causing issues with any of my manually installed .jar add-ons? Or with my add-ons in general?

Here is the error:

2020-03-29 12:33:35.049 [WARN ] - Could not process config file 'addons.cfg': /etc/openhab2/services/addons.cfg (Permission denied)

I attempted to fix this several months ago and manually changed the file permission to read/write for myself as well as the “openhab” user, but all hell broke loose and everything suddenly stopped working and there were all sorts of issues that I couldn’t quickly resolve with a few restarts/cache-clears and I had to completely reinstall openHAB and restore from an outdated and ended up losing a lot of rules/items/configurations/HABPanel changes that I’d put a lot of time into :-/.

However, I’m thinking that I probably shouldn’t be getting that addons.cfg error… in a perfectly-working openHAB world anyway… lol. :face_with_monocle: :slightly_smiling_face:

You can use the openhabian-config tool to fix all permissions, it’s listed under option 10 and it wouldn’t hurt to also run apply needed packages and add svr mounts.

If you don’t have openhabian you can still install it on any Linux OS.

# install git
sudo apt-get update
sudo apt-get install git

# download and link
sudo git clone /opt/openhabian
sudo ln -s /opt/openhabian/ /usr/local/bin/openhabian-config

# execute
sudo openhabian-config

Reference link:

1 Like

Thank you - yes, I use the openhabian-config tool regularly and find it very helpful! However, the addons.cfg file permission error persists even after I run “fix permissions” under “apply improvements.”

And so I then attempted to manually change the file permission and was successful and the permission error went away… but then I suddenly had all kinds of new errors and issues and nothing was able to function properly any longer :-/ I might just leave that file alone for now…

I don’t mind making a full backup of my installation right now and then can manually change the addons.cfg file permission and report back what happens as a result - but should I perhaps make a new topic for that issue?

OpenHAB runs as the user openhab. Try this

sudo chown -R openhab:openhab /etc/openhab2
sudo chmod -R u+r etc/openhab2

That should change the ownership of all your config files and folders to the user openhab and make sure it has at least read access to those files.