iCloud bindings fails to update almost every 2nd refresh

Hi Everyone!

I have been using the iCloud binding more than a year now, but it seems that it’s reliability is not that good.
Refresh is set to 5 min, but almost every 2nd call ends with an error, and all of the devices go OFFLINE.

The error is here:

2019-07-09 21:34:33.322 [WARN ] [l.handler.ICloudAccountBridgeHandler] - Unable to refresh device data

java.io.IOException: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@1966cb6{fmipmobile.icloud.com/17.248.147.148:443<->/10.0.0.135:41836,OPEN,fill=-,flush=-,to=300521/0}->HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@d6a072{fmipmobile.icloud.com/17.248.147.148:443<->/10.0.0.135:41836,ISHUT,fill=-,flush=-,to=41/0}{io=0/0,kio=0,kro=1}->SslConnection@d639b5{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]

	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:259) ~[?:?]

	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:156) ~[?:?]

	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:131) ~[?:?]

	at org.eclipse.smarthome.io.net.http.HttpRequestBuilder.getContentAsString(HttpRequestBuilder.java:135) ~[?:?]

	at org.openhab.binding.icloud.internal.ICloudConnection.callApi(ICloudConnection.java:84) ~[?:?]

	at org.openhab.binding.icloud.internal.ICloudConnection.requestDeviceStatusJSON(ICloudConnection.java:65) ~[?:?]

	at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$0(ICloudAccountBridgeHandler.java:84) ~[?:?]

	at org.eclipse.smarthome.core.cache.ExpiringCache.refreshValue(ExpiringCache.java:97) ~[?:?]

	at org.eclipse.smarthome.core.cache.ExpiringCache.getValue(ExpiringCache.java:68) ~[?:?]

	at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:141) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

Caused by: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@1966cb6{fmipmobile.icloud.com/17.248.147.148:443<->/10.0.0.135:41836,OPEN,fill=-,flush=-,to=300521/0}->HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@d6a072{fmipmobile.icloud.com/17.248.147.148:443<->/10.0.0.135:41836,ISHUT,fill=-,flush=-,to=41/0}{io=0/0,kio=0,kro=1}->SslConnection@d639b5{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]

	at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]

	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[?:?]

	at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:684) ~[?:?]

	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:250) ~[?:?]

	... 16 more

Caused by: java.io.EOFException: HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@1966cb6{fmipmobile.icloud.com/17.248.147.148:443<->/10.0.0.135:41836,OPEN,fill=-,flush=-,to=300521/0}->HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@d6a072{fmipmobile.icloud.com/17.248.147.148:443<->/10.0.0.135:41836,ISHUT,fill=-,flush=-,to=41/0}{io=0/0,kio=0,kro=1}->SslConnection@d639b5{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]

	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.earlyEOF(HttpReceiverOverHTTP.java:338) ~[?:?]

	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1557) ~[?:?]

	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.shutdown(HttpReceiverOverHTTP.java:209) ~[?:?]

	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:147) ~[?:?]

	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73) ~[?:?]

	at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133) ~[?:?]

	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155) ~[?:?]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) ~[?:?]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) ~[?:?]

	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) ~[?:?]

	at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) ~[?:?]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) ~[?:?]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) ~[?:?]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) ~[?:?]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) ~[?:?]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) ~[?:?]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) ~[?:?]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) ~[?:?]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) ~[?:?]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) ~[?:?]

	... 1 more

==> /var/log/openhab2/events.log <==

2019-07-09 21:34:33.462 [hingStatusInfoChangedEvent] - 'icloud:account:e4648d7f' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@1966cb6{fmipmobile.icloud.com/17.248.147.148:443<->/10.0.0.135:41836,OPEN,fill=-,flush=-,to=300521/0}->HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@d6a072{fmipmobile.icloud.com/17.248.147.148:443<->/10.0.0.135:41836,ISHUT,fill=-,flush=-,to=41/0}{io=0/0,kio=0,kro=1}->SslConnection@d639b5{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@1bf2490(l:/10.0.0.135:41836 <-> r:fmipmobile.icloud.com/17.248.147.148:443,closed=false)=>HttpChannelOverHTTP@53b5f8(exchange=HttpExchange@148c1ca req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1a90947(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1d02b06{s=START}],recv=HttpReceiverOverHTTP@e7a3b1(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]

2019-07-09 21:34:33.466 [hingStatusInfoChangedEvent] - 'icloud:device:e4648d7f:b7d070f1' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-07-09 21:34:33.468 [hingStatusInfoChangedEvent] - 'icloud:device:e4648d7f:bd7e5916' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-07-09 21:34:33.470 [hingStatusInfoChangedEvent] - 'icloud:device:e4648d7f:18452aaa' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-07-09 21:34:34.155 [vent.ChannelTriggeredEvent] - logreader:reader:948d5c07:newWarningEvent triggered 2019-07-09 21:34:33.322 [WARN ] [l.handler.ICloudAccountBridgeHandler] - Unable to refresh device data

Does someone has similar issues or has some idea how to solve this?
I’m on 2.4 stable

Thanks.