Unable to create initial connections of pool. marquez-api
Closed this issue · 2 comments
trying to connect remote postgres rds using below docker compose file
version: '3.7'
services:
api:
image: marquezproject/marquez:latest
container_name: marquez-api
environment:
DATABASE_URL: jdbc:postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
# Optional: Other Marquez-specific environment variables
# MARQUEZ_CONFIG: /path/to/your/config.yaml # If you have a custom configuration file
ports:
- "5000:5000"
command: ["java", "-jar", "marquez-api.jar"]
networks:
- marquez_network
marquez-web:
image: marquezproject/marquez-web:latest
container_name: marquez-web
depends_on:
- api
ports:
- "3030:3000"
environment:
REACT_APP_MARQUEZ_API: "http://marquez-api:5000/api/v1"
networks:
- marquez_network
networks:
marquez_network:
driver: bridge
Getting below error
marquez-web | App listening on port 3000!
marquez-api | INFO [2024-07-29 18:26:59,057] org.eclipse.jetty.util.log: Logging initialized @1102ms to org.eclipse.jetty.util.log.Slf4jLog
marquez-api | INFO [2024-07-29 18:26:59,119] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: /
marquez-api | INFO [2024-07-29 18:26:59,120] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: /
marquez-api | INFO [2024-07-29 18:26:59,120] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: graphql-playground for path /graphql-playground/*
marquez-api | INFO [2024-07-29 18:26:59,127] marquez.MarquezApp: Running startup actions...
marquez-api | INFO [2024-07-29 18:26:59,155] org.flywaydb.core.internal.license.VersionPrinter: Flyway Community Edition 8.5.13 by Redgate
marquez-api | INFO [2024-07-29 18:26:59,155] org.flywaydb.core.internal.license.VersionPrinter: See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#8.5.13
marquez-api | INFO [2024-07-29 18:26:59,155] org.flywaydb.core.internal.license.VersionPrinter:
marquez-api | ERROR [2024-07-29 18:26:59,227] org.apache.tomcat.jdbc.pool.ConnectionPool: Unable to create initial connections of pool.
marquez-api | ! java.net.UnknownHostException: postgres
marquez-api | ! at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:572)
marquez-api | ! at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
marquez-api | ! at java.base/java.net.Socket.connect(Socket.java:633)
marquez-api | ! at org.postgresql.core.PGStream.createSocket(PGStream.java:243)
marquez-api | ! at org.postgresql.core.PGStream.(PGStream.java:98)
marquez-api | ! at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:132)
marquez-api | ! at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:258)
marquez-api | ! ... 26 common frames omitted
marquez-api | ! Causing: org.postgresql.util.PSQLException: The connection attempt failed.
marquez-api | ! at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:354)
marquez-api | ! at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54)
marquez-api | ! at org.postgresql.jdbc.PgConnection.(PgConnection.java:263)
marquez-api | ! at org.postgresql.Driver.makeConnection(Driver.java:443)
marquez-api | ! at org.postgresql.Driver.connect(Driver.java:297)
marquez-api | ! at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:346)
marquez-api | ! at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:227)
marquez-api | ! at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:772)
marquez-api | ! at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:700)
marquez-api | ! at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:499)
marquez-api | ! at org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:155)
marquez-api | ! at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
marquez-api | ! at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
marquez-api | ! at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
marquez-api | ! at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:48)
marquez-api | ! at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.(JdbcConnectionFactory.java:75)
marquez-api | ! at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:147)
marquez-api | ! at org.flywaydb.core.Flyway.info(Flyway.java:190)
marquez-api | ! at marquez.db.DbMigration.hasPendingDbMigrations(DbMigration.java:78)
marquez-api | ! at marquez.db.DbMigration.migrateDbOrError(DbMigration.java:33)
marquez-api | ! at marquez.MarquezApp.run(MarquezApp.java:109)
marquez-api | ! at marquez.MarquezApp.run(MarquezApp.java:51)
marquez-api | ! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:67)
marquez-api | ! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:98)
marquez-api | ! at io.dropwizard.cli.Cli.run(Cli.java:78)
marquez-api | ! at io.dropwizard.Application.run(Application.java:94)
marquez-api | ! at marquez.MarquezApp.main(MarquezApp.java:63)
marquez-api | INFO [2024-07-29 18:26:59,229] marquez.MarquezApp: Stopping app...
marquez-api exited with code 1
Thanks for opening your first issue in the Marquez project! Please be sure to follow the issue template!
Hi Team,.
I have resolved this issue by myself by manipulating current api image you can close this