ICP 1.2.0 Module failure

6/20/2018

During the icp 1.2.0 installation process I encounter following error:

TASK [kubelet : Starting Kubelet container on Worker nodes] ********************
task path: /installer/playbook/roles/kubelet/tasks/kubelet.yaml:3
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/cloud/docker/docker_container.py
<192.168.240.14> ESTABLISH SSH CONNECTION FOR USER: user
<192.168.240.14> SSH: EXEC sshpass -d10 ssh -C -o CheckHostIP=no -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o Port=22 -o 'IdentityFile="cluster/ssh_key"' -o User=user -o ConnectTimeout=10 -oPubkeyAuthentication=no 192.168.240.14 '/bin/bash -c '"'"'echo ~ && sleep 0'"'"''
<192.168.240.14> (0, '/home/user\n', '')
<192.168.240.14> ESTABLISH SSH CONNECTION FOR USER: user
<192.168.240.14> SSH: EXEC sshpass -d10 ssh -C -o CheckHostIP=no -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o Port=22 -o 'IdentityFile="cluster/ssh_key"' -o User=user -o ConnectTimeout=10 -oPubkeyAuthentication=no 192.168.240.14 '/bin/bash -c '"'"'( umask 77 && mkdir -p "` echo /home/user/.ansible/tmp/ansible-tmp-1529485552.37-109409849437093 `" && echo ansible-tmp-1529485552.37-109409849437093="` echo /home/user/.ansible/tmp/ansible-tmp-1529485552.37-109409849437093 `" ) && sleep 0'"'"''
<192.168.240.14> (0, 'ansible-tmp-1529485552.37-109409849437093=/home/user/.ansible/tmp/ansible-tmp-1529485552.37-109409849437093\n', '')
<192.168.240.14> PUT /tmp/tmpQDhbak TO /home/user/.ansible/tmp/ansible-tmp-1529485552.37-109409849437093/docker_container.py
<192.168.240.14> SSH: EXEC sshpass -d10 sftp -o BatchMode=no -b - -C -o CheckHostIP=no -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o Port=22 -o 'IdentityFile="cluster/ssh_key"' -o User=user -o ConnectTimeout=10 -oPubkeyAuthentication=no '[192.168.240.14]'
<192.168.240.14> (0, 'sftp> put /tmp/tmpQDhbak /home/user/.ansible/tmp/ansible-tmp-1529485552.37-109409849437093/docker_container.py\n', '')
<192.168.240.14> ESTABLISH SSH CONNECTION FOR USER: user
<192.168.240.14> SSH: EXEC sshpass -d10 ssh -C -o CheckHostIP=no -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o Port=22 -o 'IdentityFile="cluster/ssh_key"' -o User=user -o ConnectTimeout=10 -oPubkeyAuthentication=no 192.168.240.14 '/bin/bash -c '"'"'chmod u+x /home/user/.ansible/tmp/ansible-tmp-1529485552.37-109409849437093/ /home/user/.ansible/tmp/ansible-tmp-1529485552.37-109409849437093/docker_container.py && sleep 0'"'"''
<192.168.240.14> (0, '', '')
<192.168.240.14> ESTABLISH SSH CONNECTION FOR USER: user
<192.168.240.14> SSH: EXEC sshpass -d10 ssh -C -o CheckHostIP=no -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o Port=22 -o 'IdentityFile="cluster/ssh_key"' -o User=user -o ConnectTimeout=10 -oPubkeyAuthentication=no -tt 192.168.240.14 '/bin/bash -c '"'"'sudo -H -S -i -p "[sudo via ansible, key=iunllbazxshyeergbibbpevmrjmrbrte] password: " -u root /bin/bash -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-iunllbazxshyeergbibbpevmrjmrbrte; /usr/bin/python /home/user/.ansible/tmp/ansible-tmp-1529485552.37-109409849437093/docker_container.py; rm -rf "/home/user/.ansible/tmp/ansible-tmp-1529485552.37-109409849437093/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<192.168.240.14> (0, '\r\nTraceback (most recent call last):\r\n  File "/tmp/ansible_L67oqX/ansible_module_docker_container.py", line 660, in <module>\r\n    from ansible.module_utils.docker_common import *\r\n  File "/tmp/ansible_L67oqX/ansible_modlib.zip/ansible/module_utils/docker_common.py", line 34, in <module>\r\n  File "/root/.local/lib/python2.7/site-packages/requests-2.18.4-py2.7.egg/requests/__init__.py", line 84, in <module>\r\n    from urllib3.contrib import pyopenssl\r\n  File "/root/.local/lib/python2.7/site-packages/urllib3-1.22-py2.7.egg/urllib3/contrib/pyopenssl.py", line 46, in <module>\r\n    import OpenSSL.SSL\r\n  File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>\r\n    from OpenSSL import rand, crypto, SSL\r\n  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>\r\n    SSL_ST_INIT = _lib.SSL_ST_INIT\r\nAttributeError: \'module\' object has no attribute \'SSL_ST_INIT\'\r\n', 'Connection to 192.168.240.14 closed.\r\n')
fatal: [192.168.240.14] => MODULE FAILURE

PLAY RECAP *********************************************************************
192.168.240.14             : ok=51   changed=27   unreachable=0    failed=1   
localhost                  : ok=15   changed=0    unreachable=0    failed=0   

Playbook run took 0 days, 0 hours, 4 minutes, 1 seconds

user@user:/opt/ibm-cloud-private-ce-1.2.0/cluster$ 

I'm not sure if this is relevant, but I have python 2.7.14 and openssl 1.0.2o installed:

user@user:/opt/ibm-cloud-private-ce-1.2.0/cluster$ python --version
Python 2.7.14 :: Anaconda, Inc.

user@user:/opt/ibm-cloud-private-ce-1.2.0/cluster$ openssl version
OpenSSL 1.0.2o  27 Mar 2018

The error seems to be this below, but I don't understand how I could fix it.

File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>\r\n    SSL_ST_INIT = _lib.SSL_ST_INIT\r\nAttributeError: \'module\' object has no attribute \'SSL_ST_INIT\'\r\n', 'Connection to 192.168.240.14 closed.\r\n')

Any help is appreciated, thanks.

-- Kim
ibm-cloud-private
kubelet
kubernetes

1 Answer

6/22/2018

I saw in this SO post folks experiencing the same error. Seems to be tied to the OpenSSL version. Review this post and try to install a newer version or make sure you installed it with the same user as running ICP.

Python AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

Also there is a new version of ICP-CE available: ICP 2.1.0.3. Check it out: https://www.ibm.com/developerworks/community/blogs/fe25b4ef-ea6a-4d86-a629-6f87ccf4649e/entry/IBM_Cloud_Private_version_2_1_0_3_is_now_available_for_download?lang=en

-- Stacy Cannon
Source: StackOverflow