cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua McKenzie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-13926) Starting and stopping quickly on Windows results in "port already in use" error
Date Tue, 03 Oct 2017 10:38:00 GMT

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

Joshua McKenzie commented on CASSANDRA-13926:
---------------------------------------------

I ran into this when doing dev on Windows which is why I added the -a flag:
{code} 30     -a              Aggressive startup. Skip VerifyPorts check. For use in dev environments.
        {code}
I suppose we could pursue formalizing it if you're running into this in production, but the
-a in dev was sufficient to get past it for me.

> Starting and stopping quickly on Windows results in "port already in use" error
> -------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-13926
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13926
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Packaging
>         Environment: Windows
>            Reporter: Jason Rust
>            Priority: Minor
>              Labels: windows
>
> If I stop/start Cassandra within a minute on Windows, using the included Powershell script
it can fail to start with the error message "Found a port already in use. Aborting startup."
> This is because the Powershell script uses netstat to find ports are in use, and even
if Cassandra is stopped it is still listed for a short time (reported as TIME_WAIT). See https://superuser.com/questions/173535/what-are-close-wait-and-time-wait-states
> A change to the Powershell script to ensure that only ESTABLISHED ports are searched
solves the problem for me and involves changing from:
> {code} if ($line -match "TCP" -and $line -match $portRegex){code}
> to
> {code} if ($line -match "TCP" -and $line -match $portRegex -and $line -match "ESTABLISHED"){code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message