Make Windows -a startup skip VerifyPorts check entirely Patch by jmckenzie; reviewed by pthompson for CASSANDRA-10524
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/728f94e7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/728f94e7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/728f94e7 Branch: refs/heads/cassandra-3.0 Commit: 728f94e798662bf8e0e4ad0f4d236394868cb7d6 Parents: 3cd7500 Author: Joshua McKenzie <jmcken...@apache.org> Authored: Mon Oct 19 15:11:07 2015 -0400 Committer: Joshua McKenzie <jmcken...@apache.org> Committed: Mon Oct 19 15:11:07 2015 -0400 ---------------------------------------------------------------------- bin/cassandra.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/728f94e7/bin/cassandra.ps1 ---------------------------------------------------------------------- diff --git a/bin/cassandra.ps1 b/bin/cassandra.ps1 index 8cdd433..44ba9a4 100644 --- a/bin/cassandra.ps1 +++ b/bin/cassandra.ps1 @@ -27,7 +27,7 @@ usage: cassandra.ps1 [-f] [-h] [-p pidfile] [-H dumpfile] [-D arg] [-E errorfile -E change JVM ErrorFile -v Print cassandra version and exit -s Show detailed jvm environment information during launch - -a Aggressive startup. Ignore ports that are TIME_WAIT for VerifyPorts check. + -a Aggressive startup. Skip VerifyPorts check. For use in dev environments. -help print this message NOTE: installing cassandra as a service requires Commons Daemon Service Runner @@ -281,6 +281,10 @@ WARNING! Failed to write pidfile to $pidfile. stop-server.bat and #----------------------------------------------------------------------------- Function VerifyPortsAreAvailable { + if ($a) + { + return + } # Need to confirm 5 different ports are available or die if any are currently bound # From cassandra.yaml: # storage_port @@ -308,10 +312,6 @@ Function VerifyPortsAreAvailable { if ($line -match "TCP" -and $line -match $portRegex) { - if ($a -and $line -match "TIME_WAIT") - { - continue - } Write-Error "Found a port already in use. Aborting startup" Write-Error $line Exit