You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Philip Thompson (JIRA)" <ji...@apache.org> on 2014/09/30 17:56:34 UTC

[jira] [Updated] (CASSANDRA-8022) cqlsh hangs indefinitely within a Docker container connecting to itself with hostname

     [ https://issues.apache.org/jira/browse/CASSANDRA-8022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Thompson updated CASSANDRA-8022:
---------------------------------------
    Reproduced In: 2.1.0
    Fix Version/s:     (was: 2.1.0)
                   2.1.1
           Labels: cqlsh  (was: )

> 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
>              Labels: cqlsh
>             Fix For: 2.1.1
>
>
> 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: <module 'cql' from '/usr/share/cassandra/lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/__init__.py'>
> Using thrift lib: <module 'thrift' from '/usr/share/cassandra/lib/thrift-python-internal-only-0.9.1.zip/thrift/__init__.py'>
> ```
> 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: <module 'cassandra' from '/usr/share/cassandra/lib/cassandra-driver-internal-only-2.1.0.post.zip/cassandra-driver-2.1.0.post/cassandra/__init__.py'>
> ```
> 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)