Mailinabox: Problems installing

Created on 12 Oct 2017  ยท  12Comments  ยท  Source: mail-in-a-box/mailinabox

For some reason I can not install mail in a box at all, when I follow the instructions it does not work, here is the output log in my terminal

Primary Hostname: box.dustdevildrones.com
Public IP Address: 184.176.129.185
Private IP Address: 192.168.0.137
Mail-in-a-Box Version:  v0.24

Updating system packages...
Installing system packages...
Initializing system random number generator...
Creating SSH key for backupโ€ฆ
Firewall is active and enabled on system startup
Creating initial SSL certificate and perfect forward secrecy Diffie-Hellman parameters...
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
.....+...................+.................................................................................................................................................................................................+.................................................................................................+.....................................................................................................................+...............................................................................................................................+.......................................................................................................+...................................+..............................................................................+.....................+.............................................................................................................................................................................................................................+............................+..............+..............................+.................+.............................................................+........................+..............................................................................................................................................................................................................................................................................................................................................................................................................+..........................................+........................................................................+..+...............................................................................................+................................................................................+.......+...............................................................................................................................................................................................................................................................................+.+.................................................................................................................................................................+........................................................................................................................................................................................................................................+......................+.................................................................+.......................................+..........+.....................................................+..................................................................................................................+..........+..+..+.............................................................................................................................+.................................................................................................................................................+.........................................................................................................................................................................................................................................................................................................................+..........+................................................................+...............................................................+............................................+............+..............................+...................+.....................+.............................................................................+.......................................+..............................................+.............................+.............................................................................................+.............................................................................................................+....+..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+.........................................................................................+..........................+.......................................................................................................................................+......................................................+......................................................................................+.......................................+.........................................+.................................................................................................................+........+.................................................................................................................................................................................................................................................................................................................+........................+.....................................................................................................................................................................................+.......+.....+....................................+...................................................................................................................................++*++*
Installing nsd (DNS server)...
Generating DNSSEC signing keys...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Creating new user database: /home/user-data/mail/users.sqlite
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...

Upgrading to Nextcloud version 12.0.3

creating sqlite db
Nextcloud is already latest version
Installing Z-Push (Exchange/ActiveSync server)...
Installing Mail-in-a-Box system management daemon...
Installing Munin (system monitoring)...
No module named '_cffi_backend'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>
Traceback (most recent call last):
  File "management/ssl_certificates.py", line 803, in <module>
    provision_certificates_cmdline()
  File "management/ssl_certificates.py", line 446, in provision_certificates_cmdline
    status = provision_certificates(env, agree_to_tos_url=agree_to_tos_url, logger=my_logger, force_domains=force_domains, show_extended_problems=show_extended_problems)
  File "management/ssl_certificates.py", line 266, in provision_certificates
    import acme.messages
  File "/usr/local/lib/python3.4/dist-packages/acme/messages.py", line 5, in <module>
    from acme import challenges
  File "/usr/local/lib/python3.4/dist-packages/acme/challenges.py", line 9, in <module>
    import OpenSSL
  File "/usr/local/lib/python3.4/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/local/lib/python3.4/dist-packages/OpenSSL/crypto.py", line 12, in <module>
    from cryptography import x509
  File "/usr/local/lib/python3.4/dist-packages/cryptography/x509/__init__.py", line 7, in <module>
    from cryptography.x509 import certificate_transparency
ImportError: cannot import name 'certificate_transparency'













                                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€Mail Accountโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                  โ”‚ Let's create your first mail account.   โ”‚  
                                  โ”‚                                         โ”‚  
                                  โ”‚ What email address do you want?         โ”‚  
                                  โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚  
                                  โ”‚ โ”‚[email protected]           โ”‚ โ”‚  
                                  โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚  
                                  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  
                                  โ”‚         <  OK  >     <Cancel>           โ”‚  
                                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  













password: 
 (again): 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>


-----------------------------------------------

Your Mail-in-a-Box is running.

Please log in to the control panel for further instructions at:

https://184.176.129.185/admin

You will be alerted that the website has an invalid certificate. Check that
the certificate fingerprint matches:

11:AA:BD:0A:C5:3F:5E:6F:E7:FD:32:56:27:61:C8:CE:96:20:71:F3:3F:94:AB:CD:CC:D7:64:47:6C:F8:50:35

Then you can confirm the security exception and continue.
release blocker!

Most helpful comment

Interesting. I figured this was a docker issue, but it appears to be happening on the latest version as well. I got it working by installing the following before running setup/start.sh

    python3.4 -m pip install --upgrade setuptools && \
    python3.4 -m pip install cryptography && \
    python3.4 -m pip install paramiko

I'll dig through the code in a bit and make a pull request. Think I know which bit needs to be updated.

All 12 comments

Interesting. I figured this was a docker issue, but it appears to be happening on the latest version as well. I got it working by installing the following before running setup/start.sh

    python3.4 -m pip install --upgrade setuptools && \
    python3.4 -m pip install cryptography && \
    python3.4 -m pip install paramiko

I'll dig through the code in a bit and make a pull request. Think I know which bit needs to be updated.

made a PR #1265

that sort of worked but i get an error when installing the cryptography and paramiko also when i navigate to the website it won't load

Look at the PR. Installing those above takes more steps, try to modify that file in the PR and it should work out.

Try running the installer twice without any extra installation of software. For me this is all I had to do a few hours ago on a brand new machine that hit this error.

That's not a suitable solution...

I am not suggesting it is but if it does work we know it is simply a apt race to be fixed e.g https://github.com/mail-in-a-box/mailinabox/blob/e49c99890be4dafcd160e711007257a4729ed2db/setup/management.sh#L16

There is another problem with installing from scratch right now: apache2 gets installed. My /var/log/apt/history.log shows it gets installed by:

Commandline: apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install dbconfig-common php7.0-cli php7.0-sqlite php7.0-mcrypt php7.0-intl php7.0-json php7.0-com
mon php-auth php-net-smtp php-net-socket php-net-sieve php-mail-mime php-crypt-gpg php7.0-gd php7.0-pspell tinymce libjs-jquery libjs-jquery-mousewheel libmagic1
Install: libc-client2007e:amd64 (2007f~dfsg-2, automatic), libjs-jquery-mousewheel:amd64 (8-2), php5-sqlite:amd64 (5.5.9+dfsg-1ubuntu4.22, automatic), php7.1-xml:amd64 (7.1.10-1+ubuntu14.04.1+deb.sury.org+1, automatic), php7.0-sqlite3:amd64 (7.0.24-1+ubuntu14.04.1+deb.sury.org+1), php-mail:amd64 (1.2.0-6, automatic), aspell:amd64 (0.60.7~20110707-1ubuntu1, automatic), php-crypt-gpg:amd64 (1.3.2-1), php-xml:amd64 (7.1+55+ubuntu14.04.1+deb.sury.org+1, automatic), libaprutil1:amd64 (1.5.3-1, automatic), tinymce:amd64 (3.4.8+dfsg0-1), libaspell15:amd64 (0.60.7~20110707-1ubuntu1, automatic), libapache2-mod-php5:amd64 (5.5.9+dfsg-1ubuntu4.22, automatic), php7.0-mcrypt:amd64 (7.0.24-1+ubuntu14.04.1+deb.sury.org+1), libicu52:amd64 (52.1-3ubuntu0.6, automatic), php5-common:amd64 (5.5.9+dfsg-1ubuntu4.22, automatic), php7.0-intl:amd64 (7.0.24-1+ubuntu14.04.1+deb.sury.org+1), php7.0-gd:amd64 (7.0.24-1+ubuntu14.04.1+deb.sury.org+1), dbconfig-common:amd64 (1.8.47+nmu1), php-mdb2:amd64 (2.5.0b5-1, automatic), libaprutil1-dbd-sqlite3:amd64 (1.5.3-1, automatic), php5-readline:amd64 (5.5.9+dfsg-1ubuntu4.22, automatic), php7.1-soap:amd64 (7.1.10-1+ubuntu14.04.1+deb.sury.org+1, automatic), libmcrypt4:amd64 (2.5.8-3.1ubuntu1, automatic), php5:amd64 (5.5.9+dfsg-1ubuntu4.22, automatic), php-soap:amd64 (7.1+55+ubuntu14.04.1+deb.sury.org+1, automatic), libjs-jquery:amd64 (1.7.2+dfsg-2ubuntu1), php7.1-common:amd64 (7.1.10-1+ubuntu14.04.1+deb.sury.org+1, automatic), php-mail-mime:amd64 (1.8.8-1), php-log:amd64 (1.12.7-1, automatic), libaprutil1-ldap:amd64 (1.5.3-1, automatic), dictionaries-common:amd64 (1.20.5, automatic), mlock:amd64 (2007f~dfsg-2, automatic), php5-cli:amd64 (5.5.9+dfsg-1ubuntu4.22, automatic), php-auth-sasl:amd64 (1.0.6-1, automatic), apache2-data:amd64 (2.4.7-1ubuntu4.18, automatic), php7.0-pspell:amd64 (7.0.24-1+ubuntu14.04.1+deb.sury.org+1), php-net-smtp:amd64 (1.6.1-1), php5-json:amd64 (1.3.2-2build1, automatic), php-auth:amd64 (1.6.4-1), libapr1:amd64 (1.5.0-1, automatic), php-db:amd64 (1.7.14-2, automatic), php5-imap:amd64 (5.4.6-0ubuntu5, automatic), php-pear:amd64
(1.10.5+submodules+notgz-1+ubuntu14.04.1+deb.sury.org+1, automatic), apache2:amd64 (2.4.7-1ubuntu4.18, automatic), apache2-bin:amd64 (2.4.7-1ubuntu4.18, automatic), aspell-en:amd64 (7.1-0-1,
automatic), javascript-common:amd64 (11, automatic), php-net-socket:amd64 (1.0.14-1), php-net-sieve:amd64 (1.3.2-4)

Running the script again, it gets sorted out.

I had the exact same error: No module named '_cffi_backend' with a 500 right after.

Brand new DO droplet

[edit]
boredomdenied's fix + running install again fixed it

Occurred for us as well. Boredomedenied's fix also worked for us. Thank you!

I had to do the following on Digital Ocean, Ubuntu 14.05

apt-get install python-setuptools
easy_install pip
apt-get install python3
pip install --upgrade setuptools
pip install cryptography
pip install paramiko

Hope it helps

The problems in this issue should be fixed by the above two commits on master. Would appreciate it if folks could give the master branch a try. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timkofu picture timkofu  ยท  3Comments

glaszig picture glaszig  ยท  8Comments

webknjaz picture webknjaz  ยท  8Comments

yousuffarhan picture yousuffarhan  ยท  7Comments

frank-dspeed picture frank-dspeed  ยท  3Comments