You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "QiMingChina (via GitHub)" <gi...@apache.org> on 2025/01/16 09:16:54 UTC
[I] [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable) [seatunnel]
QiMingChina opened a new issue, #8540:
URL: https://github.com/apache/seatunnel/issues/8540
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### What happened
从clickhouse查询数据后写入starrocks报错

mysql jdbc文件已经放入lib文件

### SeaTunnel Version
版本2.3.2
### SeaTunnel Config
```conf
env {
parallelism = 5
job.mode = "BATCH"
checkpoint.interval = 10000
}
source {
Clickhouse {
host = "IP:8123"
database = "default"
sql = "select * from tb where day_time = '20230713' limit 20"
username = "default"
password = "XXX"
result_table_name = "tb"
}
}
sink {
StarRocks {
nodeUrls = ["IP:8030"]
base-url = "jdbc:mysql://IP:9030/db_play_quality"
username = root
password = "XXX"
database = "db_play_quality"
table = "tb"
batch_max_rows = 500
max_retries = 3
starrocks.config = {
format = "JSON"
strip_outer_array = true
}
}
}
```
### Running Command
```shell
$SEATUNNEL_HOME/bin/seatunnel.sh --config $SEATUNNEL_HOME/config/play_quality_ck_2_sr.config -e local
```
### Error Exception
```log
Caused by: org.apache.seatunnel.api.table.catalog.exception.CatalogException: ErrorCode:[API-03], ErrorDescription:[Catalog initialize failed] - Failed connecting to jdbc:mysql://IPe:9030/db_play_quality via JDBC.
at org.apache.seatunnel.connectors.seatunnel.starrocks.catalog.StarRocksCatalog.open(StarRocksCatalog.java:384)
at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.lambda$getCatalogTables$0(CatalogTableUtil.java:123)
at java.util.Optional.map(Optional.java:215)
at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:119)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSink(MultipleTableJobConfigParser.java:519)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:170)
at org.apache.seatunnel.engine.client.job.JobExecutionEnvironment.getLogicalDag(JobExecutionEnvironment.java:155)
at org.apache.seatunnel.engine.client.job.JobExecutionEnvironment.execute(JobExecutionEnvironment.java:147)
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:140)
... 2 more
Caused by: com.mysql.cj.jdbc.exceptions.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 com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.apache.seatunnel.connectors.seatunnel.starrocks.catalog.StarRocksCatalog.open(StarRocksCatalog.java:379)
... 10 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: 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.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89)
at com.mysql.cj.NativeSession.connect(NativeSession.java:120)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:948)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:818)
... 16 more
Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable)
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.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63)
... 19 more
```
### Zeta or Flink or Spark Version
_No response_
### Java or Scala Version
_No response_
### Screenshots
_No response_
### 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](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@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable) [seatunnel]
Posted by "liunaijie (via GitHub)" <gi...@apache.org>.
liunaijie commented on issue #8540:
URL: https://github.com/apache/seatunnel/issues/8540#issuecomment-2595086055

Hi, the log has show the error message. You need check the jdbc url and network connectivity
--
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@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable) [seatunnel]
Posted by "QiMingChina (via GitHub)" <gi...@apache.org>.
QiMingChina closed issue #8540: [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable)
URL: https://github.com/apache/seatunnel/issues/8540
--
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@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable) [seatunnel]
Posted by "QiMingChina (via GitHub)" <gi...@apache.org>.
QiMingChina commented on issue #8540:
URL: https://github.com/apache/seatunnel/issues/8540#issuecomment-2595125369
>  Hi, the log has show the error message. You need check the jdbc url and network connectivity
--
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@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable) [seatunnel]
Posted by "QiMingChina (via GitHub)" <gi...@apache.org>.
QiMingChina closed issue #8540: [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable)
URL: https://github.com/apache/seatunnel/issues/8540
--
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@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable) [seatunnel]
Posted by "QiMingChina (via GitHub)" <gi...@apache.org>.
QiMingChina commented on issue #8540:
URL: https://github.com/apache/seatunnel/issues/8540#issuecomment-2595126649
>  Hi, the log has show the error message. You need check the jdbc url and network connectivity
--
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@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable) [seatunnel]
Posted by "QiMingChina (via GitHub)" <gi...@apache.org>.
QiMingChina commented on issue #8540:
URL: https://github.com/apache/seatunnel/issues/8540#issuecomment-2595130877
>  Hi, the log has show the error message. You need check the jdbc url and network connectivity
网络是可以ping通的

难道是jdbc这里写错了?
jdbc:mysql://IP:9030/db_play_quality
--
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@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable) [seatunnel]
Posted by "QiMingChina (via GitHub)" <gi...@apache.org>.
QiMingChina commented on issue #8540:
URL: https://github.com/apache/seatunnel/issues/8540#issuecomment-2595664311
> > >  Hi, the log has show the error message. You need check the jdbc url and network connectivity
> >
> >
> > 网络是可以ping通的
> > 
> > 难道是jdbc这里写错了? jdbc:mysql://IP:9030/db_play_quality
>
> You can use telnet to check 9030 port. Or maybe you need add `useSSL=false` parameter
确实是防火墙的问题,谢谢
--
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@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] clickhouse数据写入starrocks报错java.net.NoRouteToHostException: No route to host (Host unreachable) [seatunnel]
Posted by "liunaijie (via GitHub)" <gi...@apache.org>.
liunaijie commented on issue #8540:
URL: https://github.com/apache/seatunnel/issues/8540#issuecomment-2595143328
> >  Hi, the log has show the error message. You need check the jdbc url and network connectivity
>
> 网络是可以ping通的
>
> 
>
> 难道是jdbc这里写错了? jdbc:mysql://IP:9030/db_play_quality
You can use telnet to check 9030 port
--
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@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org