MikeSafonov / jira-telegram-bot

Telegram bot for notifications about Jira events
MIT License
14 stars 6 forks source link

Error removing old webhook #27

Open AlexZalyalowa opened 3 years ago

AlexZalyalowa commented 3 years ago

Hello. I've tried to run bot with postgres alongside

version: '3.5'

services:
  jtb:
    container_name: postgres
    image: postgres:13.1
    environment:
      POSTGRES_USER: jtb-postgres
      POSTGRES_PASSWORD: jtbp@ss
      POSTGRES_DB: jtb_database
      PGDATA: /data/postgres
    volumes:
       - postgres:/data/postgres
    ports:
      - "5432:5432"
    networks:
      - postgres
    restart: unless-stopped

  jira-telegram-bot:
    container_name: jira-telegram-bot
    image: jira-telegram-bot_jira-telegram-bot
    volumes:
       - ./config:/app/config
    ports:
      - "7194:7194"
    networks:
      - postgres

networks:
  postgres:
    driver: bridge

volumes:
    postgres:
    jira-telegram-bot:

with this config

spring.application.name=jira-telegram-bot
server.port=7194
logging.level.root = info
logging.level.com.github.mikesafonov=info
request.logging.payload.length=100000
spring.jpa.open-in-view=false
pring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://postgres:5432/jtb_database
spring.datasource.username=jtb-postgres
spring.datasource.password=jtbp@ss
spring.flyway.locations=classpath:db/migration/postgresql
spring.flyway.placeholder-replacement=false
telegram.bot.token= XXXXX
telegram.bot.name= XXXXX
telegram.bot.adminId= XXXXX
telegram.bot.connectionTimeout=1000
telegram.bot.connectionRequestTimeout=1000
telegram.bot.socketTimeout=1000
jira.bot.notification.sendToMe = false
jira.bot.notification.jiraUrl = https://XXXXXXX
jira.watchers.username=XXXXXX
jira.watchers.password=XXXXXX
management.endpoints.web.exposure.include=health, info, prometheus

and I've got this error

jira-telegram-bot    | Caused by: org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException: Error removing old webhook
jira-telegram-bot    |  at org.telegram.telegrambots.util.WebhookUtils.clearWebhook(WebhookUtils.java:79) ~[telegrambots-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.telegram.telegrambots.bots.TelegramLongPollingBot.clearWebhook(TelegramLongPollingBot.java:25) ~[telegrambots-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.telegram.telegrambots.meta.TelegramBotsApi.registerBot(TelegramBotsApi.java:120) ~[telegrambots-meta-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.telegram.telegrambots.starter.TelegramBotInitializer.afterPropertiesSet(TelegramBotInitializer.java:43) ~[telegrambots-spring-boot-starter-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1862) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
jira-telegram-bot    |  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
jira-telegram-bot    |  ... 24 more
jira-telegram-bot    | Caused by: org.telegram.telegrambots.meta.exceptions.TelegramApiException: Unable to execute deleteWebhook method
jira-telegram-bot    |  at org.telegram.telegrambots.bots.DefaultAbsSender.sendApiMethod(DefaultAbsSender.java:719) ~[telegrambots-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.telegram.telegrambots.meta.bots.AbsSender.execute(AbsSender.java:47) ~[telegrambots-meta-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.telegram.telegrambots.util.WebhookUtils.clearWebhook(WebhookUtils.java:74) ~[telegrambots-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.telegram.telegrambots.bots.TelegramLongPollingBot.clearWebhook(TelegramLongPollingBot.java:25) ~[telegrambots-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.telegram.telegrambots.meta.TelegramBotsApi.registerBot(TelegramBotsApi.java:120) ~[telegrambots-meta-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.telegram.telegrambots.starter.TelegramBotInitializer.afterPropertiesSet(TelegramBotInitializer.java:43) ~[telegrambots-spring-boot-starter-4.3.1.jar!/:?]
jira-telegram-bot    |  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1862) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
jira-telegram-bot    |  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799) ~[spring-beans-5.2.1.RELEASE.jar!/:5.2.1.RELEASE]
jira-telegram-bot    |  ... 24 more
jira-telegram-bot    | Caused by: java.net.UnknownHostException: api.telegram.org: Try again
jira-telegram-bot    |  at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) ~[?:1.8.0_212]
jira-telegram-bot    |  at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929) ~[?:1.8.0_212]
jira-telegram-bot    |  at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324) ~[?:1.8.0_212]
jira-telegram-bot    |  at java.net.InetAddress.getAllByName0(InetAddress.java:1277) ~[?:1.8.0_212]
jira-telegram-bot    |  at java.net.InetAddress.getAllByName(InetAddress.java:1193) ~[?:1.8.0_212]
jira-telegram-bot    |  at java.net.InetAddress.getAllByName(InetAddress.java:1127) ~[?:1.8.0_212]
jira-telegram-bot    |  at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) ~[httpclient-4.5.10.jar!/:4.5.10]
jira-telegram-bot    |  at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112) ~[httpclient-4.5.10.jar!/:4.5.10]
MikeSafonov commented 3 years ago

Greetings. I can`t reproduce this isssue. Also maybe the problem is in your local proxy settings.