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

HTTPError 503, connection refused #3936

Open
hardiksraja opened this issue Jul 12, 2023 · 5 comments
Open

HTTPError 503, connection refused #3936

hardiksraja opened this issue Jul 12, 2023 · 5 comments

Comments

@hardiksraja
Copy link

hardiksraja commented Jul 12, 2023

Hi,

Am following the quick-start guide and the various examples provided, but facing an issue,

from verta import Client client = Client("http://localhost:3000")

Results in below error,

HTTPError: 503 Server Error: connection error: desc = "transport: Error while dialing dial tcp 172.18.0.3:8085: connect: connection refused" for url: http://localhost:3000/api/v1/modeldb/project/verifyConnection at 2023-07-12 10:58:34.688000 UTC

From where this IP 172.18.0.3 is fetched, not able to determine it...
Also, does this error from modeldb-backend has any role in this issue,

2023-07-12 12:53:09 {"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", .....

Any help would be appreciated; Thanks in advance

Note:

  1. Relevant docker containers are running image
  2. The UI is also up at localhost:3000, but also displays HTTPError: 503
    image
@DanMcInerney
Copy link

Same error. Mac/Windows, both fail 503. I can manually login to modeldb-backend and log in to the postgres server on modeldb-postgres. Not sure where this issue is lying.

@daviddwlee84
Copy link

Same 503 error on Windows with a different server error log.

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":1700199174,"nanoOfSecond":501000000},"threadId":1,"threadPriority":5,"hostName":"6f5ba1d1e2b2","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":1700199174,"nanoOfSecond":502000000},"threadId":1,"threadPriority":5,"hostName":"6f5ba1d1e2b2","kubernetes.podIP":""}

Simply just follow the instruction

  1. git clone https://github.com/VertaAI/modeldb.git and cd modeldb
  2. docker-compose -f docker-compose-all.yaml up
  3. Open http://localhost:3000/

@daviddwlee84
Copy link

Found the backend/config/config.yaml is using MySQL

# Database settings (type mongodb, couchbasedb, relational etc..)
database:
DBType: relational
timeout: 4
liquibaseLockThreshold: 60 #time in second
RdbConfiguration:
RdbDatabaseName: modeldb
RdbDriver: "org.mariadb.jdbc.Driver"
RdbDialect: "org.hibernate.dialect.MySQL5Dialect"
RdbUrl: "jdbc:mysql://modeldb-mysql:3306"
RdbUsername: root
RdbPassword: root
# Test Database settings (type mongodb, couchbasedb etc..)
test:
test-database:
DBType: relational
timeout: 4
liquibaseLockThreshold: 60 #time in second
RdbConfiguration:
RdbDatabaseName: modeldb-test
RdbDriver: "org.mariadb.jdbc.Driver"
RdbDialect: "org.hibernate.dialect.MySQL5Dialect"
RdbUrl: "jdbc:mysql://modeldb-mysql:3306"
RdbUsername: root
RdbPassword: root

Tried

docker compose -f docker-compose-all-mysql.yaml up

But keep spamming the same error

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":1704851705,"nanoOfSecond":23000000},"threadId":1,"threadPriority":5,"hostName":"057e8352caa2","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":1704851705,"nanoOfSecond":98000000},"threadId":1,"threadPriority":5,"hostName":"057e8352caa2","kubernetes.podIP":""}

@gopherrunning
Copy link

gopherrunning commented May 6, 2024

@daviddwlee84 I also encountered the same problem. How did you solve this problem? thanks

@daviddwlee84
Copy link

@daviddwlee84 I also encountered the same problem. How did you solve this problem? thanks

I didn't solve this. Seems the docker images are very old.

image

I am now using MLFlow as an alternative and it works quite well.

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

No branches or pull requests

4 participants