我正在尝试在本地计算机上运行Vulas docker安装程序。我遵循了这个guide。当我执行文档的“运行”阶段时,后端服务无法启动。进程启动时,它们将返回以下错误:
vulas-os-rest-backend | Caused by: org.flywaydb.core.internal.exception.FlywaySqlException:
vulas-os-rest-backend | Unable to obtain database connection
vulas-os-rest-backend | ------------------------------------
vulas-os-rest-backend | SQL State : 08004
vulas-os-rest-backend | Error Code : 0
vulas-os-rest-backend | Message : The server requested password-based authentication, but no password was provided.
vulas-os-rest-backend |
vulas-os-rest-backend | at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:57) ~[flyway-core-5.0.7.jar!/:na]
vulas-os-rest-backend | at org.flywaydb.core.internal.database.DatabaseFactory.createDatabase(DatabaseFactory.java:67) ~[flyway-core-5.0.7.jar!/:na]
vulas-os-rest-backend | at org.flywaydb.core.Flyway.execute(Flyway.java:1634) ~[flyway-core-5.0.7.jar!/:na]
vulas-os-rest-backend | at org.flywaydb.core.Flyway.migrate(Flyway.java:1168) ~[flyway-core-5.0.7.jar!/:na]
vulas-os-rest-backend | at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:66) ~[spring-boot-autoconfigure-1.5.15.RELEASE.jar!/:1.5.15.RELEASE]
vulas-os-rest-backend | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1692) ~[spring-beans-4.3.18.RELEASE.jar!/:4.3.18.RELEASE]
vulas-os-rest-backend | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1630) ~[spring-beans-4.3.18.RELEASE.jar!/:4.3.18.RELEASE]
vulas-os-rest-backend | ... 95 common frames omitted
vulas-os-rest-backend | Caused by: org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.
vulas-os-rest-backend | at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:484) ~[postgresql-9.4.1208.jre7.jar!/:9.4.1208.jre7]
vulas-os-rest-backend | at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:208) ~[postgresql-9.4.1208.jre7.jar!/:9.4.1208.jre7]
vulas-os-rest-backend | at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) ~[postgresql-9.4.1208.jre7.jar!/:9.4.1208.jre7]
vulas-os-rest-backend | at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:215) ~[postgresql-9.4.1208.jre7.jar!/:9.4.1208.jre7]
vulas-os-rest-backend | at org.postgresql.Driver.makeConnection(Driver.java:406) ~[postgresql-9.4.1208.jre7.jar!/:9.4.1208.jre7]
vulas-os-rest-backend | at org.postgresql.Driver.connect(Driver.java:274) ~[postgresql-9.4.1208.jre7.jar!/:9.4.1208.jre7]
vulas-os-rest-backend | at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319) ~[tomcat-jdbc-8.5.32.jar!/:na]
vulas-os-rest-backend | at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212) ~[tomcat-jdbc-8.5.32.jar!/:na]
vulas-os-rest-backend | at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736) ~[tomcat-jdbc-8.5.32.jar!/:na]
vulas-os-rest-backend | at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668) ~[tomcat-jdbc-8.5.32.jar!/:na]
vulas-os-rest-backend | at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483) ~[tomcat-jdbc-8.5.32.jar!/:na]
vulas-os-rest-backend | at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154) ~[tomcat-jdbc-8.5.32.jar!/:na]
vulas-os-rest-backend | at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118) ~[tomcat-jdbc-8.5.32.jar!/:na]
vulas-os-rest-backend | at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107) ~[tomcat-jdbc-8.5.32.jar!/:na]
vulas-os-rest-backend | at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131) ~[tomcat-jdbc-8.5.32.jar!/:na]
vulas-os-rest-backend | at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:51) ~[flyway-core-5.0.7.jar!/:na]
vulas-os-rest-backend | ... 101 common frames omitted
它似乎表明一个.env
问题,但是,它的配置如安装指南中所述。我的.env
是:
# Vulas
VULAS_RELEASE=3.0.15
VULAS_ENV=prod
# *** MANDATORY SETTINGS ***
# PostgreSQL
POSTGRES_USER=admin
POSTGRES_PASSWORD=secret
# Spring (should be equal to the values in PostgreSQL section above)
spring.datasource.username=admin
spring.datasource.password=secret
# HAProxy
HAPROXY_STATS_USER=admin
HAPROXY_STATS_PASSWORD=secret
# Frontend Bugs Frontend
FRONTEND_BUGS_USER=admin
FRONTEND_BUGS_PASSWORD=secret
# *** OPTIONAL SETTINGS ***
# Jira (optional)
JIRA_USER=
JIRA_PASSWORD=
# Proxy
HTTP_PROXY_HOST=
HTTPS_PROXY_HOST=
HTTP_PROXY_PORT=
HTTPS_PROXY_PORT=
NON_PROXY_HOSTS=
http_proxy=
https_proxy=
no_proxy=
我尝试了this,但没有成功!
答案 0 :(得分:1)
从以上评论中,我可以了解到您的.env
文件存在问题。基本上,在您的.env
中,VULAS_RELEASE
被设置为3.0.15
,但是可能您构建了标记为3.0.15-SNAPSHOT
版本的工件。
一般规则是始终检查VULAS_RELEASE
中的.env.sample
,并在自定义.env
中使用该值。
还要考虑到,在每个发行版中VULAS_RELEASE
都会递增,因此,每次您提取较新发行版中的代码时,都必须更新.env
。