[ https://issues.apache.org/jira/browse/HIVE-28194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838911#comment-17838911 ]
Araika Singh edited comment on HIVE-28194 at 4/19/24 8:41 AM: -------------------------------------------------------------- Hi [~zhangbutao] , Thanks for replying! Here we are not trying to solve this issue for the same test class, but for several classes/group of classes. There is a time gap between when we have chosen the port vs when actually the HS2 is started. By that time, some other test in parallel test split execution may pick it up as free port. Similar issues were fixed for other classes in the following jiras: https://issues.apache.org/jira/browse/HIVE-18147 https://issues.apache.org/jira/browse/HIVE-19595 Moreover, test class _TestRetryingThriftCLIServiceClient_ was missed, and this Jira is just an extension of the same. was (Author: JIRAUSER301024): Hi [~zhangbutao] , Thanks for replying! Here we are not trying to solve this issue for the same test class, but for several classes/group of class. There is a time gap between when we have chosen the port vs when actually the HS2 is started. By that time, some other test in parallel test split execution may pick it up as free port. Similar issues were fixed for other classes in the following jiras: https://issues.apache.org/jira/browse/HIVE-18147 https://issues.apache.org/jira/browse/HIVE-19595 Moreover, test class _TestRetryingThriftCLIServiceClient_ was missed, and this Jira is just an extension of the same. > Fix flaky tests in TestRetryingThriftCLIServiceClient (Failed to start HS2) > --------------------------------------------------------------------------- > > Key: HIVE-28194 > URL: https://issues.apache.org/jira/browse/HIVE-28194 > Project: Hive > Issue Type: Bug > Reporter: Araika Singh > Assignee: Araika Singh > Priority: Major > Attachments: image-2024-04-19-12-21-57-577.png, > image-2024-04-19-12-22-47-006.png > > > The following testcases are flaky in this test class: > # > *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testTransportClose* > # > *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour* > # > {*}org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testSessionLifeAfterTransportClose{*}{*}{*} > {code:java} > org.apache.hive.service.ServiceException: Failed to Start HiveServer2 > at org.apache.hive.service.CompositeService.start(CompositeService.java:80) > at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:715) > at > org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.startHiveServer(TestRetryingThriftCLIServiceClient.java:72) > at > org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour(TestRetryingThriftCLIServiceClient.java:1 > 19) > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:568) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) > at org.junit.runners.ParentRunner.run(ParentRunner.java:309) > at > org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) > at > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) > at > org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379) > at > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340) > at > org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125) > at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413) > Caused by: java.lang.RuntimeException: Failed to init thrift server > at > org.apache.hive.service.cli.thrift.ThriftBinaryCLIService.initServer(ThriftBinaryCLIService.java:159) > at > org.apache.hive.service.cli.thrift.ThriftCLIService.start(ThriftCLIService.java:226) > at org.apache.hive.service.CompositeService.start(CompositeService.java:70) > ... 29 more > Caused by: org.apache.thrift.transport.TTransportException: Could not create > ServerSocket on address 0.0.0.0/0.0.0.0:15000. > at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:109) > at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:91) > at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:87) > at > org.apache.hadoop.hive.common.auth.HiveAuthUtils.getServerSocket(HiveAuthUtils.java:159) > at > org.apache.hive.service.cli.thrift.ThriftBinaryCLIService.initServer(ThriftBinaryCLIService.java:80) > ... 31 more > Caused by: java.net.BindException: Address already in use > at java.base/sun.nio.ch.Net.bind0(Native Method) > at java.base/sun.nio.ch.Net.bind(Net.java:555) > at java.base/sun.nio.ch.Net.bind(Net.java:544) > at java.base/sun.nio.ch.NioSocketImpl.bind(NioSocketImpl.java:648) > at java.base/java.net.ServerSocket.bind(ServerSocket.java:388) > at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:106) > ... 35 more {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)