kraftwerk28 / spigot-tg-bridge

Connect Telegram chats and Minecraft servers seamlessly
https://www.spigotmc.org/resources/telegram-bridge.75175/
GNU General Public License v3.0
38 stars 13 forks source link

Server hangs #11

Closed cavallium closed 4 years ago

cavallium commented 4 years ago

Today the plugin stopped working: when I load the plugin the server hangs here:

[15:33:12 ERROR]:               java.net.SocketInputStream.socketRead0(Native Method)                                                                                                                                                                                 
[15:33:12 ERROR]:               java.net.SocketInputStream.socketRead(SocketInputStream.java:116)                                                                                                                                                                     
[15:33:12 ERROR]:               java.net.SocketInputStream.read(SocketInputStream.java:171)                                        
[15:33:12 ERROR]:               java.net.SocketInputStream.read(SocketInputStream.java:141)           
[15:33:12 ERROR]:               sun.security.ssl.InputRecord.readFully(InputRecord.java:465)          
[15:33:12 ERROR]:               sun.security.ssl.InputRecord.read(InputRecord.java:503)               
[15:33:12 ERROR]:               sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:990)                                  
[15:33:12 ERROR]:               sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:948)                              
[15:33:12 ERROR]:               sun.security.ssl.AppInputStream.read(AppInputStream.java:105)                                                                                                               
[15:33:12 ERROR]:               okio.Okio$2.read(Okio.java:139)                                                                                                                                             
[15:33:12 ERROR]:               okio.AsyncTimeout$2.read(AsyncTimeout.java:237)                                                                                                                             
[15:33:12 ERROR]:               okio.RealBufferedSource.indexOf(RealBufferedSource.java:345)                                                                                                                                                                          
[15:33:12 ERROR]:               okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:217)                                                                                                     
[15:33:12 ERROR]:               okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:211)                                                                                                     
[15:33:12 ERROR]:               okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)                                                                                                  
[15:33:12 ERROR]:               okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)                                                                                        
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)                                                                                            
[15:33:12 ERROR]:               okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)                                                                                        
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)                                                                                            
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)                                                                                            
[15:33:12 ERROR]:               okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)                                                                                                 
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)                                                                                            
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)                                                                                                                                                      
[15:33:12 ERROR]:               okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)                                                                                                                                                          
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)                                                                                            
[15:33:12 ERROR]:               okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)                                                                           
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)                                                                                                                                                      
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)                                                                                                                                                      
[15:33:12 ERROR]:               okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:144)                                                                                                                                                     
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)                                                                                                                                                      
[15:33:12 ERROR]:               okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)                                                                                                                                                      
[15:33:12 ERROR]:               okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)                                                                                                                                                                   
[15:33:12 ERROR]:               okhttp3.RealCall.execute(RealCall.java:69)                                                                                                                                                                                            
[15:33:12 ERROR]:               retrofit2.OkHttpCall.execute(OkHttpCall.java:180)                                                                                                                                                                                     
[15:33:12 ERROR]:               com.github.kotlintelegrambot.network.UtilsKt.call(Utils.kt:8)                                                                                                                                                                         
[15:33:12 ERROR]:               com.github.kotlintelegrambot.Bot.sendMessage(Bot.kt:196)                                                                                                                                                                              
[15:33:12 ERROR]:               com.github.kotlintelegrambot.Bot.sendMessage$default(Bot.kt:187)                                                                                                                                                                      
[15:33:12 ERROR]:               org.kraftwerk28.spigot_tg_bridge.TgBot.broadcastToTG(TgBot.kt:139)                                                                                                                                                                    
[15:33:12 ERROR]:               org.kraftwerk28.spigot_tg_bridge.EventHandler.onPlayerJoin(EventHandler.kt:30)                                                                                                                                                        
[15:33:12 ERROR]:               com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor15.execute(Unknown Source)                                                                                                                                 
[15:33:12 ERROR]:               org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69)                                                                                                                                                                
[15:33:12 ERROR]:               org.bukkit.plugin.EventExecutor$$Lambda$4459/1492341802.execute(Unknown Source)                                                                                                                                                       
[15:33:12 ERROR]:               co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)                                                                                                                                                               
[15:33:12 ERROR]:               org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)                                                                                                                                                            
[15:33:12 ERROR]:               org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607)                                                                                                                                                         
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.PlayerList.postChunkLoadJoin(PlayerList.java:273)                                                                                                                                                       
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.PlayerList.lambda$a$1(PlayerList.java:220)                                                                                                                                                              
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.PlayerList$$Lambda$6162/2044686503.run(Unknown Source)                                                                                                                                                  
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.PlayerConnection.tick(PlayerConnection.java:154)                                                                                                                                                        
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.NetworkManager.a(NetworkManager.java:434)                                                                                                                                                               
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.ServerConnection.c(ServerConnection.java:145)                                                                                                                                                           
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.MinecraftServer.b(MinecraftServer.java:1442)                                                                                                                                                            
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.DedicatedServer.b(DedicatedServer.java:372)                                                                                                                                                             
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.MinecraftServer.a(MinecraftServer.java:1267)                                                                                                                                                            
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:999)                                                                                                                                                             
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177)                                                                                                                                                    
[15:33:12 ERROR]:               net.minecraft.server.v1_16_R2.MinecraftServer$$Lambda$3087/1594398069.run(Unknown Source)                                                                                                                                             
[15:33:12 ERROR]:               java.lang.Thread.run(Thread.java:748)                                                                  
kraftwerk28 commented 4 years ago

Sorry for late response, can you post full log with error stacktrace? Also, what java version and OS you run?

cavallium commented 4 years ago

Hi, sorry but I fixed it a long time ago, so I don't have any information about that anymore. But looking at the stacktrace it seems that it sends an http request during the tick loop, is it right?

kraftwerk28 commented 4 years ago

Yes, looks like the issue with library for http requests coming from bot. Maybe was a network problems. If you'll have similar issue in the future, feel free to reopen this one; for now I will close it.

cavallium commented 4 years ago

btw you should move http requests out of the tick loop