tdlib / telegram-bot-api

Telegram Bot API server
https://core.telegram.org/bots
Boost Software License 1.0
3.19k stars 601 forks source link

local bot Connection has been shut down #486

Closed prog-ape closed 1 year ago

prog-ape commented 1 year ago

.\telegram-bot-api.exe --api-id=123123 --api-hash=123123 --http-port=8181 --local --log=D:\localbot\logs\log.log --dir=D:\localbot\dir --temp-dir=D:\localbot\temp

[Telegram Connection] ERROR o.t.t.updatesreceivers.DefaultBotSession - Connection has been shut down java.io.InterruptedIOException: Connection has been shut down at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:342) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.getUpdatesFromServer(DefaultBotSession.java:249) at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.run(DefaultBotSession.java:188) Caused by: org.apache.http.impl.conn.ConnectionShutdownException: null at org.apache.http.impl.conn.CPoolProxy.getValidConnection(CPoolProxy.java:77) at org.apache.http.impl.conn.CPoolProxy.getSSLSession(CPoolProxy.java:137) at org.apache.http.impl.client.DefaultUserTokenHandler.getUserToken(DefaultUserTokenHandler.java:82) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:326) ... 7 common frames omitted

[Telegram Connection] ERROR o.t.t.updatesreceivers.DefaultBotSession - Timeout waiting for connection from pool org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:316) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:282) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:190) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.getUpdatesFromServer(DefaultBotSession.java:249) at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.run(DefaultBotSession.java:188)

What is the value range of --max-connections?

How to fix this problem?

levlam commented 1 year ago

What is the value range of --max-connections?

It depends on your operating system and its ulimit settings.

How to fix this problem?

The errors are from your HTTP framework. If the Bot API server didn't exit, then the port 8181 is opened and you can send requests there. You can also change value of the --verbosity option to see more details about requests received by the server.

prog-ape commented 1 year ago

Thanks