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

Bug: Controller fails to init with MySQL #376

Open
tetra12 opened this issue Nov 10, 2023 · 2 comments
Open

Bug: Controller fails to init with MySQL #376

tetra12 opened this issue Nov 10, 2023 · 2 comments

Comments

@tetra12
Copy link

tetra12 commented Nov 10, 2023

Error: Failed to set transaction isolation

Related to #15

My Setup:
Remote MySQL: v8.0.35
Controller: v1.25.0

Can connect to the mysql server with: mysql -h mysql -u linstor -p from the linstor controller host

cat /etc/linstor/linstor.toml
[db]
  user = "linstor"
  password = "foo-foo"
  connection_url = "jdbc:mysql://mysql/linstor?createDatabaseIfNotExist=true"
  #connection_url = "jdbc:mysql://mysql:3306/linstor" // doesn't work either
@tetra12
Copy link
Author

tetra12 commented Nov 10, 2023

Application:                        LINBIT® LINSTOR
Module:                             Controller
Version:                            1.25.0
Build ID:                           ac6be8b59c99ae4157b4368df646cf530444d70f
Build time:                         2023-10-25T04:33:26+00:00
Error time:                         2023-11-10 16:25:58
Node:                                mon

Category:                           LinStorException
Class name:                         SystemServiceStartException
Class canonical name:               com.linbit.SystemServiceStartException
Generated at:                       Method 'initialize', Source file 'DbConnectionPoolInitializer.java', Line #69

Error message:                      Database initialization error

ErrorContext:
Call backtrace:

   Method                                   Native Class:Line number
    setTransactionIsolation                  N      com.linbit.linstor.dbcp.DbConnectionPool:548
    migrate                                  N      com.linbit.linstor.dbcp.DbConnectionPool:213
    initialize                               N      com.linbit.linstor.dbcp.DbConnectionPoolInitializer:61
    startSystemServices                      N      com.linbit.linstor.core.ApplicationLifecycleManager:87
    start                                    N      com.linbit.linstor.core.Controller:361
    main                                     N      com.linbit.linstor.core.Controller:609

Caused by:
==========

Category:                           Exception
Class name:                         SQLException
Class canonical name:               java.sql.SQLException
Generated at:                       Method 'getConnection', Source file 'DriverManager.java', Line #702

Error message:                      No suitable driver found for jdbc:mysql://mysql/linstor?createDatabaseIfNotExist=true

Call backtrace:
 Method                                   Native Class:Line number
    getConnection                            N      java.sql.DriverManager:702
    getConnection                            N      java.sql.DriverManager:189
    createConnection                         N      org.apache.commons.dbcp2.DriverManagerConnectionFactory:123
    makeObject                               N      org.apache.commons.dbcp2.PoolableConnectionFactory:355
    create                                   N      org.apache.commons.pool2.impl.GenericObjectPool:889
    borrowObject                             N      org.apache.commons.pool2.impl.GenericObjectPool:424
    borrowObject                             N      org.apache.commons.pool2.impl.GenericObjectPool:349
    getConnection                            N      org.apache.commons.dbcp2.PoolingDataSource:134
    setTransactionIsolation                  N      com.linbit.linstor.dbcp.DbConnectionPool:540
    migrate                                  N      com.linbit.linstor.dbcp.DbConnectionPool:213
    initialize                               N      com.linbit.linstor.dbcp.DbConnectionPoolInitializer:61
    startSystemServices                      N      com.linbit.linstor.core.ApplicationLifecycleManager:87
    start                                    N      com.linbit.linstor.core.Controller:361
    main                                     N      com.linbit.linstor.core.Controller:609

@ghernadi
Copy link
Contributor

The error message only states that you are missing the JDBC driver for mysql. Please get the corresponding .jar file, and put it into /usr/share/linstor-server/lib/ on the controller.

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

2 participants