есть ли обработчик AWS для приложения micronaut? - PullRequest
0 голосов
/ 12 февраля 2019

Я пытаюсь развернуть свое приложение на AWS Elastic Beanstalk и застрять при подключении к базе данных.

Я уже создаю DB Instance, DB Cluster, и я уже настраиваю Environment's variable следующим образом.

enter image description here

это мой application.yml

datasources:
    default:
        url: ${JDBC_URL:`jdbc:mysql://localhost:3306/test_authentication?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false`}
        username: ${JDBC_USER:root}
        password: ${JDBC_PASSWORD:root}
        driverClassName: ${JDBC_DRIVER:com.mysql.jdbc.Driver}

Я уверен, что моя база данных существовала.

enter image description here

это мой последний журнал.

at io.micronaut.context.BeanDefinitionDelegate.build(BeanDefinitionDelegate.java:194)
    at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1329)
    at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:1902)
    at io.micronaut.context.DefaultBeanContext.getBeanForDefinition(DefaultBeanContext.java:1623)
    at io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:1603)
    at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:896)
    at io.micronaut.context.AbstractBeanDefinition.getBeanForConstructorArgument(AbstractBeanDefinition.java:973)
    at io.micronaut.configuration.hibernate.jpa.$EntityManagerFactoryBean$HibernateSessionFactoryBuilderDefinition.build(Unknown Source)
    at io.micronaut.context.BeanDefinitionDelegate.build(BeanDefinitionDelegate.java:197)
    at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1329)
    at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:1902)
    at io.micronaut.context.DefaultBeanContext.getBeanForDefinition(DefaultBeanContext.java:1623)
    at io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:1603)
    at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:896)
    at io.micronaut.context.AbstractBeanDefinition.getBeanForConstructorArgument(AbstractBeanDefinition.java:973)
    at io.micronaut.configuration.hibernate.jpa.$EntityManagerFactoryBean$HibernateSessionFactoryDefinition.build(Unknown Source)
    at io.micronaut.context.BeanDefinitionDelegate.build(BeanDefinitionDelegate.java:197)
    at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1329)
    at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:1902)
    at io.micronaut.context.DefaultBeanContext.loadContextScopeBean(DefaultBeanContext.java:1533)
    at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1049)
    ... 8 common frames omitted
Caused by: io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type  [org.hibernate.boot.registry.StandardServiceRegistry]

Message: Failed to initialize pool: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Path Taken: SessionFactory.hibernateSessionFactory([SessionFactoryBuilder sessionFactoryBuilder]) --> SessionFactoryBuilder.hibernateSessionFactoryBuilder([MetadataSources metadataSources],ValidatorFactory validatorFactory) --> MetadataSources.hibernateMetadataSources(JpaConfiguration jpaConfiguration,[StandardServiceRegistry standardServiceRegistry]) --> StandardServiceRegistry.hibernateStandardServiceRegistry(String dataSourceName,[DataSource dataSource])
    at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1343)
    at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:1902)
    at io.micronaut.context.DefaultBeanContext.getBeanForDefinition(DefaultBeanContext.java:1623)
    at io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:1603)
    at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:896)
    at io.micronaut.context.AbstractBeanDefinition.getBeanForConstructorArgument(AbstractBeanDefinition.java:973)
    ... 40 common frames omitted
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
...