Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection error while using PostgreSQL and Marquez. #2848

Closed
blackhawlk opened this issue Jul 2, 2024 · 5 comments · Fixed by #2957
Closed

Connection error while using PostgreSQL and Marquez. #2848

blackhawlk opened this issue Jul 2, 2024 · 5 comments · Fixed by #2957

Comments

@blackhawlk
Copy link

Hi All,

I really appreciate this repository and would love to use it for understanding the data lineage aspect!
Last few days, I've been trying to get the marquez-api Docker image up and running via the docker-compose (docker-compose up -d) command but whatever I try, it does not work.

It returns the following errors in Docker Desktop:

INFO [2024-07-02 06:04:08,330] org.eclipse.jetty.util.log: Logging initialized @3419ms to org.eclipse.jetty.util.log.Slf4jLog
INFO [2024-07-02 06:04:08,699] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: /
INFO [2024-07-02 06:04:08,717] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: /
INFO [2024-07-02 06:04:08,718] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: graphql-playground for path /graphql-playground/*
INFO [2024-07-02 06:04:08,780] marquez.MarquezApp: Running startup actions...
INFO [2024-07-02 06:04:09,029] org.flywaydb.core.internal.license.VersionPrinter: Flyway Community Edition 8.5.13 by Redgate
INFO [2024-07-02 06:04:09,029] org.flywaydb.core.internal.license.VersionPrinter: See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#8.5.13
INFO [2024-07-02 06:04:09,029] org.flywaydb.core.internal.license.VersionPrinter:
ERROR [2024-07-02 06:04:20,452] org.apache.tomcat.jdbc.pool.ConnectionPool: Unable to create initial connections of pool.
! java.net.SocketTimeoutException: Connect timed out
! at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:551)
! at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602)
! at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
! at java.base/java.net.Socket.connect(Socket.java:633)
! at org.postgresql.core.PGStream.createSocket(PGStream.java:243)
! at org.postgresql.core.PGStream.(PGStream.java:98)
! at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:132)
! at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:258)
! ... 26 common frames omitted
! Causing: org.postgresql.util.PSQLException: The connection attempt failed.
! at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:354)
! at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54)
! at org.postgresql.jdbc.PgConnection.(PgConnection.java:263)
! at org.postgresql.Driver.makeConnection(Driver.java:443)
! at org.postgresql.Driver.connect(Driver.java:297)
! at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:346)
! at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:227)
! at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:772)
! at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:700)
! at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:499)
! at org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:155)
! at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
! at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
! at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
! at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:48)
! at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.(JdbcConnectionFactory.java:75)
! at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:147)
! at org.flywaydb.core.Flyway.info(Flyway.java:190)
! at marquez.db.DbMigration.hasPendingDbMigrations(DbMigration.java:78)
! at marquez.db.DbMigration.migrateDbOrError(DbMigration.java:33)
! at marquez.MarquezApp.run(MarquezApp.java:109)
! at marquez.MarquezApp.run(MarquezApp.java:51)
! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:67)
! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:98)
! at io.dropwizard.cli.Cli.run(Cli.java:78)
! at io.dropwizard.Application.run(Application.java:94)
! at marquez.MarquezApp.main(MarquezApp.java:63)
INFO [2024-07-02 06:04:20,489] marquez.MarquezApp: Stopping app...

All the steps in the README.md file were used to configure the PostgreSQL database for Marquez and to set the correct environment variables and the files docker- compose.yml, marquez.yml and init-db.sh have been cross checked.
During my trouble shooting practices, I found a relatively similar issue on the issues tab - #2468

Which implies that I'm unable to establish a connection with my Postgres DB.

Could anyone please help me out?

Kind regards,

Manoj

Copy link

boring-cyborg bot commented Jul 2, 2024

Thanks for opening your first issue in the Marquez project! Please be sure to follow the issue template!

@phixMe
Copy link
Member

phixMe commented Jul 5, 2024

Hi, there is a wrapper around docker-compose that we use so we don't usually run docker compose manually.

There is a script in the readme that informs of this. I use ./docker/up.sh --build --seed to run the application without any issue.

@schandir
Copy link
Contributor

schandir commented Sep 2, 2024

I had similar issue and I fixed it by setting the default values for postgres server as localhost in the file 'marquez\marquez.dev.yml'

image

Let me know if that works for you and I can raise a PR

@phixMe
Copy link
Member

phixMe commented Oct 25, 2024

Hey, @schandir I think it would be great if you could make a PR for this...

@schandir
Copy link
Contributor

Here is the MR @phixMe #2957

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants