cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6663) Connecting to a Raspberry PI Cassandra Cluster crashes the node being connected to
Date Wed, 12 Feb 2014 07:07:20 GMT

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

Sylvain Lebresne commented on CASSANDRA-6663:
---------------------------------------------

bq. https://github.com/xerial/snappy-java/issues/37

So let me sum this up: when executing the OPTIONS message, which asks for which compression
methods are available, Snappy segfault on raspberry PI and we we can't catch that (since it
segfault the JVM). So really, the "right" solution is probably to help on that snappy-java
tracking the source of the problem down so it gets fixed there.

But in meantime, if there was a simple and reliable way to detect that "we are on raspberry
PI", we could probably just mark Snappy as unavailable on raspberry without actually trying
to initialize it. But for that, someone that does have a raspberry PI will have to step up
with a patch because I don't personally have one.

Lastly, the python driver could probably work around that by not sending the OPTIONS message
if the user hasn't asked for compression in the first place (not saying it's ideal, but currently
there isn't much reason to send OPTIONS unless for knowing which compressions are available,
so it could be a relatively simple work-around until the snappy-java library ticket is fixed).

> Connecting to a Raspberry PI Cassandra Cluster crashes the node being connected to
> ----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6663
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6663
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers (now out of tree)
>         Environment: 4x node Raspberry PI cluster
> Macbook running Idle 2.7
>            Reporter: ian mccrae
>         Attachments: Python Client Log.txt, hs_err_pid6327.log
>
>
> I have a working 4x node Raspberry Pi cluster and
> # DevCenter happily connects to this (...which has an option to turn Snappy compression
off)
> # ...however the Python Driver fails to connect and crashes the node being connected
to with the errors in the error-log below.
> There appears to be a problem with Snappy compression (not supported on the Raspberry
Pi).  So I also tried "compression = None" with the same result.
> How might I fix this?
> *Python Code*
> {noformat}
> >>> from cassandra.cluster import Cluster
> >>> cluster = Cluster(['192.168.200.151'], compression = None)
> >>> session = cluster.connect()
> {noformat}
> *Error Log*
> {noformat}
> Traceback (most recent call last):
>   File "<pyshell#58>", line 1, in <module>
>     session = cluster.connect()
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cassandra/cluster.py",
line 471, in connect
>     self.control_connection.connect()
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cassandra/cluster.py",
line 1351, in connect
>     self._set_new_connection(self._reconnect_internal())
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cassandra/cluster.py",
line 1386, in _reconnect_internal
>     raise NoHostAvailable("Unable to connect to any servers", errors)
> NoHostAvailable: ('Unable to connect to any servers', {'192.168.200.151': ConnectionShutdown('Connection
to 192.168.200.151 is closed',))
> {noformat}
> *A Dump of the "cluster" class attributes*
> {noformat}
> >>> pprint(vars(cluster))
> {'_core_connections_per_host': {0: 2, 1: 1},
>  '_is_setup': True,
>  '_is_shutdown': True,
>  '_listener_lock': <thread.lock object at 0x10616d230>,
>  '_listeners': set([]),
>  '_lock': <_RLock owner=None count=0>,
>  '_max_connections_per_host': {0: 8, 1: 2},
>  '_max_requests_per_connection': {0: 100, 1: 100},
>  '_min_requests_per_connection': {0: 5, 1: 5},
>  '_prepared_statements': <WeakValueDictionary at 4396942904>,
>  'compression': None,
>  'contact_points': ['192.168.200.151'],
>  'control_connection': <cassandra.cluster.ControlConnection object at 0x106168cd0>,
>  'control_connection_timeout': 2.0,
>  'cql_version': None,
>  'executor': <concurrent.futures.thread.ThreadPoolExecutor object at 0x106148410>,
>  'load_balancing_policy': <cassandra.policies.RoundRobinPolicy object at 0x104adae50>,
>  'max_schema_agreement_wait': 10,
>  'metadata': <cassandra.metadata.Metadata object at 0x1061481d0>,
>  'metrics_enabled': False,
>  'port': 9042,
>  'scheduler': <cassandra.cluster._Scheduler object at 0x106148550>,
>  'sessions': <_weakrefset.WeakSet object at 0x106148750>,
>  'sockopts': None,
>  'ssl_options': None}
> >>>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message