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 2022/05/01 18:43:42 UTC

[GitHub] [dolphinscheduler] rockfang opened a new issue, #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

rockfang opened a new issue, #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   create MySQL datasource failed:
   ![createMysqlfailed](https://user-images.githubusercontent.com/16065427/166159700-8670e4da-2720-46fe-899a-e8bb3364b536.png)
   
   
   
   ### What you expected to happen
   
   I want to create mysql datasource in DataSource page
   
   ### How to reproduce
   
   1. choose postgresql as DS metabase
   2. start DS in standalone mode or normal mode
   3. create an avaliable mysql datasouce in DataSource page
   4. click Test Connect button on confirm button
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   dev
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] rockfang commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
rockfang commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1115821681

   > 
   @caishunfeng Thx for reply.
   timezone config in application.yaml is  on, and I did't changed it. 
   ![time-zone](https://user-images.githubusercontent.com/16065427/166418774-834ccfb0-ad39-4d75-8649-141c45913f30.png)
   actually I think the connect error is from MySQL connect, I don't know whether it will read from the spring time-zone config.
   
   I just retry a standalone server. it occurs again


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] rockfang commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
rockfang commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1116897917

   My JDBC driver is 8.0.16. 
   I cloned the latest Dev and retryed it just now.  the error occures again.
   did you configured the `default-time-zone` in your mysql config file ?
   I add `default-time-zone` config in my target mysql config file `my.ini`, it works. but it may not a good way to solve it


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] SbloodyS closed issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
SbloodyS closed issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed
URL: https://github.com/apache/dolphinscheduler/issues/9860


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] rockfang commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
rockfang commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1114314734

   I changed the `mysql-connector-java` dependency scope front 'test' to 'compile', it workd.
   [pom.xml](https://github.com/apache/dolphinscheduler/blob/f9f91000fd69caa8f70a9ea12993f7c432d6d30b/pom.xml#L557).
   
   The doc suggests us to use 'compile' only when we use mysql as DS metabase, but the DataSource Module should be independent of DS metabase. So changed `mysql-connector-java`  to 'compile' may be reasonable.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] rockfang commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
rockfang commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1114459668

   > Please refer to the mysql section of the faq document. https://dolphinscheduler.apache.org/en-us/docs/release/faq.html
   > 
   > I'' close this issue for now. You can reopen it if you have further questions.
   
   got it. It's all about the license.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] SbloodyS commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
SbloodyS commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1114446500

   Please refer to the mysql section of the faq document.
   https://dolphinscheduler.apache.org/en-us/docs/release/faq.html
   
   
   I'' close this issue for now. You can reopen it if you have further questions.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] caishunfeng commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
caishunfeng commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1116068980

   > You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
   
   ![image](https://user-images.githubusercontent.com/11962619/166457085-a4d98a02-73eb-499a-9776-43d747823e18.png)
   
   Which version of JDBC are you using? I try to start standalone server by IDEA and the MySQL datasource connection is OK. `mysql.connector.version` is 8.0.16.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] rockfang commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
rockfang commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1114308880

   The exception thrown by this line [https://github.com/apache/dolphinscheduler/blob/f9f91000fd69caa8f70a9ea12993f7c432d6d30b/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/provider/JDBCDataSourceProvider.java#L96](https://github.com/apache/dolphinscheduler/blob/f9f91000fd69caa8f70a9ea12993f7c432d6d30b/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/provider/JDBCDataSourceProvider.java#L96)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] rockfang commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
rockfang commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1114307949

   I change my DS from standalone mode(just start StandaloneServer ) to normal mode(api + master + worker). it still not work.
   
   the error meesage is :
   `"Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader"`


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] rockfang commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
rockfang commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1114472396

   @SbloodyS Hi,
   still connect MySQL datasource failed cause by msssing serverTimezone field.
   ![connectfailed](https://user-images.githubusercontent.com/16065427/166181268-12166a64-2876-44cd-9f65-26997683d3f2.png)
   
   **Reproduce:**
   1. start DS with DEV branch use normal mode (api + master + worker)
   2. create a MySQL datasource
   
   **Anthing Else**
   The exception is from this line [CommonDataSourceClient.java-line96](https://github.com/apache/dolphinscheduler/blob/f9f91000fd69caa8f70a9ea12993f7c432d6d30b/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/client/CommonDataSourceClient.java#L96)
   
   `java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.`
   
   **Solution Suggest**
   when I add 'serverTimezone' as jdbc connnect params from **Frontend**. it works.
   ![mysqlconnectsuccess](https://user-images.githubusercontent.com/16065427/166182234-cc010ddc-01f2-445b-9a17-a18d670197c8.png)
   
   So I suggest to`add serverTimezone params by default from frontend when create MySQL datasource` if needed.
   The `serverTimezone ` will from custom choose 
   ![timezone](https://user-images.githubusercontent.com/16065427/166182657-da0346bb-0d00-4ff0-94db-645f0f0225bc.png)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1114307040

   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 [join our slack](https://join.slack.com/t/asf-dolphinscheduler/shared_invite/zt-omtdhuio-_JISsxYhiVsltmC5h38yfw) and send your question to channel `#troubleshooting`


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] SbloodyS commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
SbloodyS commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1114497038

   cc @caishunfeng 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] caishunfeng commented on issue #9860: [Bug] [DEV][DataSource] can't create mysql datasource. connect failed

Posted by GitBox <gi...@apache.org>.
caishunfeng commented on issue #9860:
URL: https://github.com/apache/dolphinscheduler/issues/9860#issuecomment-1115773329

   > @SbloodyS Hi, still connect MySQL datasource failed cause by msssing serverTimezone field. ![connectfailed](https://user-images.githubusercontent.com/16065427/166181268-12166a64-2876-44cd-9f65-26997683d3f2.png)
   > 
   > **Reproduce:**
   > 
   > 1. start DS with DEV branch use normal mode (api + master + worker)
   > 2. create a MySQL datasource
   > 
   > **Anthing Else** The exception is from this line [CommonDataSourceClient.java-line96](https://github.com/apache/dolphinscheduler/blob/f9f91000fd69caa8f70a9ea12993f7c432d6d30b/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/client/CommonDataSourceClient.java#L96)
   > 
   > `java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.`
   > 
   > **Solution Suggest** when I add 'serverTimezone' as jdbc connnect params from **Frontend**. it works. ![mysqlconnectsuccess](https://user-images.githubusercontent.com/16065427/166182234-cc010ddc-01f2-445b-9a17-a18d670197c8.png)
   > 
   > So I suggest to`add serverTimezone params by default from frontend when create MySQL datasource` if needed. The `serverTimezone ` will from custom choose ![timezone](https://user-images.githubusercontent.com/16065427/166182657-da0346bb-0d00-4ff0-94db-645f0f0225bc.png)
   
   Hi @rockfang please check the timezone config in spring application.yaml, or env/dolphinscheduler_env.sh if you start in sh command.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org