nginxinc/nginx-amplify-doc

I justs curl installed Amplify but couldn's start the agent before updating pyOpenSSL to 16.2.0

brunotikami opened this issue · 2 comments

Hi there,

I just installed Amplify using the curl method, but I couldn't start the agent:

# systemctl status amplify-agent.service
● amplify-agent.service - LSB: Stop/start nginx-amplify-agent
   Loaded: loaded (/etc/init.d/amplify-agent; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sex 2017-08-11 13:37:56 BRT; 1min 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 14962 ExecStart=/etc/init.d/amplify-agent start (code=exited, status=1/FAILURE)

Ago 11 13:37:56 brunotikami amplify-agent[14962]:     import OpenSSL.SSL
Ago 11 13:37:56 brunotikami amplify-agent[14962]:   File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
Ago 11 13:37:56 brunotikami amplify-agent[14962]:     from OpenSSL import rand, crypto, SSL
Ago 11 13:37:56 brunotikami amplify-agent[14962]:   File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
Ago 11 13:37:56 brunotikami amplify-agent[14962]:     SSL_ST_INIT = _lib.SSL_ST_INIT
Ago 11 13:37:56 brunotikami amplify-agent[14962]: AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Ago 11 13:37:56 brunotikami systemd[1]: amplify-agent.service: Control process exited, code=exited status=1
Ago 11 13:37:56 brunotikami systemd[1]: Failed to start LSB: Stop/start nginx-amplify-agent.

I found this issue and decided to update pyOpenSSL:

# pip install -U pyOpenSSL==16.2.0
Collecting pyOpenSSL==16.2.0
  Downloading pyOpenSSL-16.2.0-py2.py3-none-any.whl (43kB)
    100% |████████████████████████████████| 51kB 174kB/s 
Collecting cryptography>=1.3.4 (from pyOpenSSL==16.2.0)
  Downloading cryptography-2.0.3-cp27-cp27mu-manylinux1_x86_64.whl (2.2MB)
    100% |████████████████████████████████| 2.2MB 628kB/s 
Requirement already up-to-date: six>=1.5.2 in /usr/local/lib/python2.7/dist-packages (from pyOpenSSL==16.2.0)
Requirement already up-to-date: ipaddress in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.3.4->pyOpenSSL==16.2.0)
Collecting idna>=2.1 (from cryptography>=1.3.4->pyOpenSSL==16.2.0)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 2.7MB/s 
Requirement already up-to-date: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.3.4->pyOpenSSL==16.2.0)
Requirement already up-to-date: enum34 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.3.4->pyOpenSSL==16.2.0)
Requirement already up-to-date: cffi>=1.7 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.3.4->pyOpenSSL==16.2.0)
Requirement already up-to-date: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.7->cryptography>=1.3.4->pyOpenSSL==16.2.0)
Installing collected packages: idna, cryptography, pyOpenSSL
  Found existing installation: idna 2.5
    Uninstalling idna-2.5:
      Successfully uninstalled idna-2.5
  Found existing installation: cryptography 2.0
    Uninstalling cryptography-2.0:
      Successfully uninstalled cryptography-2.0
  Found existing installation: pyOpenSSL 0.15.1
    Uninstalling pyOpenSSL-0.15.1:
      Successfully uninstalled pyOpenSSL-0.15.1
Successfully installed cryptography-2.0.3 idna-2.6 pyOpenSSL-16.2.0
root@brunotikami:/home/bruno# service amplify-agent start
root@brunotikami:/home/bruno# 

And now it works!

dedm commented

Hi @brunotikami !
Thanks for the report. Just one question - can you provide more details on OS you're using?