Error 500 and 503 after ver2.4 upgrade

  • Platform information:
    • Hardware: RPi3
    • OS: OpenHabian 2.3 upgraded to 2.4
    • Java Runtime Environment: openjdk version “1.8.0_152”
    • openHAB version: 2.4.0
  • Issue of the topic:

I recently upgraded (sudo apt-get dist-upgrade) from 2.3 to 2.4.0.

The upgrade went fine and after the upgrade I just needed to install the MQTT add-on and configured it as per this link
https://community.openhab.org/t/migrating-mqtt1-items-to-mqtt2-4-items/60502

and everything worked fine.

I mostly use the IOS OpenHAB app, and I started noticing a red bar on the bottom adding an error message.
In fact there are a few that pop up. It happens in at least every 10th time I use the app.

Error. Request failed, service unavailable (503)

And there is a (500) that also pops up. Sometimes the “sitemap” in my IOS app dissapears, like when the server is unreachable.

I saw a post https://community.openhab.org/t/clear-the-cache/36424
but it did not have any effect.

I am unsure how too troubleshoot this issue, as I don’t find anyting in any of the forums or groups.

Some assistance in troubleshooting will be appreciated.

Do you see any errors in openhab.log?

Do you have any errors when using the web UIs?

Hi,
Sounds like a common theme going on after upgrades, see below for another post I’ve commented on but sounds exactly the same issue I had.

K

Hi Rich,

As I was typing this, I used BASIC UI a few times and the IOS app to invoke the errors. While I got “service unavailable 503” on the IOS app, neither the openhab.log or events.log logged anything.

On BASIC UI, I got a “SSE subscription failed: running in fallback mode” error, and nothing in the openhab.log or events.log.

hope that helps.

(BTW, I also cleared the cache again, but no luck.)

Hi,
Have you tried setting the karaf debug option as per the other post?

log:set debug org.openhab.core.karaf

Look for debug messages in openhab log relating to bindings being re-loaded.

K

Hi Kevin,

I did as you suggested re debug. I cannot see anything weird, here is the last 13 seconds of logs. During this time I did manage to invoke the error once from the IOS app. (Sorry it is nasty :neutral_face: )

oh.log (415.9 KB)

(What I do to invoke the error, is I basically flit through the “menu” without selecting any option. Then the error pops up.)

Here is my sitemap as well…

 cat /etc/openhab2/sitemaps/default.sitemap 
sitemap default label="SmartHome"
{
 Frame {
		Text label="Receiver" icon="receiver" {
                        Frame label="Lounge" {
				Switch item=avr1Z1_Power label="Lounge Receiver"
				Switch item=avr1Z1_Input label="Select Input"  mappings=[0='Dstv', 1='Kodi', 16='Dvd', 43='Spotify'] visibility=[avr1Z1_Power==ON]
				Setpoint item=avr1Z1_Volume label="Volume"  minValue=0 maxValue=100 step=5 visibility=[avr1Z1_Power==ON]
				Default  item=avr1Z1Player_Control visibility=[avr1Z1_Power==ON]
                        }
			Frame label="Patio" {
				Switch item=avr1Z2_Power label="Patio Speakers"
				Switch item=avr1Z2_Input label="Select Input" mappings=[43='Spotify', 05='Bluetooth', 36='Radio'] visibility=[avr1Z2_Power==ON]
				Setpoint item=avr1Z2_Volume label="Volume"  minValue=0 maxValue=100 step=5 visibility=[avr1Z2_Power==ON]
				Default  item=avr1Z2Player_Control visibility=[avr1Z2_Power==ON] 
       
			}
			Frame label="Audio Modes" {
                	Switch item=ListenMode mappings=[1='TV', 11='Music', 19='Movie', 133='THX'] visibility=[avr1Z1_Power==ON]
}
}
                Group item=grp_gate label="Gate" icon="door"
                Group item=grp_lights label="Lights" icon="light"
                Group item=grp_garden label="Garden" icon="garden"
		Group item=grp_weather label="Weather" icon="sun_clouds"
}
}


Hi,

On my mobile so not easy to see the wood from the trees in the log but looks like you have more than just the core.karaf debug enabled given the amount of data.

I was only expecting a few lines relating to bindings and

DEBUG] [core.karaf.internal.FeatureInstaller] - Running scheduled sync job
DEBUG] [core.karaf.internal.FeatureInstaller] - Installed xxxx xxxx etc...

K

Hi,

Back on the PC and having a quick look at the log I can see the following occurred twice in that 13 seconds

2019-01-05 23:26:22.144 [DEBUG] [core.karaf.internal.FeatureInstaller] - Installed 'openhab-binding-gpio'
2019-01-05 23:26:22.144 [DEBUG] [core.karaf.internal.FeatureInstaller] - Installed 'openhab-binding-gpio'

This suggests oh is repeatedly installing the gpio binding, are you using that binding and do you define it/them in the addons.cfg or via UI?

I had a similar issue, 3 different bindings, and had to remove them one at a time and re-add until the “Installed” messages stopped after which I had no more 500/503 errors using the IOS app.

Your symptoms appear very similar mine but I’d be tempted to turn off the http debug while removing/re-adding any bindings as the log is very busy.

Just my thoughts

K

2 Likes

If you’ve added it in addons.cfg you should use gpio1 instead. It’s a 1.x binding:

Hi Kevin,
You nailed it, it is the GPIO binding. I did a grep for “openhab-binding-gpio” while tailing the openhab.log file. Each time I got the the error to occur, the log entry appeared.

I have the “binding-gpio1 - 1.13.0” installed, but there are no config to it in addons.cfg and I don’t have a gpio.cfg in the /etc/openhab2/services directories.

The only config I have is the two items in my items file.

Switch loungelamp "Lounge Lamp" <lamp> (grp_lights) [ "Lighting" ] { gpio="pin:25 activelow:no initialValue:low" , autoupdate="false"}
Switch OpenGateCar "Main Gate" <car> (grp_gate) [ "Switchable" ] { gpio="pin:21 activelow:no initialValue:low" }

these two items relates to the sitemap here…

Group item=grp_gate label="Gate" icon="door"
Group item=grp_lights label="Lights" icon="light"

I’ve uninstalled the binding via the PAPER UI and re-installed it again, will see if the problem exist. Is that wht you did to resolve your issue.

Reading the openhab documentation regarding the binding, I cannot see if any other config is needed or relevant.

Thanks for the help so far.

Hi Wouter,

I do not have anything in addons.cfg regarding the GPIO binding, and yes I am using the v1 binding. 1.13 I see is the latest I have.

Then the issue is that its part of:

/var/lib/openhab2/config/org/openhab/addons.config

It’ll probably be solved if you remove it from that file and restart openHAB.

oh ok I get you. I thought you were referring to the /etc/openhab2/services/addons.cfg .

My file (/var/lib/openhab2/config/org/openhab/addons.config) was

binding="mqtt1,yahooweather,ntp,expire1,gpio,network,samsungtv,icloud,souliss1,astro,onkyo,mqtt,gpio1"

now I removed the gpio, but kept the gpio1.

I see there are also 2 mqtt addons, could this also cause problems?

will restart and test

AFAIK you can keep using the old one (mqtt1) while migrating to the new one (mqtt).
If you don’t have plans to migrate anytime soon you can again remove the new one (mqtt).
If you’ve succesfully migrated from the old one to the new one you can remove the old one (mqtt1).
If you don’t use MQTT at all you can remove both (mqtt, mqtt1). :wink:

1 Like

Thanks Wouter, Kevin and Rich.

Problem resolved. I see YahooWeather has also closed the API, which is the otehr problem I was working on since the “upgrade”. Unfortunate timing :face_with_raised_eyebrow:

Thanks for your fast assistance on a Sunday as well.

Have a great 2019!!
Greetings from South Africa.

1 Like

No worries Willie

Glad to help

All the best for 2019 from Scotland :slight_smile: