cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Stepura (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-8022) cqlsh hangs indefinitely within a Docker container connecting to itself with hostname
Date Fri, 07 Nov 2014 01:55:33 GMT

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

Mikhail Stepura commented on CASSANDRA-8022:
--------------------------------------------

I doubt that is network related. I suspect it's a way cqlsh is launched. It prints no prompt,
so I guess cqlsh 'thinks' it is launched not from a terminal ( i.e. {{sys.stdin.isatty() ==
false}}).


> 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
>
> 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)

Mime
View raw message