-
Notifications
You must be signed in to change notification settings - Fork 286
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
Error when setting up ModelDB via Docker Compose #993
Comments
@RaduStoicescu : modeldb backend is unable to connect to postgres , can you verify it postgres container is up? I am not sure how this is done on windows but this is a list of container which needs to be up for modeldb to work correctly.
If postgres had problems coming up it should also show up earlier in the logs you shared. |
Looks like it has trouble having access to "/var/lib/postgresql/data/pgdata". I'm not sure how to create or how to set permissions for that directory inside the Docker
|
Hey @RaduStoicescu,
this is my docker-compose-all.yaml file
where I have used shared I hope you can replicate my setup and that unblocks you. If not, then let me know your Windows version and about the docker setup, and then I can help you better. |
I changed it like this and I have the same problem I have Windows 10 Business, version 1903 I have found this on docker forums, it looks like a common problem: https://forums.docker.com/t/data-directory-var-lib-postgresql-data-pgdata-has-wrong-ownership/17963
This is the error:
|
@RaduStoicescu : were you able to bring up Postgres? if so could you share the high-level steps so that we could add it to the modeldb documentation. |
Basically found a similar issue on Ubuntu 22.04 with latest docker installed
modeldb-postgres | PostgreSQL Database directory appears to contain a database; Skipping initialization
modeldb-postgres |
modeldb-postgres | 2024-04-17 06:35:33.234 UTC [1] LOG: starting PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
modeldb-postgres | 2024-04-17 06:35:33.235 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
modeldb-postgres | 2024-04-17 06:35:33.235 UTC [1] LOG: listening on IPv6 address "::", port 5432
modeldb-postgres | 2024-04-17 06:35:33.236 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
modeldb-postgres | 2024-04-17 06:35:33.240 UTC [29] LOG: database system was shut down at 2024-04-17 06:24:56 UTC
modeldb-postgres | 2024-04-17 06:35:33.248 UTC [1] LOG: database system is ready to accept connections
modeldb-graphql | 2024/04/17 06:35:33 SERVER_HTTP_PORT : 4000
modeldb-proxy | 2024/04/17 06:35:33 MDB_ADDRESS : modeldb-backend:8085
modeldb-proxy | 2024/04/17 06:35:33 SERVER_HTTP_PORT : 8080
modeldb-proxy | 2024/04/17 06:35:33 Starting verta-backend proxy on port : 8080
modeldb-frontend | yarn run v1.22.4
modeldb-frontend | warning package.json: No license field
modeldb-frontend | $ nodemon server.js
modeldb-frontend | [nodemon] 1.19.4
modeldb-frontend | [nodemon] to restart at any time, enter `rs`
modeldb-frontend | [nodemon] watching dir(s): *.*
modeldb-frontend | [nodemon] watching extensions: js,mjs,json
modeldb-frontend | [nodemon] starting `node server.js`
modeldb-frontend | [HPM] Proxy created: / -> http://modeldb-proxy:8080
modeldb-frontend | [HPM] Proxy rewrite rule created: "^/api/v1/modeldb" ~> "/v1"
modeldb-frontend | [HPM] Proxy created: / -> http://modeldb-backend:8086
modeldb-frontend | [HPM] Proxy created: / -> http://modeldb-graphql:4000
modeldb-frontend | [HPM] Proxy rewrite rule created: "^/api/v1/graphql/" ~> "/"
Repeating...
modeldb-backend | {"thread":"main","level":"DEBUG","loggerName":"ai.verta.modeldb.utils.ModelDBHibernateUtil","message":"ModelDBHibernateUtil getSessionFactory() retrying for DB connection after 2560 millisecond ","endOfBatch":false,"loggerFqcn":"org.apache.logging.log4j.spi.AbstractLogger","instant":{"epochSecond":1713335805,"nanoOfSecond":539000000},"threadId":1,"threadPriority":5,"hostName":"9c2449b11b85","kubernetes.podIP":""}
modeldb-backend | {"thread":"main","level":"WARN","loggerName":"ai.verta.modeldb.utils.ModelDBHibernateUtil","message":"ModelDBHibernateUtil checkDBConnection() got error ","thrown":{"commonElementCount":0,"localizedMessage":"org.mariadb.jdbc.Driver","message":"org.mariadb.jdbc.Driver","name":"java.lang.ClassNotFoundException","extendedStackTrace":"java.lang.ClassNotFoundException: org.mariadb.jdbc.Driver\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:435) ~[?:?]\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:589) ~[?:?]\n\tat org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:89) ~[modeldb-1.0-SNAPSHOT-client-build.jar:1.0-SNAPSHOT]\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]\n\tat java.lang.Class.forName0(Native Method) ~[?:?]\n\tat java.lang.Class.forName(Class.java:340) ~[?:?]\n\tat ai.verta.modeldb.utils.ModelDBHibernateUtil.checkDBConnection(ModelDBHibernateUtil.java:477) [classes!/:1.0-SNAPSHOT]\n\tat ai.verta.modeldb.utils.ModelDBHibernateUtil.checkDBConnectionInLoop(ModelDBHibernateUtil.java:325) [classes!/:1.0-SNAPSHOT]\n\tat ai.verta.modeldb.utils.ModelDBHibernateUtil.createOrGetSessionFactory(ModelDBHibernateUtil.java:240) [classes!/:1.0-SNAPSHOT]\n\tat ai.verta.modeldb.App.initializeServicesBaseOnDataBase(App.java:368) [classes!/:1.0-SNAPSHOT]\n\tat ai.verta.modeldb.App.main(App.java:263) [classes!/:1.0-SNAPSHOT]\n\tat jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]\n\tat jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]\n\tat jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]\n\tat java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [modeldb-1.0-SNAPSHOT-client-build.jar:1.0-SNAPSHOT]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [modeldb-1.0-SNAPSHOT-client-build.jar:1.0-SNAPSHOT]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [modeldb-1.0-SNAPSHOT-client-build.jar:1.0-SNAPSHOT]\n\tat org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) [modeldb-1.0-SNAPSHOT-client-build.jar:1.0-SNAPSHOT]\n"},"endOfBatch":false,"loggerFqcn":"org.apache.logging.log4j.spi.AbstractLogger","instant":{"epochSecond":1713335805,"nanoOfSecond":541000000},"threadId":1,"threadPriority":5,"hostName":"9c2449b11b85","kubernetes.podIP":""}
Try adding a Project on UI
modeldb-frontend | /api/v1/modeldb/hydratedData/findHydratedProjects
modeldb-frontend | Requesting /api/v1/modeldb/hydratedData/findHydratedProjects
modeldb-frontend | /static/media/Verta_logo.b2461278.svg
modeldb-frontend | Returning 503 Service Unavailable; 261b sent modeldb-frontend | /favicon.png modeldb-frontend | /api/v1/modeldb/hydratedData/findHydratedProjects
modeldb-frontend | Requesting /api/v1/modeldb/hydratedData/findHydratedProjects
modeldb-frontend | Returning 503 Service Unavailable; 261b sent |
On Windows 10 when running
docker-compose -f docker-compose-all.yaml up
I get the following:modeldb-backend | {"thread":"main","level":"DEBUG","loggerName":"ai.verta.modeldb.utils.ModelDBHibernateUtil","message":"ModelDBHibernateUtil getSessionFactory() retrying for DB connection after 2560 millisecond ","endOfBatch":false,"loggerFqcn":"org.apache.logging.log4j.spi.AbstractLogger","instant":{"epochSecond":1594737612,"nanoOfSecond":72000000},"threadId":1,"threadPriority":5,"hostName":"03fd2e8e7248","kubernetes.podIP":""} modeldb-backend | {"thread":"main","level":"WARN","loggerName":"ai.verta.modeldb.utils.ModelDBHibernateUtil","message":"ModelDBHibernateUtil checkDBConnection() got error ","thrown":{"commonElementCount":0,"localizedMessage":"The connection attempt failed.","message":"The connection attempt failed.","name":"org.postgresql.util.PSQLException","cause":{"commonElementCount":19,"localizedMessage":"Connect timed out","message":"Connect timed out","name":"java.net.SocketTimeoutException","extendedStackTrace":"java.net.SocketTimeoutException: Connect timed out\n\tat sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546) ~[?:?]\n\tat sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[?:?]\n\tat java.net.SocksSocketImpl.connect(SocksSocketImpl.java:333) ~[?:?]\n\tat java.net.Socket.connect(Socket.java:648) ~[?:?]\n\tat org.postgresql.core.PGStream.<init>(PGStream.java:75) ~[postgresql-42.2.6.jar!/:42.2.6]\n\tat org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:91) ~[postgresql-42.2.6.jar!/:42.2.6]\n\tat org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192) ~[postgresql-42.2.6.jar!/:42.2.6]\n"},"extendedStackTrace":"org.postgresql.util.PSQLException: The connection attempt failed.\n\tat org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:292) ~[postgresql-42.2.6.jar!/:42.2.6]\n\tat org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.2.6.jar!/:42.2.6]\n\tat org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195) ~[postgresql-42.2.6.jar!/:42.2.6]\n\tat org.postgresql.Driver.makeConnection(Driver.java:458) ~[postgresql-42.2.6.jar!/:42.2.6]\n\tat org.postgresql.Driver.connect(Driver.java:260) ~[postgresql-42.2.6.jar!/:42.2.6]\n\tat java.sql.DriverManager.getConnection(DriverManager.java:677) ~[java.sql:?]\n\tat java.sql.DriverManager.getConnection(DriverManager.java:228) ~[java.sql:?]\n\tat ai.verta.modeldb.utils.ModelDBHibernateUtil.checkDBConnection(ModelDBHibernateUtil.java:483) [classes!/:1.0-SNAPSHOT]\n\tat ai.verta.modeldb.utils.ModelDBHibernateUtil.checkDBConnectionInLoop(ModelDBHibernateUtil.java:325) [classes!/:1.0-SNAPSHOT]\n\tat ai.verta.modeldb.utils.ModelDBHibernateUtil.createOrGetSessionFactory(ModelDBHibernateUtil.java:240) [classes!/:1.0-SNAPSHOT]\n\tat ai.verta.modeldb.App.initializeServicesBaseOnDataBase(App.java:363) [classes!/:1.0-SNAPSHOT]\n\tat ai.verta.modeldb.App.main(App.java:260) [classes!/:1.0-SNAPSHOT]\n\tat jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]\n\tat jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]\n\tat jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]\n\tat java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [modeldb-1.0-SNAPSHOT-client-build.jar:1.0-SNAPSHOT]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [modeldb-1.0-SNAPSHOT-client-build.jar:1.0-SNAPSHOT]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [modeldb-1.0-SNAPSHOT-client-build.jar:1.0-SNAPSHOT]\n\tat org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) [modeldb-1.0-SNAPSHOT-client-build.jar:1.0-SNAPSHOT]\nCaused by: java.net.SocketTimeoutException: Connect timed out\n\tat sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546) ~[?:?]\n\tat sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[?:?]\n\tat java.net.SocksSocketImpl.connect(SocksSocketImpl.java:333) ~[?:?]\n\tat java.net.Socket.connect(Socket.java:648) ~[?:?]\n\tat org.postgresql.core.PGStream.<init>(PGStream.java:75) ~[postgresql-42.2.6.jar!/:42.2.6]\n\tat org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:91) ~[postgresql-42.2.6.jar!/:42.2.6]\n\tat org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192) ~[postgresql-42.2.6.jar!/:42.2.6]\n\t... 19 more\n"},"endOfBatch":false,"loggerFqcn":"org.apache.logging.log4j.spi.AbstractLogger","instant":{"epochSecond":1594737622,"nanoOfSecond":77000000},"threadId":1,"threadPriority":5,"hostName":"03fd2e8e7248","kubernetes.podIP":""}
The text was updated successfully, but these errors were encountered: