Ssl – fail2ban hanging on creating SSL Certificates all day

fail2bansslssl-certificate

I tried installing fail2ban today on my ubuntu 16.04 server. It seemed to install correctly. Unfortunately, this command has been running now for over 3 hours.

Creating/Updating SSL(for TLS) information
Creating /etc/mail/tls/starttls.m4...
Creating SSL certificates for sendmail.

This is my first AWS EC2 Ubuntu box, so all this technology is extremely new to me. I'm not quite sure how to handle this situation.
This is the information it has posted to the console just prior to this hanging.

    Setting up sendmail-bin (8.15.2-3) ...
    Updating sendmail environment ...
    Reading configuration from /etc/mail/sendmail.conf.
    Validating configuration.
    Writing configuration to /etc/mail/sendmail.conf.
    Writing /etc/cron.d/sendmail.
    Disabling HOST statistics file(/var/lib/sendmail/host_status).
    Reading configuration from /etc/mail/sendmail.conf.
    Validating configuration.
    Writing configuration to /etc/mail/sendmail.conf.
    Writing /etc/cron.d/sendmail.
    Could not open /etc/mail/databases(No such file or directory), creating it.
    Reading configuration from /etc/mail/sendmail.conf.
    Validating configuration.
    Creating /etc/mail/databases...

    Checking filesystem, this may take some time - it will not hang!
      ...   Done.

    Checking for installed MDAs...
    sasl2-bin not installed, not configuring sendmail support.

    To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth"

I'm not quite sure what to do here, whether it be stop fail2ban cancel the process? Like I said, this is my first ubuntu box so any help would be appreciated.

Thanks.

Best Answer

This looks like an entropy problem at a first glance. Virtual machines sometimes lack entropy, please do this to check:

cat /proc/sys/kernel/random/entropy_avail

If it's very low, you can try:

apt-get install rng-tools
rngd -r /dev/urandom

And then check again, and try generating the ssl certificate again.

If this is not the case, please install strace and run the command you tried; have a look what's hanging.