eknoes / covidbot

Multi-platform messenger bot which provides updates on current COVID19 situation for Germany
https://covidbot.d-64.org
GNU General Public License v3.0
48 stars 8 forks source link

Verbindung zu signald #70

Closed eknoes closed 3 years ago

eknoes commented 3 years ago

Manchmal gibt es Fehler beim Signalbot mit der Socket-Verbindung zu signald.

Wir nutzen semaphore als Framework, das verbindet sich mit einem Socket von signald. Dabei kommt es manchmal zu Fehlern, die ich bisher nur eingeschränkt nachvollziehen kann, bspw.:

java.net.SocketException: Not open
        at org.newsclub.net.unix.AFUNIXSocketImpl.validFdOrException(AFUNIXSocketImpl.java:424) ~[junixsocket-common-2.3.2.jar:?]
        at org.newsclub.net.unix.AFUNIXSocketImpl.access$200(AFUNIXSocketImpl.java:46) ~[junixsocket-common-2.3.2.jar:?]
        at org.newsclub.net.unix.AFUNIXSocketImpl$AFUNIXInputStream.read(AFUNIXSocketImpl.java:318) ~[junixsocket-common-2.3.2.jar:?]
        at java.net.Socket$SocketInputStream.read(Socket.java:982) ~[?:?]
        at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:297) ~[?:?]
        at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339) ~[?:?]
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188) ~[?:?]
        at java.io.InputStreamReader.read(InputStreamReader.java:181) ~[?:?]
        at java.io.BufferedReader.fill(BufferedReader.java:161) ~[?:?]
        at java.io.BufferedReader.readLine(BufferedReader.java:326) ~[?:?]
        at java.io.BufferedReader.readLine(BufferedReader.java:392) ~[?:?]
        at io.finn.signald.SocketHandler.run(SocketHandler.java:100) [signald.jar:unspecified]
        at java.lang.Thread.run(Thread.java:832) [?:?]
10:04:31.123 [************45-receiver] ERROR io.finn.signald.MessageReceiver - Catching
java.util.ConcurrentModificationException: null
        at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013) ~[?:?]
        at java.util.ArrayList$Itr.next(ArrayList.java:967) ~[?:?]
        at io.finn.signald.SocketManager.broadcast(SocketManager.java:45) ~[signald.jar:unspecified]
        at io.finn.signald.MessageReceiver.handleMessage(MessageReceiver.java:111) ~[signald.jar:unspecified]
        at io.finn.signald.Manager.receiveMessages(Manager.java:1118) ~[signald.jar:unspecified]
        at io.finn.signald.MessageReceiver.run(MessageReceiver.java:68) [signald.jar:unspecified]
        at java.lang.Thread.run(Thread.java:832) [?:?]
10:04:35.660 [socketlistener] INFO  io.finn.signald.SocketHandler - Client connected
10:04:55.073 [socketlistener] INFO  io.finn.signald.SocketHandler - Client disconnected
10:04:55.074 [socketlistener] INFO  io.finn.signald.MessageReceiver - Last client for ************45 unsubscribed, shutting down message pipe!
10:04:55.074 [socketlistener] INFO  io.finn.signald.SocketHandler - Unsubscribed from ************45
10:04:57.912 [socketlistener] INFO  io.finn.signald.SocketHandler - Client connected
10:04:59.111 [************45-receiver] ERROR manager-************45 - Catching
java.io.EOFException: null
        at java.io.DataInputStream.readFully(DataInputStream.java:201) ~[?:?]
        at java.io.DataInputStream.readFully(DataInputStream.java:169) ~[?:?]
        at io.finn.signald.Manager.loadEnvelope(Manager.java:1284) ~[signald.jar:unspecified]
        at io.finn.signald.Manager.retryFailedReceivedMessages(Manager.java:1021) [signald.jar:unspecified]
        at io.finn.signald.Manager.receiveMessages(Manager.java:1067) [signald.jar:unspecified]
        at io.finn.signald.MessageReceiver.run(MessageReceiver.java:68) [signald.jar:unspecified]
        at java.lang.Thread.run(Thread.java:832) [?:?]

Meistens startet sich dann unser Bot neu, manchmal funktioniert dann alles, manchmal laufen auch beide Services aber unser Bot ist nicht wirklich subscribed. Ich vermute, wir machen irgendwo was mit dem Socket öffnen / Schließen falsch, möglicherweise auch in semaphore.

eknoes commented 3 years ago

Scheint nicht mehr wirklich aufzutreten.