Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] postgresql jdbc url create connection SQLException #1133

Open
2 tasks done
xieshaoqiang opened this issue Jun 24, 2024 · 0 comments
Open
2 tasks done

[Bug] postgresql jdbc url create connection SQLException #1133

xieshaoqiang opened this issue Jun 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@xieshaoqiang
Copy link

xieshaoqiang commented Jun 24, 2024

Search before asking

  • I searched the issues and found no similar issues.

DSS Component

dss-appconn, dss-plugins

What happened + What you expected to happen

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.

Relevent platform

Linkis version used: 1.4.0
DSS version used: 1.1.2
Environment name and version:
jdbc4
....

Reproduction script

2024-06-24 16:04:13.717 WARN [Druid-ConnectionPool-Create-848259924] 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?stringtype=unspecified
2024-06-24 16:04:13.717 ERROR [ConcurrentEngineConnThreadPool37] org.apache.linkis.manager.engineplugin.jdbc.executor.JDBCEngineConnExecutor 130 $anonfun$executeLine$4 [JobId-52] - created data source connection error! org.postgresql.util.PSQLException: Unable to parse URL jdbc:postgresql://192.168.0.229:5432?stringtype=unspecified
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.717 WARN [Druid-ConnectionPool-Create-848259924] 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?stringtype=unspecified
2024-06-24 16:04:13.717 ERROR [ConcurrentEngineConnThreadPool37] org.apache.linkis.manager.engineplugin.jdbc.executor.JDBCEngineConnExecutor 214 $anonfun$toExecuteTask$9 [JobId-52] - execute code failed! 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.init(DruidDataSource.java:925) ~[druid-1.2.16.jar:?]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1444) ~[druid-1.2.16.jar:?]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1440) ~[druid-1.2.16.jar:?]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:83) ~[druid-1.2.16.jar:?]
at org.apache.linkis.manager.engineplugin.jdbc.ConnectionManager.getConnectionFromDataSource(ConnectionManager.java:218) ~[linkis-engineplugin-jdbc-1.4.0.jar:1.4.0]
at org.apache.linkis.manager.engineplugin.jdbc.ConnectionManager.getConnection(ConnectionManager.java:237) ~[linkis-engineplugin-jdbc-1.4.0.jar:1.4.0]
at org.apache.linkis.manager.engineplugin.jdbc.executor.JDBCEngineConnExecutor.$anonfun$executeLine$3(JDBCEngineConnExecutor.scala:127) ~[linkis-engineplugin-jdbc-1.4.0.jar:1.4.0]
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) ~[scala-library-2.12.17.jar:?]
at org.apache.linkis.common.utils.Utils$.tryCatch(Utils.scala:49) ~[linkis-common-1.4.0.jar:1.4.0]
at org.apache.linkis.manager.engineplugin.jdbc.executor.JDBCEngineConnExecutor.executeLine(JDBCEngineConnExecutor.scala:129) ~[linkis-engineplugin-jdbc-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.execute.ComputationExecutor.$anonfun$toExecuteTask$10(ComputationExecutor.scala:207) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.common.utils.Utils$.tryCatch(Utils.scala:49) ~[linkis-common-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.execute.ComputationExecutor.$anonfun$toExecuteTask$9(ComputationExecutor.scala:207) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.execute.ComputationExecutor.$anonfun$toExecuteTask$9$adapted(ComputationExecutor.scala:199) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at scala.collection.immutable.Range.foreach(Range.scala:158) ~[scala-library-2.12.17.jar:?]
at org.apache.linkis.engineconn.computation.executor.execute.ComputationExecutor.$anonfun$toExecuteTask$1(ComputationExecutor.scala:199) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.common.utils.Utils$.tryFinally(Utils.scala:77) ~[linkis-common-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.execute.ComputationExecutor.toExecuteTask(ComputationExecutor.scala:250) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.execute.ComputationExecutor.$anonfun$execute$2(ComputationExecutor.scala:265) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.execute.ConcurrentComputationExecutor.ensureOp(ConcurrentComputationExecutor.scala:62) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.execute.ComputationExecutor.$anonfun$execute$1(ComputationExecutor.scala:264) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.common.utils.Utils$.tryFinally(Utils.scala:77) ~[linkis-common-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.execute.ComputationExecutor.execute(ComputationExecutor.scala:282) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.execute.ConcurrentComputationExecutor.execute(ConcurrentComputationExecutor.scala:48) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.service.TaskExecutionServiceImpl.$anonfun$executeTask$1(TaskExecutionServiceImpl.scala:403) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) ~[scala-library-2.12.17.jar:?]
at org.apache.linkis.common.utils.Utils$.tryFinally(Utils.scala:77) ~[linkis-common-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.service.TaskExecutionServiceImpl.org$apache$linkis$engineconn$computation$executor$service$TaskExecutionServiceImpl$$executeTask(TaskExecutionServiceImpl.scala:406) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.service.TaskExecutionServiceImpl$$anon$3$$anon$4.$anonfun$run$5(TaskExecutionServiceImpl.scala:374) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) ~[scala-library-2.12.17.jar:?]
at org.apache.linkis.common.utils.Utils$.tryCatch(Utils.scala:49) ~[linkis-common-1.4.0.jar:1.4.0]
at org.apache.linkis.engineconn.computation.executor.service.TaskExecutionServiceImpl$$anon$3$$anon$4.run(TaskExecutionServiceImpl.scala:375) ~[linkis-computation-engineconn-1.4.0.jar:1.4.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_171]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_171]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_171]
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.

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@xieshaoqiang xieshaoqiang added the bug Something isn't working label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant