[Bug] [dolphin-api] api start failed in k8s cause org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler failed
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
7:15:14.812 [main] ERROR org.apache.dolphinscheduler.dao.datasource.ConnectionFactory - Initializing ConnectionFactory error
java.lang.IllegalArgumentException: Parameter 'dataSource' must not be null
at org.apache.ibatis.mapping.Environment.<init>(Environment.java:39)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getSqlSessionFactory(ConnectionFactory.java:92)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:57)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:43)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory$ConnectionFactoryHolder.<clinit>(ConnectionFactory.java:48)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getInstance(ConnectionFactory.java:52)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getDataSource(UpgradeDao.java:82)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:78)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:39)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:59)
at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:37)
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getInstance(ConnectionFactory.java:52)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getDataSource(UpgradeDao.java:82)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:78)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:39)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:59)
at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:37)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Parameter 'dataSource' must not be null
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:61)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:43)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory$ConnectionFactoryHolder.<clinit>(ConnectionFactory.java:48)
... 6 more
Caused by: java.lang.IllegalArgumentException: Parameter 'dataSource' must not be null
at org.apache.ibatis.mapping.Environment.<init>(Environment.java:39)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getSqlSessionFactory(ConnectionFactory.java:92)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:57)
... 8 more
What you expected to happen
api start normally
How to reproduce
7:15:14.812 [main] ERROR org.apache.dolphinscheduler.dao.datasource.ConnectionFactory - Initializing ConnectionFactory error
java.lang.IllegalArgumentException: Parameter 'dataSource' must not be null
at org.apache.ibatis.mapping.Environment.<init>(Environment.java:39)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getSqlSessionFactory(ConnectionFactory.java:92)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:57)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:43)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory$ConnectionFactoryHolder.<clinit>(ConnectionFactory.java:48)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getInstance(ConnectionFactory.java:52)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getDataSource(UpgradeDao.java:82)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:78)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:39)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:59)
at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:37)
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getInstance(ConnectionFactory.java:52)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getDataSource(UpgradeDao.java:82)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:78)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:39)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:59)
at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:37)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Parameter 'dataSource' must not be null
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:61)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:43)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory$ConnectionFactoryHolder.<clinit>(ConnectionFactory.java:48)
... 6 more
Caused by: java.lang.IllegalArgumentException: Parameter 'dataSource' must not be null
at org.apache.ibatis.mapping.Environment.<init>(Environment.java:39)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getSqlSessionFactory(ConnectionFactory.java:92)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:57)
... 8 more
Anything else
7:15:14.812 [main] ERROR org.apache.dolphinscheduler.dao.datasource.ConnectionFactory - Initializing ConnectionFactory error
java.lang.IllegalArgumentException: Parameter 'dataSource' must not be null
at org.apache.ibatis.mapping.Environment.<init>(Environment.java:39)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getSqlSessionFactory(ConnectionFactory.java:92)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:57)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:43)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory$ConnectionFactoryHolder.<clinit>(ConnectionFactory.java:48)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getInstance(ConnectionFactory.java:52)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getDataSource(UpgradeDao.java:82)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:78)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:39)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:59)
at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:37)
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getInstance(ConnectionFactory.java:52)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getDataSource(UpgradeDao.java:82)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:78)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.initUpgradeDao(DolphinSchedulerManager.java:39)
at org.apache.dolphinscheduler.dao.upgrade.DolphinSchedulerManager.<init>(DolphinSchedulerManager.java:59)
at org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler.main(CreateDolphinScheduler.java:37)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Parameter 'dataSource' must not be null
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:61)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:43)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory$ConnectionFactoryHolder.<clinit>(ConnectionFactory.java:48)
... 6 more
Caused by: java.lang.IllegalArgumentException: Parameter 'dataSource' must not be null
at org.apache.ibatis.mapping.Environment.<init>(Environment.java:39)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.getSqlSessionFactory(ConnectionFactory.java:92)
at org.apache.dolphinscheduler.dao.datasource.ConnectionFactory.<init>(ConnectionFactory.java:57)
... 8 more
Version
dev
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Hi:
- Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
- In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
- If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/en-us/community/development/subscribe.html ,Then write the issue URL in the email content and send question to [email protected].
This issue may also exist when upgrade DS version.
@kezhenxu94 The code I submitted disappeared.....
the envs in startup-init-conf.sh will not take effect due to datasource.properties.tpl deleted in dev branch
export DATABASE_TYPE=${DATABASE_TYPE:-"postgresql"} export DATABASE_DRIVER=${DATABASE_DRIVER:-"org.postgresql.Driver"} export DATABASE_HOST=${DATABASE_HOST:-"127.0.0.1"} export DATABASE_PORT=${DATABASE_PORT:-"5432"} export DATABASE_USERNAME=${DATABASE_USERNAME:-"root"} export DATABASE_PASSWORD=${DATABASE_PASSWORD:-"root"} export DATABASE_DATABASE=${DATABASE_DATABASE:-"dolphinscheduler"} export DATABASE_PARAMS=${DATABASE_PARAMS:-"characterEncoding=utf8"}
@kezhenxu94 The code I submitted disappeared.....
@Narcasserun your code is deleted by this commit https://github.com/apache/dolphinscheduler/commit/4114cb07f64950f88ffb4aa8a4ecc4815f32d76b
I'll take a look at this