AWS EC2 - cannot connect after running certbot-auto

I have an AWS EC2 instance that has been running well for a couple of years. I have a "letsencrypt" certificate that I was trying to extend using the certbot-auto script. The script got stuck when installing/updating 'cryptography' and after a few minutes I got the 'broken pipe' message from ssh. This is what was happening at the time:

Collecting certbot-apache==0.15.0 (from -r /tmp/tmp.RYkFrIBj5R/letsencrypt-auto-requirements.txt (line 184))
  Downloading certbot_apache-0.15.0-py2.py3-none-any.whl (135kB)
    100% |████████████████████████████████| 139kB 28.3MB/s 
Collecting certbot-nginx==0.15.0 (from -r /tmp/tmp.RYkFrIBj5R/letsencrypt-auto-requirements.txt (line 187))
  Downloading certbot_nginx-0.15.0-py2.py3-none-any.whl (65kB)
    100% |████████████████████████████████| 65kB 24.6MB/s 
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /root/.local/share/letsencrypt/lib/python2.7/site-packages (from cryptography==1.8.2->-r /tmp/tmp.RYkFrIBj5R/letsencrypt-auto-requirements.txt (line 45))
Installing collected packages: argparse, pycparser, asn1crypto, cffi, ConfigArgParse, six, configobj, idna, pyparsing, packaging, enum34, ipaddress, cryptography, funcsigs, linecache2, ordereddict, parsedatetime, pbr, pyOpenSSL, pytz, pyRFC3339, python-augeas, requests, traceback2, unittest2, zope.interface, zope.event, zope.component, mock, acme, certbot, letsencrypt, certbot-apache, certbot-nginx
  Running setup.py install for pycparser ... done
  Running setup.py install for cffi ... done
  Running setup.py install for ConfigArgParse ... done
  Running setup.py install for configobj ... done
  Running setup.py install for enum34 ... done
  Running setup.py install for cryptography ... \packet_write_wait: Connection to xx.xx.xxx.xxx port 22: Broken pipe

I could not reconnect, so I rebooted the machine (via the AWS console) and then looked at the System Log (again, via the AWS console). The tail of the log shows this:

Starting sshd: [  OK  ]
ntpdate: Synchronizing with time server: [  OK  ]
Starting ntpd: [  OK  ]
Starting S64mysqld:  [  OK  ]
Starting sendmail: [  OK  ]
Starting sm-client: [  OK  ]
Starting tomcat7: [  OK  ]
Starting httpd: [  OK  ]
Starting crond: [  OK  ]
Starting atd: [  OK  ]
Starting cloud-init: Cloud-init v. 0.7.6 running 'modules:final' at Wed, 28 Jun 2017 17:33:48 +0000. Up 12.76 seconds.
Cloud-init v. 0.7.6 finished at Wed, 28 Jun 2017 17:33:48 +0000. Datasource DataSourceEc2.  Up 12.92 seconds
starting DenyHosts:    /usr/bin/env python /usr/local/bin/denyhosts.py --daemon --config=/usr/share/denyhosts/denyhosts.cfg

Amazon Linux AMI release 2017.03
Kernel 4.9.27-14.31.amzn1.x86_64 on an x86_64

myserver login: 

Why the login prompt? Looking at the "Instance Screenshot" also shows a login prompt. I have another instance, that is running normally, and this does not show any login prompt, so I don't think this is normal, and is probably the cause of my problem!. Any ideas on how I might fix this?

Thanks!

0
задан 28 June 2017 в 21:03
1 ответ

Все серверы Linux показывают приглашение входа в систему конец любой последовательности загрузки. Вы можете запустить спотовый экземпляр, чтобы подтвердить это.

Когда я это сделал, системный журнал был черным прямоугольником, но на снимке экрана было что-то очень похожее.

Amazon Linux instance screenshot

0
ответ дан 5 December 2019 в 07:52

Теги

Похожие вопросы