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 2021/07/01 02:36:16 UTC
[GitHub] [dolphinscheduler] wangmingzhiJohn opened a new issue #5729: [Question] Failed to connect to mysql by jdbc
wangmingzhiJohn opened a new issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729
**Describe the question**
I used the cluster mode to deploy DS.
When I execute `bash script/create-dolphinscheduler.sh` to init the database, errors came out:
```
wangmingzhi@xxx:~/apache-dolphinscheduler-1.3.6-bin2$ bash script/create-dolphinscheduler.sh
_ _ |_ _ _|_. ___ _ | _
| | |\/|_)(_| | |_\ |_)||_|_\
/ |
3.2.0
10:20:45.942 [main] INFO ru.yandex.clickhouse.ClickHouseDriver - Driver registered
10:20:46.106 [main] ERROR com.alibaba.druid.pool.DruidDataSource - init datasource error, url: jdbc:mysql://202.168.126.69:3306/dolphinscheduler?characterEncoding=UTF-8&allowMultiQueries=true
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:342)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2197)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2230)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2025)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:778)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
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 com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:109)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.getCurrentDbType(UpgradeDao.java:79)
at org.apache.dolphinscheduler.dao.upgrade.UpgradeDao.<clinit>(UpgradeDao.java:48)
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.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:301)
... 23 common frames omitted
```
Now I deploy everything on the single machine to test cluster deployment. If everything is ok, then I will add more machines in.
Mysql's username and password is correct. I don't know why this happened
**Which version of DolphinScheduler:**
-[1.3.6-release]
--
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] wangmingzhiJohn commented on issue #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
wangmingzhiJohn commented on issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729#issuecomment-871870692
More information, I am concerned about the mysql status, cause below:
```
wangmingzhi@xxx:~/apache-dolphinscheduler-1.3.6-bin2$ systemctl status mysqld
● mysqld.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
wangmingzhi@xxx:~/apache-dolphinscheduler-1.3.6-bin2$ systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-06-07 10:20:31 CST; 3 weeks 3 days ago
Main PID: 43105 (mysqld)
Tasks: 32
Memory: 156.1M
CPU: 4min 18.896s
CGroup: /system.slice/mysql.service
└─43105 /usr/sbin/mysqld
```
It seems that mysqld is not available, but I can login in mysql and query about the database:
```
wangmingzhi@xxx:~/apache-dolphinscheduler-1.3.6-bin2$ mysql -uds_user -pdolphinscheduler
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 114
Server version: 5.7.33-0ubuntu0.16.04.1 (Ubuntu)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| dolphinscheduler |
+--------------------+
2 rows in set (0.00 sec)
mysql> use dolphinscheduler;
Database changed
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.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] tinyking commented on issue #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
tinyking commented on issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729#issuecomment-871889716
@wangmingzhiJohn Are you confirmed your mysql config. Is it support 202.168.126.69 or % for the mysql user.
--
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] CalvinKirs closed issue #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
CalvinKirs closed issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729
--
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] tinyking commented on issue #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
tinyking commented on issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729#issuecomment-871908192
> I changed the bind-address to 0.0.0.0 and it worked!
@wangmingzhiJohn bind-address is mean only support 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] wangmingzhiJohn commented on issue #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
wangmingzhiJohn commented on issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729#issuecomment-871888717
@ruanwenjun
```
wangmingzhi@xxx:~/apache-dolphinscheduler-1.3.6-bin2$ telnet 202.168.126.69 3306
Trying 202.168.126.69...
telnet: Unable to connect to remote host: Connection refused
```
--
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] ruanwenjun commented on issue #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729#issuecomment-871876557
@wangmingzhiJohn Hi, you mean you can deploy on one machine, but now you can't add more machines, right?
It seems caused by `Connection refused `, you can check if you can connect to `mysql` by `telnet` on your new machine or check if the firewall is correct on the machine which you deployed `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.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] wangmingzhiJohn commented on issue #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
wangmingzhiJohn commented on issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729#issuecomment-871887145
@ruanwenjun No. I mean I want to deploy on more machines if I can deploy on one machine successfully by Cluster Deployment Method.
And I just modified the datasource.url in datasource.properties to 127.0.0.1, then it worked.
I am confused about that. The deployed machine's ip is 202.168.126.69. What is different between ip and 127.0.0.1?
--
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] wangmingzhiJohn commented on issue #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
wangmingzhiJohn commented on issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729#issuecomment-871895782
I changed the bind-address to 0.0.0.0 and it worked!
--
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 #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729#issuecomment-871866291
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/zh-cn/community/development/subscribe.html ,Then write the issue URL in the email content and send question to dev@dolphinscheduler.apache.org.
--
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] wangmingzhiJohn commented on issue #5729: [Question] Failed to connect to mysql by jdbc
Posted by GitBox <gi...@apache.org>.
wangmingzhiJohn commented on issue #5729:
URL: https://github.com/apache/dolphinscheduler/issues/5729#issuecomment-871892000
@tinyking
![image](https://user-images.githubusercontent.com/84900511/124061708-f3173780-da61-11eb-92c9-19df6418eea5.png)
I supposed that the bind-address is the cause of problem. Should I changed it to 0.0.0.0?
--
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