Hi all ,
i am new to cassandra and pycass below is my code to connect to cassandra database
import pycassa
from pycassa.pool import ConnectionPool
from pycassa.columnfamily import ColumnFamily
pool = ConnectionPool('my_keyspace', ['192.168.3.14:9160']) # it works well
pool = ConnectionPool('my_keyspace', ['192.168.3.14:9160']) # it is not working for the remote system
col_fam = ColumnFamily(pool, 'blog_entry')
col_fam.get('yomama')
for the localhost it is working and for the remote ip's i am getting the below error
Traceback (most recent call last):
File "F:\ZONE-Applications\DjangoProjects\Python Coding\pycassa\pycassa1.py", line 6, in <module>
['192.168.3.14:9160'])
File "C:\Python27\lib\site-packages\pycassa-1.11.0-py2.7.egg\pycassa\pool.py", line 382, in __init__
self.fill()
File "C:\Python27\lib\site-packages\pycassa-1.11.0-py2.7.egg\pycassa\pool.py", line 442, in fill
conn = self._create_connection()
File "C:\Python27\lib\site-packages\pycassa-1.11.0-py2.7.egg\pycassa\pool.py", line 431, in _create_connection
(exc.__class__.__name__, exc))
AllServersUnavailable: An attempt was made to connect to each of the servers twice, but none of the attempts succeeded. The last failure was TTransportException: Could not connect to
192.168.3.14:9160please some body help me to resolve this