Closed timyip3 closed 8 years ago
@timyip3 Did @Clevero's tutorial fixed it? In any case, it seems like some kind of network connection issue... as long as "{MY_TOKEN}"
represent your real bot token, it should work.
the tutorial really helps. thanks!
@timyip3 Did you manage it? If so, can you close the issue?
Can I work without a proxy in the java
can you help
I would like to ask if it is able to create TelegramBotApi without any parameter(i.e: using no-arg constructor) and using it to register bot??
When I follow the usage, there is HTTPHostConnectException popped up.
Here is my code:
`public static void main(String[] args) {
Here is the console:
org.telegram.telegrambots.TelegramApiException: Error executing setWebook method at org.telegram.telegrambots.TelegramBotsApi.setWebhook(TelegramBotsApi.java:158) at org.telegram.telegrambots.TelegramBotsApi.setWebhook(TelegramBotsApi.java:111) at org.telegram.telegrambots.TelegramBotsApi.registerBot(TelegramBotsApi.java:88) at main.Main.main(Main.java:65) Caused by: org.apache.http.conn.HttpHostConnectException: Connect to api.telegram.org:443 [api.telegram.org/149.154.167.198, api.telegram.org/149.154.167.199, api.telegram.org/149.154.167.200, api.telegram.org/149.154.167.197] failed: Connection timed out: connect at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.telegram.telegrambots.TelegramBotsApi.setWebhook(TelegramBotsApi.java:147) ... 3 more Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:337) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134) ... 13 more