[ 
https://issues.apache.org/jira/browse/FLINK-35246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841111#comment-17841111
 ] 

Weijie Guo edited comment on FLINK-35246 at 4/26/24 8:59 AM:
-------------------------------------------------------------

{code:java}
InetSocketAddress.createUnresolved(
                                    
SQL_GATEWAY_REST_ENDPOINT_EXTENSION.getTargetAddress(),
                                    
SQL_GATEWAY_REST_ENDPOINT_EXTENSION.getTargetPort())
                            .toString()
{code}

The construction of  InetSocketAddress fails on Java 17 because the toString 
representation is not guaranteed to return something of the form host:port.


was (Author: weijie guo):

{code:java}
InetSocketAddress.createUnresolved(
                                    
SQL_GATEWAY_REST_ENDPOINT_EXTENSION.getTargetAddress(),
                                    
SQL_GATEWAY_REST_ENDPOINT_EXTENSION.getTargetPort())
                            .toString()
{code}

this construction of  InetSocketAddress fails on Java 17 because the toString 
representation is not guaranteed to return something of the form host:port.

> SqlClientSSLTest.testGatewayMode failed in AZP
> ----------------------------------------------
>
>                 Key: FLINK-35246
>                 URL: https://issues.apache.org/jira/browse/FLINK-35246
>             Project: Flink
>          Issue Type: Bug
>          Components: Build System / CI
>            Reporter: Weijie Guo
>            Assignee: Weijie Guo
>            Priority: Major
>             Fix For: 1.20.0
>
>
> {code:java}
> Apr 26 01:51:10 java.lang.IllegalArgumentException: The given host:port 
> ('localhost/<unresolved>:36112') doesn't contain a valid port
> Apr 26 01:51:10       at 
> org.apache.flink.util.NetUtils.validateHostPortString(NetUtils.java:120)
> Apr 26 01:51:10       at 
> org.apache.flink.util.NetUtils.getCorrectHostnamePort(NetUtils.java:81)
> Apr 26 01:51:10       at 
> org.apache.flink.table.client.cli.CliOptionsParser.parseGatewayAddress(CliOptionsParser.java:325)
> Apr 26 01:51:10       at 
> org.apache.flink.table.client.cli.CliOptionsParser.parseGatewayModeClient(CliOptionsParser.java:296)
> Apr 26 01:51:10       at 
> org.apache.flink.table.client.SqlClient.startClient(SqlClient.java:207)
> Apr 26 01:51:10       at 
> org.apache.flink.table.client.SqlClientTestBase.runSqlClient(SqlClientTestBase.java:111)
> Apr 26 01:51:10       at 
> org.apache.flink.table.client.SqlClientSSLTest.testGatewayMode(SqlClientSSLTest.java:74)
> Apr 26 01:51:10       at 
> java.base/java.lang.reflect.Method.invoke(Method.java:580)
> Apr 26 01:51:10       at 
> java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
> Apr 26 01:51:10       at 
> java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
> Apr 26 01:51:10       at 
> java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
> Apr 26 01:51:10       at 
> java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
> Apr 26 01:51:10       at 
> java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
> Apr 26 01:51:10       at 
> java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
> {code}
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=59173&view=logs&j=26b84117-e436-5720-913e-3e280ce55cae&t=77cc7e77-39a0-5007-6d65-4137ac13a471&l=12418



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to