You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/07/13 20:13:20 UTC

[jira] [Commented] (GEODE-1600) DUnitLauncher should not use AvailablePort to pick the locator port

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

ASF GitHub Bot commented on GEODE-1600:
---------------------------------------

GitHub user nabarunnag opened a pull request:

    https://github.com/apache/incubator-geode/pull/202

    GEODE-1600: startLocatorAndDS takes 0 as port number parameter

            * Use of getAvailableTCP port led to race conditions which led to locators being assigned ports in use.
            * Use of 0 now assignes a port number to the locator after the server is started.
            * Code modification to accept 0 as a valid port number until a real port number is assigned after the server is started.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nabarunnag/incubator-geode feature/GEODE-1600

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-geode/pull/202.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #202
    
----
commit e5a6ba12cf63657fd3d952ad6a92b3d0d80703fd
Author: nabarun <nn...@pivotal.io>
Date:   2016-07-11T21:11:38Z

    GEODE-1600: startLocatorAndDS takes 0 as port number parameter
    
            * Use of getAvailableTCP port led to race conditions which led to locators being assigned ports in use.
            * Use of 0 now assignes a port number to the locator after the server is started.
            * Code modification to accept 0 as a valid port number until a real port number is assigned after the server is started.

----


> DUnitLauncher should not use AvailablePort to pick the locator port
> -------------------------------------------------------------------
>
>                 Key: GEODE-1600
>                 URL: https://issues.apache.org/jira/browse/GEODE-1600
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>            Reporter: Dan Smith
>            Assignee: Dan Smith
>
> In a recent dunit precheckin run, I saw a number of tests fail with the below errors
> {noformat}
> 11:38:15 com.gemstone.gemfire.disttx.DistTXDebugDUnitTest > classMethod FAILED
> 11:38:15     java.lang.RuntimeException: Unable to launch dunit VMS
> 11:38:15 
> 11:38:15         Caused by:
> 11:38:15         java.lang.RuntimeException: Failed to start locator
> 11:38:15 
> 11:38:15             Caused by:
> 11:38:15             java.net.BindException: Failed to create server socket on  null[29,649]
> 11:38:15 
> 11:38:15                 Caused by:
> 11:38:15                 java.net.BindException: Address already in use
> 11:38:17 
> 11:38:17 com.gemstone.gemfire.disttx.DistTXRestrictionsDUnitTest > testPersistentRestriction FAILED
> 11:38:17     com.gemstone.gemfire.GemFireConfigException: Unable to join the distributed system.  Operation either timed out, was stopped or Locator does not exist.
> 11:38:18 
> 11:38:18 com.gemstone.gemfire.disttx.PRDistTXDUnitTest > testColocationPartitionedRegion FAILED
> 11:38:18     com.gemstone.gemfire.test.dunit.RMIException: While invoking com.gemstone.gemfire.internal.cache.execute.PRTransactionDUnitTest$12.call in VM 0 running on Host zambia.gemstone.com with 4 VMs
> 11:38:18 
> 11:38:18         Caused by:
> 11:38:18         com.gemstone.gemfire.GemFireConfigException: Unable to join the distributed system.  Operation either timed out, was stopped or Locator does not exist.
> {noformat}
> It looks like the issue is that the locator failed to start because the port it was starting on was already used.
> We should refactor the launcher code to call Locator.startLocatorAndDS with a port of 0 and let it pick an open port. That way we should no longer have a chance of port conflicts when launching dunit.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)