2

Getting Error as below:

bin]# ./cqlsh
Traceback (most recent call last):
  File "./cqlsh", line 134, in <module>
    from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling
  File "/u01/cassandra/usr/share/dse/resources/cassandra/bin/../pylib/cqlshlib/sslhandling.py", line 20, in <module>
    import ssl
  File "/usr/local/lib/python2.6/ssl.py", line 60, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: No module named _ssl

Our versions are as below:

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
 bin]# python --version
Python 2.6.9
Cœur
  • 37,241
  • 25
  • 195
  • 267
tom_phil
  • 21
  • 1
  • 2

2 Answers2

0

Looks like it could be related to this known issue. Try using Python 2.7.x to see if it resolves your issue.

https://datastax-oss.atlassian.net/browse/PYTHON-322

Another possibility is it could be a Python issue covered here.

ImportError: No module named _ssl

Community
  • 1
  • 1
Alec Collier
  • 1,483
  • 8
  • 9
0

Thanks for the Answer, I saw it bit late as I got away with below.

By following the link http://paltman.com/getting-ssl-support-in-python-251/ I was able to enable it. I Followed below steps.

  1. vi Modules/Setup.dist and uncomment as shown below 204:# Socket module helper for SSL support; you must comment out the other 205:# socket line above, and possibly edit the SSL variable: ======>uncomment this line 206:SSL=/usr/local/ssl ======>uncomment this line 207:_ssl _ssl.c \ ======>uncomment this line
    208: -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ ======>uncomment this line 209: -L$(SSL)/lib -lssl -lcrypto ======>uncomment this line

  2. cd to Python s/w directory

  3. ./config
  4. make
  5. make install

then invoke cqlsh as below and it worked fine. cqlsh Connected to POC at 10.239.133.189:9042. [cqlsh 5.0.1 | Cassandra 2.1.5.469 | DSE 4.7.0 | CQL spec 3.2.0 | Native protocol v3] Use HELP for help. cqlsh>

tom_phil
  • 21
  • 1
  • 2