Strange End of Setup

Hello,

With a fresh VSP (OVH), I have no acces (Error 500) to the pannel after install.
The Shell during install

Updating system packages...
Installing system packages...

Current default time zone: 'Europe/Paris'
Local time is now:      Thu Oct 26 21:20:47 CEST 2017.
Universal Time is now:  Thu Oct 26 19:20:47 UTC 2017.

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'

Okay. I'm about to set up admin@pieli.fr for you. This account will also
have access to the box's control panel.
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:

Traceback (most recent call last):
  File "management/status_checks.py", line 993, in <module>
    ssl_certificates = get_ssl_certificates(env)
  File "/root/mailinabox/management/ssl_certificates.py", line 17, in get_ssl_certificates
    from cryptography.x509 import Certificate
  File "/usr/local/lib/python3.4/dist-packages/cryptography/x509/__init__.py", line 8, in <module>
    from cryptography.x509.base import (
  File "/usr/local/lib/python3.4/dist-packages/cryptography/x509/base.py", line 16, in <module>
    from cryptography.x509.extensions import Extension, ExtensionType
  File "/usr/local/lib/python3.4/dist-packages/cryptography/x509/extensions.py", line 18, in <module>
    from cryptography.hazmat.primitives import constant_time, serialization
  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/primitives/constant_time.py", line 9, in <module>
    from cryptography.hazmat.bindings._constant_time import lib
ImportError: No module named '_cffi_backend'

Any idea ?

Can you try installing cryptography · PyPI and re-run the setup?

This is similar to an error I had on a VM I was trying to create. Check to see if Apache is installed, as well as the SSH server.

If Apache is install uninstall it.

If the SSH server is not, make sure you install it and then re-run the setup.

1 Like

Thx, I refresh my VPS, before install script, no apache package installed…

After install (failed) script : !

dpkg-query -l | grep apache
ii apache2 2.4.7-1ubuntu4.18 amd64 Apache HTTP Server
ii apache2-bin 2.4.7-1ubuntu4.18 amd64 Apache HTTP Server (binary files and modules)
ii apache2-data 2.4.7-1ubuntu4.18 all Apache HTTP Server (common files)
ii libapache2-mod-php5 5.5.9+dfsg-1ubuntu4.22 amd64 server-side, HTML-embedded scripting language (Apache 2 module)

I remove package, and re-run the setup and It’s now OK.
I see during this second trial the “remove apache” step. (No for the primary setup ??)

Thanks for your help.

Yes, I noticed that too with a fresh install of Ubuntu. I think for some reason it is installing Apache after the OS install, as I did check for apache before starting MiaB setup, and did not find it. During troubleshooting my failed install I check to see what ports were in use and found Apache.

I don’t recall seeing removing apache in the first setups but did see it on the second (and third installs), but it does not seem to remove apache.

I’m just glad you are up and running and we were able to help.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.