xabgesagtx / telegram-spring-boot-starter-example

Example project for telegram-spring-boot-starter
MIT License
26 stars 23 forks source link

Failed to register bot due to error Error executing setWebook method #2

Closed diegofpb closed 6 years ago

diegofpb commented 6 years ago

Hi!

First of all, thanks for all your work! I'm trying to use this bot example and I have the problem when the bot wants to set the webhook.

I filled in application.yml the token and the username but trhows me this errors. Can you help me?

Thanks.

/usr/lib/jvm/java-8-oracle/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=34729 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:/home/diego/Apps/idea-IU-181.4892.42/lib/idea_rt.jar=43889:/home/diego/Apps/idea-IU-181.4892.42/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/home/diego/Developer/gitprojects/telegram-spring-boot-starter-example/target/classes:/home/diego/.m2/repository/com/github/xabgesagtx/telegram-spring-boot-starter/0.17/telegram-spring-boot-starter-0.17.jar:/home/diego/.m2/repository/org/springframework/boot/spring-boot-starter/2.0.1.RELEASE/spring-boot-starter-2.0.1.RELEASE.jar:/home/diego/.m2/repository/org/springframework/boot/spring-boot/2.0.1.RELEASE/spring-boot-2.0.1.RELEASE.jar:/home/diego/.m2/repository/org/springframework/spring-context/5.0.5.RELEASE/spring-context-5.0.5.RELEASE.jar:/home/diego/.m2/repository/org/springframework/spring-aop/5.0.5.RELEASE/spring-aop-5.0.5.RELEASE.jar:/home/diego/.m2/repository/org/springframework/spring-beans/5.0.5.RELEASE/spring-beans-5.0.5.RELEASE.jar:/home/diego/.m2/repository/org/springframework/spring-expression/5.0.5.RELEASE/spring-expression-5.0.5.RELEASE.jar:/home/diego/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.1.RELEASE/spring-boot-autoconfigure-2.0.1.RELEASE.jar:/home/diego/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.0.1.RELEASE/spring-boot-starter-logging-2.0.1.RELEASE.jar:/home/diego/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/home/diego/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/home/diego/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/home/diego/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.10.0/log4j-to-slf4j-2.10.0.jar:/home/diego/.m2/repository/org/apache/logging/log4j/log4j-api/2.10.0/log4j-api-2.10.0.jar:/home/diego/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/home/diego/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/home/diego/.m2/repository/org/springframework/spring-core/5.0.5.RELEASE/spring-core-5.0.5.RELEASE.jar:/home/diego/.m2/repository/org/springframework/spring-jcl/5.0.5.RELEASE/spring-jcl-5.0.5.RELEASE.jar:/home/diego/.m2/repository/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/home/diego/.m2/repository/org/telegram/telegrambots/3.6/telegrambots-3.6.jar:/home/diego/.m2/repository/org/telegram/telegrambots-meta/3.6/telegrambots-meta-3.6.jar:/home/diego/.m2/repository/com/google/inject/guice/4.1.0/guice-4.1.0.jar:/home/diego/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/home/diego/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/home/diego/.m2/repository/com/google/guava/guava/19.0/guava-19.0.jar:/home/diego/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/home/diego/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.9.5/jackson-jaxrs-json-provider-2.9.5.jar:/home/diego/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.9.5/jackson-jaxrs-base-2.9.5.jar:/home/diego/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.9.5/jackson-module-jaxb-annotations-2.9.5.jar:/home/diego/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.5/jackson-databind-2.9.5.jar:/home/diego/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.5/jackson-core-2.9.5.jar:/home/diego/.m2/repository/org/glassfish/jersey/media/jersey-media-json-jackson/2.26/jersey-media-json-jackson-2.26.jar:/home/diego/.m2/repository/org/glassfish/jersey/core/jersey-common/2.26/jersey-common-2.26.jar:/home/diego/.m2/repository/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1.jar:/home/diego/.m2/repository/org/glassfish/jersey/ext/jersey-entity-filtering/2.26/jersey-entity-filtering-2.26.jar:/home/diego/.m2/repository/org/glassfish/jersey/containers/jersey-container-grizzly2-http/2.25.1/jersey-container-grizzly2-http-2.25.1.jar:/home/diego/.m2/repository/org/glassfish/hk2/external/javax.inject/2.5.0-b32/javax.inject-2.5.0-b32.jar:/home/diego/.m2/repository/org/glassfish/grizzly/grizzly-http-server/2.3.28/grizzly-http-server-2.3.28.jar:/home/diego/.m2/repository/org/glassfish/grizzly/grizzly-http/2.3.28/grizzly-http-2.3.28.jar:/home/diego/.m2/repository/org/glassfish/grizzly/grizzly-framework/2.3.28/grizzly-framework-2.3.28.jar:/home/diego/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar:/home/diego/.m2/repository/org/glassfish/jersey/core/jersey-server/2.26/jersey-server-2.26.jar:/home/diego/.m2/repository/org/glassfish/jersey/core/jersey-client/2.26/jersey-client-2.26.jar:/home/diego/.m2/repository/org/glassfish/jersey/media/jersey-media-jaxb/2.26/jersey-media-jaxb-2.26.jar:/home/diego/.m2/repository/org/json/json/20160810/json-20160810.jar:/home/diego/.m2/repository/org/apache/httpcomponents/httpclient/4.5.5/httpclient-4.5.5.jar:/home/diego/.m2/repository/org/apache/httpcomponents/httpcore/4.4.9/httpcore-4.4.9.jar:/home/diego/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/home/diego/.m2/repository/org/apache/httpcomponents/httpmime/4.5.5/httpmime-4.5.5.jar:/home/diego/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/diego/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.9.Final/hibernate-validator-6.0.9.Final.jar:/home/diego/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar:/home/diego/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar:/home/diego/.m2/repository/com/fasterxml/classmate/1.3.4/classmate-1.3.4.jar:/home/diego/.m2/repository/org/springframework/boot/spring-boot-configuration-processor/2.0.1.RELEASE/spring-boot-configuration-processor-2.0.1.RELEASE.jar com.github.xabgesagtx.example.ExampleBotApplication

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.1.RELEASE)

2018-06-18 16:30:51.646  INFO 17999 --- [           main] c.g.x.example.ExampleBotApplication      : Starting ExampleBotApplication on aero-15x-v8-diego with PID 17999 (/home/diego/Developer/gitprojects/telegram-spring-boot-starter-example/target/classes started by diego in /home/diego/Developer/gitprojects/telegram-spring-boot-starter-example)
2018-06-18 16:30:51.649  INFO 17999 --- [           main] c.g.x.example.ExampleBotApplication      : No active profile set, falling back to default profiles: default
2018-06-18 16:30:51.689  INFO 17999 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@3d51f06e: startup date [Mon Jun 18 16:30:51 CEST 2018]; root of context hierarchy
2018-06-18 16:30:51.943  INFO 17999 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-06-18 16:30:52.240  INFO 17999 --- [           main] c.g.x.bots.TelegramBotAutoConfiguration  : Starting auto config for telegram bots
2018-06-18 16:30:52.247  INFO 17999 --- [           main] c.g.x.bots.TelegramBotAutoConfiguration  : Initializing API without webhook support
2018-06-18 16:30:52.249  INFO 17999 --- [           main] c.g.x.bots.TelegramBotAutoConfiguration  : Registering polling bot: clikesbot
2018-06-18 16:30:52.343 ERROR 17999 --- [           main] c.g.x.bots.TelegramBotAutoConfiguration  : Failed to register bot clikesbot due to error Error executing setWebook method
2018-06-18 16:30:52.420  INFO 17999 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-06-18 16:30:52.427  INFO 17999 --- [           main] c.g.x.example.ExampleBotApplication      : Started ExampleBotApplication in 0.994 seconds (JVM running for 1.318)
2018-06-18 16:30:52.429  INFO 17999 --- [       Thread-4] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@3d51f06e: startup date [Mon Jun 18 16:30:51 CEST 2018]; root of context hierarchy
2018-06-18 16:30:52.430  INFO 17999 --- [       Thread-4] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

Process finished with exit code 0
xabgesagtx commented 6 years ago

Hey, thanks for your message and that you are reporting this issue. Sorry that you have trouble running the example app and I see how this error message is not very helpful. I will look into it as soon as I find some time

diegofpb commented 6 years ago

Hi @xabgesagtx, finally I discovered that was a problem with the java-ca-certificates. This caused an error when Spring tried to register the bot with telegram servers and with the (outdated i guessed) SSL certificates.

Thanks anyways for your time and patience.

xabgesagtx commented 6 years ago

Hi @diegofpb, thanks for sharing your experience. Sorry, I couldn't look into it in time. Good luck with your bot!

MherMg commented 5 years ago

Hi @xabgesagtx
I get this error.

(Failed to register bot due to error Error remov ing old webhook

I/O exception (java.net.SocketException) caught when processing request to {s}->https://api.telegram.org:443: Connection reset ) From what can this error be?

locally everything works! but the server gives this error I have a server in Yandex Cloud