Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E357C17B30 for ; Mon, 29 Sep 2014 23:34:34 +0000 (UTC) Received: (qmail 47735 invoked by uid 500); 29 Sep 2014 23:34:34 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 47670 invoked by uid 500); 29 Sep 2014 23:34:34 -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 47418 invoked by uid 99); 29 Sep 2014 23:34:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2014 23:34:34 +0000 Date: Mon, 29 Sep 2014 23:34:34 +0000 (UTC) From: "Mikhail Stepura (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-8022) cqlsh hangs indefinitely within a Docker container connecting to itself with hostname MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14152514#comment-14152514 ] Mikhail Stepura commented on CASSANDRA-8022: -------------------------------------------- Can you enter commands into that "hung" cqlsh? Can you also check the output for {{ lsof -a -p -d0,1,2}} ? > cqlsh hangs indefinitely within a Docker container connecting to itself with hostname > ------------------------------------------------------------------------------------- > > Key: CASSANDRA-8022 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8022 > Project: Cassandra > Issue Type: Bug > Components: Tools > Environment: Ubuntu 14.04, running Docker, run inside a Ubuntu 14.04 container. > Reporter: Matthew O'Riordan > Fix For: 2.1.0 > > > I am unable to use the `cqlsh` tool within a Docker container running Cassandra. Previously I would use the Java & Thrift based `cqlsh` tool as follows: > ``` > cqlsh --username cassandra --password whatever $(hostname) > ``` > When I run the `cqlsh` command after attaching to a running container (I use LXC containerisation that allows attaching to a running container and running a console), it simply hangs and never reports an error. With the `--debug` flag on, I get the following with: > **cqlsh 4.1.1** > ``` > $ cqlsh --debug --username cassandra --password obfuscated $(hostname) > Using CQL driver: > Using thrift lib: > ``` > It then hangs in this state indefinitely, I have no errors from `cqlsh` and no errors in the Cassandra log. > **cqlsh 5.0.1** > ``` > $ cqlsh --debug --username cassandra --passwor obfuscated $(hostname) > Using CQL driver: > ``` > It then also hangs in this state indefinitely, I have no errors from `cqlsh` and no errors in the Cassandra log. > What's interesting, and quite confusing is that: > * I can telnet within the container as follows `telnet $(hostname) 9042` and I get a socket. When trying to issue some commands, I see Protocol errors in the Cassandra log thus verifying that the port is indeed open on the host that resolves from $(hostname) > * If I `cqlsh` from another container or another host to the Cassandra container it works just fine. > * I have tried disabling authentication altogether and using the AllowAllAuthenticator, and I experience the same problem. > * `nodetool` works fine > In the mean time, I am forced to `cqlsh` from another container as a workaround. Happy to try and do anything require to diagnose the cause of this problem. -- This message was sent by Atlassian JIRA (v6.3.4#6332)