openhab-addons: [pushover] Sending messages randomly fails with java.io.EOFException

Expected Behavior

Pushover messages should be reliable. Every attempt of sending a message from a rule should bring the same result.

Current Behavior

Very randomly and for no good reason the following error message appears in the logs and no pushover message is sent:

Script execution of rule with UID 'hm-sonstige-5' failed: java.io.EOFException: HttpConnectionOverHTTP@d761b68::DecryptedEndPoint@3b78ddb9{api.pushover.net/104.20.125.71:443<->/192.168.178.2:47218,OPEN,fill=-,flush=F,to=82112373/0} in hm-sonstige

Seconds later the exact same rule works like a charm for multiple times.

Steps to Reproduce (for Bugs)

Send a pushover message from the same rule multiple times.

Your Environment

  • Version used: openHAB 3.1.0.M2
  • Operating System and version: Synology Docker Container

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 28 (9 by maintainers)

Most upvoted comments

Hi! I ran into the same Problem! Some messages went out and some not. What i saw is that after a fresh reboot every message went out. But after some time when no message was sent the next message generates an EOF Exception. I observed this after i got a new Cable Modem from my Internet Provider. So i started to dig deeper. What i found out:

  1. After a fresh reboot the Binding opens a TLS Connection to api.pushover.net
  2. Trigering some Pushover Rules in OpenHAB -> Messages are all sent!
  3. Then I waited some Time and observed the Network Traffic via TCP Dump
  4. I saw that the HTTPS Connection is not closed by the Binding and there is no Traffic on this connection (Keepalives)
  5. My Cable Modem at some point Kills the Session the hard way and unfortunately not telling this to the Client (openHAB Server) via the TCP Stack
  6. The next Message which a rule want to sent will fail
  7. The Binding opens a new TLS Connection to api.pushover.net

Workaround: Triggering a “Sent Message” with Empty Content every couple of Minutes will generate some “Keepalive” Traffic on the established Connection and my Cable Modem is not Dropping the Connection!

Is it possible to implement some sort of Keepalive in the Binding or a check if an established TCP Session is “healthy”?