You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/01/13 09:55:42 UTC

[GitHub] [incubator-dolphinscheduler] Harpsichord1207 opened a new issue #1812: [QUESTION] init datasource error

Harpsichord1207 opened a new issue #1812: [QUESTION] init datasource error
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1812
 
 
   The version of DolphinScheduler is 1.2,the first time I ran `sh script/create-dolphinscheduler.sh`  and got a class not found error, then I found #1407 and downloaded a `mysql-connector-java-8.0.18.jar` to lib. The second time I ran `sh script/create-dolphinscheduler.sh`,  got the follwoing error:
   
   ```
   09:50:12.065 [main] DEBUG org.apache.commons.configuration.PropertiesConfiguration - FileName set to application-dao.properties
   09:50:12.068 [main] DEBUG org.apache.commons.configuration.ConfigurationUtils - ConfigurationUtils.locate(): base is null, name is application-dao.properties
   09:50:12.068 [main] DEBUG org.apache.commons.configuration.DefaultFileSystem - Could not locate file application-dao.properties at null: no protocol: application-dao.properties
   09:50:12.071 [main] DEBUG org.apache.commons.configuration.ConfigurationUtils - Loading configuration from the context classpath (application-dao.properties)
   09:50:12.071 [main] DEBUG org.apache.commons.configuration.PropertiesConfiguration - Base path set to file:///home/hadoop/ds-backend/conf/application-dao.properties
   09:50:12.125 [main] INFO ru.yandex.clickhouse.ClickHouseDriver - Driver registered
   Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
   09:50:12.403 [main] ERROR com.alibaba.druid.pool.DruidDataSource - init datasource error, url: jdbc:mysql://172.16.10.197:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
   java.sql.SQLException: Access denied for user 'root'@'ip-172-16-10-197.cn-northwest-1.compute.internal' (using password: NO)
           at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
           at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
           at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
           at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
           at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
           at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
           at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
           at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1578)
           at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1644)
           at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:918)
           at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300)
           at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296)
           at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:80)
           at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:45)
           at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:37)
           at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:57)
           at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:36)
   09:50:12.410 [main] ERROR com.alibaba.druid.pool.DruidDataSource - {dataSource-1} init error
   java.sql.SQLException: Access denied for user 'root'@'ip-172-16-10-197.cn-northwest-1.compute.internal' (using password: NO)
           at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
           at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
           at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
           at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
           at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
           at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
           at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
           at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1578)
           at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1644)
           at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:918)
           at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300)
           at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296)
           at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:80)
           at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:45)
           at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:37)
           at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:57)
           at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:36)
   09:50:12.410 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited
   09:50:12.410 [main] ERROR org.apache.dolphinscheduler.dao.upgrade.UpgradeDao - Access denied for user 'root'@'ip-172-16-10-197.cn-northwest-1.compute.internal' (using password: NO)
   java.sql.SQLException: Access denied for user 'root'@'ip-172-16-10-197.cn-northwest-1.compute.internal' (using password: NO)
           at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
           at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
           at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
           at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
           at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
           at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
           at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
           at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1578)
           at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1644)
           at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:918)
           at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300)
           at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296)
           at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:80)
           at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:45)
           at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:37)
           at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:57)
           at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:36)
   09:50:12.411 [main] ERROR org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler - create DolphinScheduler failed
   java.lang.NullPointerException: null
           at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initDolphinScheduler(DolphinSchedulerManager.java:65)
           at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:38)
   09:50:12.412 [Druid-ConnectionPool-Create-802600647] ERROR com.alibaba.druid.pool.DruidDataSource - create connection SQLException, url: jdbc:mysql://172.16.10.197:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8, errorCode 1045, state 28000
   java.sql.SQLException: Access denied for user 'root'@'ip-172-16-10-197.cn-northwest-1.compute.internal' (using password: NO)
           at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
           at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
           at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
           at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
           at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
           at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
           at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
           at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1578)
           at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1644)
           at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2570)
   ```
   
   The conent of application-dao.properties is (which I modified):
   ```
   # postgre
   #spring.datasource.driver-class-name=org.postgresql.Driver
   #spring.datasource.url=jdbc:postgresql://192.168.xx.xx:5432/dolphinscheduler
   # mysql
   spring.datasource.driver-class-name=com.mysql.jdbc.Driver
   spring.datasource.url=jdbc:mysql://172.16.10.197:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
   spring.datasource.username=root
   #spring.datasource.password=  # I didn't set a password for mysql
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Gene1994 commented on issue #1812: [QUESTION] init datasource error

Posted by GitBox <gi...@apache.org>.
Gene1994 commented on issue #1812: [QUESTION] init datasource error
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1812#issuecomment-575048436
 
 
   > > check if use navicat(sql client) connect ds metadata database success.
   > > ![image](https://user-images.githubusercontent.com/51317527/72309371-c6c6fa00-36b9-11ea-9ad7-ca2c2f732f23.png)
   > > ![image](https://user-images.githubusercontent.com/51317527/72309400-d5151600-36b9-11ea-9bd7-9dc030a8c5c9.png)
   > > check create sql:
   > > `CREATE DATABASE dscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON dscheduler.* TO 'dscheduler'@'%' IDENTIFIED BY 'xxxx'; GRANT ALL PRIVILEGES ON dscheduler.* TO 'dscheduler'@'localhost' IDENTIFIED BY 'xxxx'; FLUSH PRIVILEGES;`
   > > then exec: sh create-dolphinscheduler.sh
   > > tips:
   > > check root user can access this database
   > 
   > **I had another question when I init data source, is that because I start mysql through docker?**
   > 
   > `ERROR com.alibaba.druid.pool.DruidDataSource - {dataSource-1} init error java.sql.SQLException: com.mysql.jdbc.Driver at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:620) at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:874) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296) at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:80) at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:45) at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:37) at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:57) at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:36) Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:618) ... 8 common frames omitted 16:35:38.464 [main] ERROR org.apache.dolphinscheduler.dao.upgrade.UpgradeDao - com.mysql.jdbc.Driver java.sql.SQLException: com.mysql.jdbc.Driver at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:620) at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:874) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296) at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:80) at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:45) at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:37) at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:57) at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:36) Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:618) ... 8 common frames omitted `
   
   same question as  #1407 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Yeleights commented on issue #1812: [QUESTION] init datasource error

Posted by GitBox <gi...@apache.org>.
Yeleights commented on issue #1812: [QUESTION] init datasource error
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1812#issuecomment-573664235
 
 
   you can try this mysql version :
   mysql-connector-java 5.1.34 not use mysql 8
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Harpsichord1207 commented on issue #1812: [QUESTION] init datasource error

Posted by GitBox <gi...@apache.org>.
Harpsichord1207 commented on issue #1812: [QUESTION] init datasource error
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1812#issuecomment-573984700
 
 
   **Sovled by change bind-address to 127.0.0.1 in my.cnf**, thanks to @Yeleights 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Yeleights commented on issue #1812: [QUESTION] init datasource error

Posted by GitBox <gi...@apache.org>.
Yeleights commented on issue #1812: [QUESTION] init datasource error
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1812#issuecomment-575451155
 
 
   > > > check if use navicat(sql client) connect ds metadata database success.
   > > > ![image](https://user-images.githubusercontent.com/51317527/72309371-c6c6fa00-36b9-11ea-9ad7-ca2c2f732f23.png)
   > > > ![image](https://user-images.githubusercontent.com/51317527/72309400-d5151600-36b9-11ea-9bd7-9dc030a8c5c9.png)
   > > > check create sql:
   > > > `CREATE DATABASE dscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON dscheduler.* TO 'dscheduler'@'%' IDENTIFIED BY 'xxxx'; GRANT ALL PRIVILEGES ON dscheduler.* TO 'dscheduler'@'localhost' IDENTIFIED BY 'xxxx'; FLUSH PRIVILEGES;`
   > > > then exec: sh create-dolphinscheduler.sh
   > > > tips:
   > > > check root user can access this database
   > > 
   > > 
   > > **I had another question when I init data source, is that because I start mysql through docker?**
   > > `ERROR com.alibaba.druid.pool.DruidDataSource - {dataSource-1} init error java.sql.SQLException: com.mysql.jdbc.Driver at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:620) at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:874) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296) at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:80) at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:45) at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:37) at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:57) at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:36) Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:618) ... 8 common frames omitted 16:35:38.464 [main] ERROR org.apache.dolphinscheduler.dao.upgrade.UpgradeDao - com.mysql.jdbc.Driver java.sql.SQLException: com.mysql.jdbc.Driver at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:620) at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:874) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300) at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296) at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:80) at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:45) at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:37) at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:57) at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:36) Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:618) ... 8 common frames omitted `
   > 
   Problem :
   Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver 
   Solution: you should put mysql-connector-java 5.1.34 in ds /lib directory
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Harpsichord1207 commented on issue #1812: [QUESTION] init datasource error

Posted by GitBox <gi...@apache.org>.
Harpsichord1207 commented on issue #1812: [QUESTION] init datasource error
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1812#issuecomment-573964864
 
 
   I used mysql-connector-java-5.1.34.jar and got the same error; by the way mysql Server version is 5.5.62 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Yeleights closed issue #1812: [QUESTION] init datasource error

Posted by GitBox <gi...@apache.org>.
Yeleights closed issue #1812: [QUESTION] init datasource error
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1812
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Gene1994 commented on issue #1812: [QUESTION] init datasource error

Posted by GitBox <gi...@apache.org>.
Gene1994 commented on issue #1812: [QUESTION] init datasource error
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1812#issuecomment-575043922
 
 
   > check if use navicat(sql client) connect ds metadata database success.
   > ![image](https://user-images.githubusercontent.com/51317527/72309371-c6c6fa00-36b9-11ea-9ad7-ca2c2f732f23.png)
   > ![image](https://user-images.githubusercontent.com/51317527/72309400-d5151600-36b9-11ea-9bd7-9dc030a8c5c9.png)
   > check create sql:
   > `CREATE DATABASE dscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON dscheduler.* TO 'dscheduler'@'%' IDENTIFIED BY 'xxxx'; GRANT ALL PRIVILEGES ON dscheduler.* TO 'dscheduler'@'localhost' IDENTIFIED BY 'xxxx'; FLUSH PRIVILEGES;`
   > then exec: sh create-dolphinscheduler.sh
   > 
   > tips:
   > check root user can access this database
   
   
   **I had another question when I init data source, is that because I start mysql through docker?**
   
   `ERROR com.alibaba.druid.pool.DruidDataSource - {dataSource-1} init error
   java.sql.SQLException: com.mysql.jdbc.Driver
   	at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:620)
   	at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:874)
   	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300)
   	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296)
   	at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:80)
   	at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:45)
   	at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:37)
   	at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:57)
   	at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:36)
   Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
   	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   	at java.lang.Class.forName0(Native Method)
   	at java.lang.Class.forName(Class.java:264)
   	at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:618)
   	... 8 common frames omitted
   16:35:38.464 [main] ERROR org.apache.dolphinscheduler.dao.upgrade.UpgradeDao - com.mysql.jdbc.Driver
   java.sql.SQLException: com.mysql.jdbc.Driver
   	at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:620)
   	at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:874)
   	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300)
   	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296)
   	at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:80)
   	at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:45)
   	at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:37)
   	at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:57)
   	at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:36)
   Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
   	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   	at java.lang.Class.forName0(Native Method)
   	at java.lang.Class.forName(Class.java:264)
   	at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:618)
   	... 8 common frames omitted
   `

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Yeleights commented on issue #1812: [QUESTION] init datasource error

Posted by GitBox <gi...@apache.org>.
Yeleights commented on issue #1812: [QUESTION] init datasource error
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1812#issuecomment-573972164
 
 
   check if use navicat(sql client) connect ds metadata database success.
   ![image](https://user-images.githubusercontent.com/51317527/72309371-c6c6fa00-36b9-11ea-9ad7-ca2c2f732f23.png)
   ![image](https://user-images.githubusercontent.com/51317527/72309400-d5151600-36b9-11ea-9bd7-9dc030a8c5c9.png)
   check create sql: 
   `CREATE DATABASE dscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
   GRANT ALL PRIVILEGES ON dscheduler.* TO 'dscheduler'@'%' IDENTIFIED BY 'xxxx';
   GRANT ALL PRIVILEGES ON dscheduler.* TO 'dscheduler'@'localhost' IDENTIFIED BY 'xxxx';
   FLUSH PRIVILEGES;`
   then exec: sh create-dolphinscheduler.sh
   
   tips:
   check root user can access this database
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services