Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A6464200D14 for ; Tue, 3 Oct 2017 12:38:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A51121609DD; Tue, 3 Oct 2017 10:38:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EB3051609D2 for ; Tue, 3 Oct 2017 12:38:05 +0200 (CEST) Received: (qmail 29071 invoked by uid 500); 3 Oct 2017 10:38:05 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 29060 invoked by uid 99); 3 Oct 2017 10:38:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Oct 2017 10:38:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 265EDDBB69 for ; Tue, 3 Oct 2017 10:38:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id pZRO0ZdcXOZu for ; Tue, 3 Oct 2017 10:38:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 6BB565FD89 for ; Tue, 3 Oct 2017 10:38:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 015E6E0E18 for ; Tue, 3 Oct 2017 10:38:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A827A242C2 for ; Tue, 3 Oct 2017 10:38:00 +0000 (UTC) Date: Tue, 3 Oct 2017 10:38:00 +0000 (UTC) From: "Joshua McKenzie (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-13926) Starting and stopping quickly on Windows results in "port already in use" error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 Oct 2017 10:38:06 -0000 [ 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