apache / linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.
https://linkis.apache.org/
Apache License 2.0
3.26k stars 1.15k forks source link

[Bug] postgresql jdbc url create connection SQLException #5129

Open xieshaoqiang opened 1 week ago

xieshaoqiang commented 1 week ago

Search before asking

Linkis Component

linkis-engineconnn-plugin

Steps to reproduce

DSS 1.1.2 + LINKIS 1.4.0 创建数据源

d26fa1ba620b43d3d4cb8a3f7aba7f1

Scriptis 执行jdbc脚本,下拉选择创建好的数据源

2ff7718e19d5f6588e66e29a2492a81

JDBC URL 组装缺少了数据库名称,导致连接失败 2024-06-24 16:04:13.717 ERROR [Druid-ConnectionPool-Create-848259924] com.alibaba.druid.pool.DruidDataSource 2912 run [JobId-] - create connection SQLException, url: jdbc:postgresql://192.168.0.229:5432?stringtype=unspecified, errorCode 0, state 99999 org.postgresql.util.PSQLException: Unable to parse URL jdbc:postgresql://192.168.0.229:5432?stringtype=unspecified at org.postgresql.Driver.connect(Driver.java:274) ~[postgresql-42.5.4.jar:42.5.4] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1701) ~[druid-1.2.16.jar:?] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1786) ~[druid-1.2.16.jar:?] at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2910) ~[druid-1.2.16.jar:?] 2024-06-24 16:04:13.728 WARN [Druid-ConnectionPool-Create-87671547] org.postgresql.Driver 558 parseURL [JobId-] - JDBC URL must contain a / at the end of the host or port: jdbc:postgresql://192.168.0.229:5432 2024-06-24 16:04:13.728 ERROR [Druid-ConnectionPool-Create-87671547] com.alibaba.druid.pool.DruidDataSource 2912 run [JobId-] - create connection SQLException, url: jdbc:postgresql://192.168.0.229:5432, errorCode 0, state 99999 org.postgresql.util.PSQLException: Unable to parse URL jdbc:postgresql://192.168.0.229:5432 at org.postgresql.Driver.connect(Driver.java:274) ~[postgresql-42.5.4.jar:42.5.4] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1701) ~[druid-1.2.16.jar:?] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1786) ~[druid-1.2.16.jar:?] at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2910) ~[druid-1.2.16.jar:?] 2024-06-24 16:04:13.004 ERROR jobRequest(IDE_hadoop_jdbc_14) execute failed,21304, Task is Failed,errorMsg: created data source connection error! 2024-06-24 16:04:13.004 INFO Task creation time(任务创建时间): 2024-06-24 16:04:13, Task scheduling time(任务调度时间): 2024-06-24 16:04:13, Task start time(任务开始时间): 2024-06-24 16:04:13, Mission end time(任务结束时间): 2024-06-24 16:04:13 2024-06-24 16:04:13.004 INFO Task submit to Orchestrator time:2024-06-24 16:04:13, Task request EngineConn time:2024-06-24 16:04:13, Task submit to EngineConn time:2024-06-24 16:04:13 2024-06-24 16:04:13.004 INFO Your mission(您的任务) 52 The total time spent is(总耗时时间为): 110 ms 2024-06-24 16:04:13.004 INFO Sorry. Your job completed with a status Failed. You can view logs for the reason. 2024-06-24 16:04:13.004 INFO job is completed.

Expected behavior

JDBC脚本执行成功

Your environment

Anything else

No response

Are you willing to submit a PR?

github-actions[bot] commented 1 week ago

:blush: Welcome to the Apache Linkis community!!

We are glad that you are contributing by opening this issue.

Please make sure to include all the relevant context. We will be here shortly.

If you are interested in contributing to our website project, please let us know! You can check out our contributing guide on :point_right: How to Participate in Project Contribution.

Community

WeChat Assistant WeChat Public Account

Mailing Lists

Name Description Subscribe Unsubscribe Archive
dev@linkis.apache.org community activity information subscribe unsubscribe archive
peacewong commented 6 days ago

Hi, can you submit a PR?

peacewong commented 6 days ago

You can add my WeChat: peaceAyton

xieshaoqiang commented 5 days ago

你可以添加我的微信:peaceAyton

yes