Use the system key tool to manually encrypt sensitive configuration value for Opscenter. When manually encrypting a configuration value you may see error below. Check the Python configuration on your system. Ensure Pycrypto module is installed.
# /usr/share/opscenter/bin/opscenter_system_key_tool create ECB 128
Traceback (most recent call last):
File “/usr/share/opscenter/lib/py/cassandra/metadata.py”, line 32, in <module>
import cassandra.cqltypes as types
File “/usr/share/opscenter/lib/py/cassandra/cqltypes.py”, line 44, in <module>
from six.moves import range
ImportError: cannot import name range
# yum install gmp-devel
Package 1:gmp-devel-6.0.0-12.el7_1.x86_64 already installed and latest version
Nothing to do
# pip install pycrypto
Requirement already satisfied (use –upgrade to upgrade): pycrypto in …….
# pip install pycrypto —upgrade
Requirement already up-to-date: pycrypto in /usr/lib64/python2.7/site-packages
The tool is failing on a python import of the six.moves module.
# pip install six
Requirement already satisfied (use –upgrade to upgrade): six in /usr/lib/python2.7/site-packages
Python 2.7.5 (default, Nov 20 2015, 02:00:19)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
>>> import sys
>>> import six
‘2.7.5 (default, Nov 20 2015, 02:00:19) \n[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]’
# pip install six –upgrade
Installing collected packages: six
Found existing installation: six 1.3.0
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Successfully uninstalled six-1.3.0
Successfully installed six-1.10.0
Worked after upgrade:
/usr/share/opscenter/bin/opscenter_system_key_tool create ECB 128