0.20 to 0.21b Upgrade Failed

Hello,
I have a vanilla AWS box with MIAB. Its been runnings for a long while.

Every month or so I do standard Ubuntu 14.04 LTS update and upgrade & reboot when the MIAB status page wants. Tonight I did those two tasks then ran the same command (Scrolling up to the previous command to use the same every time.) “curl -s https://mailinabox.email/bootstrap.sh | sudo bash”. This has worked since 0.14 or whatever the version was when I installed initially.

I can access /mail but /admin shows this error.

Rebooted, tried running the same command and the errors remain.
Visited the MIAB install page and looked for the command to check it, discovered the new one. “curl -s https://mailinabox.email/setup.sh | sudo bash”. Same with the output on the terminal.

Clipboard from Putty. This judgemental forum wont let me post more than twp URLS…

Using username “ubuntu”.
Authenticating with public key “key”
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-106-generic x86_64)

System information as of Fri Dec 30 16:16:34 UTC 2016

System load: 0.0 Memory usage: 5% Processes: 91
Usage of /: 67.5% of 7.74GB Swap usage: 0% Users logged in: 0

0 packages can be updated.
0 updates are security updates.

Last login: Fri Dec 30 16:15:45 2016 from xxx-xxx-xxx-xxx.dyn.iinet.net.au
ubuntu@mail:~$ curl -s https:// mailinabox email/bootstrap.sh | sudo bash

FAILED: pip3 install email_validator>=1.0.0

Traceback (most recent call last):
File “/usr/bin/pip3”, line 9, in
load_entry_point(‘pip==1.5.4’, ‘console_scripts’, ‘pip3’)()
File “/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py”, line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py”, line 2631, in load_entry_point
return ep.load()
File “/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py”, line 2291, in load
return self.resolve()
File “/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py”, line 2297, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/lib/python3/dist-packages/pip/init.py”, line 61, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File “/usr/lib/python3/dist-packages/pip/vcs/mercurial.py”, line 9, in
from pip.download import path_to_url
File “/usr/lib/python3/dist-packages/pip/download.py”, line 22, in
import requests, six
File “”, line 2237, in _find_and_load
File “”, line 2226, in _find_and_load_unlocked
File “”, line 1191, in _load_unlocked
File “”, line 1161, in _load_backward_compatible
File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/init.py”, line 53, in
File “”, line 2237, in _find_and_load
File “”, line 2226, in _find_and_load_unlocked
File “”, line 1191, in _load_unlocked
File “”, line 1161, in _load_backward_compatible
File “/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py”, line 25, in
File “/usr/local/lib/python3.4/dist-packages/OpenSSL/init.py”, line 8, in
from OpenSSL import rand, crypto, SSL
File “/usr/local/lib/python3.4/dist-packages/OpenSSL/rand.py”, line 12, in
from OpenSSL._util import (
File “/usr/local/lib/python3.4/dist-packages/OpenSSL/_util.py”, line 6, in
from cryptography.hazmat.bindings.openssl.binding import Binding
File “/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 173, in
Binding.init_static_locks()
File “/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 137, in init_static_locks
cls._ensure_ffi_initialized()
File “/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 124, in _ensure_ffi_initialized
cls.lib = build_conditional_library(lib, CONDITIONAL_NAMES)
File “/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 89, in build_conditional_library
if not getattr(lib, condition):
AttributeError: cffi library ‘_openssl’ has no function, constant or global variable named ‘Cryptography_HAS_SET_ECDH_AUTO’

ubuntu@mail:~$ curl -s https:// mailinabox email/setup.sh | sudo bash

FAILED: pip3 install email_validator>=1.0.0

Traceback (most recent call last):
File “/usr/bin/pip3”, line 9, in
load_entry_point(‘pip==1.5.4’, ‘console_scripts’, ‘pip3’)()
File “/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py”, line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py”, line 2631, in load_entry_point
return ep.load()
File “/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py”, line 2291, in load
return self.resolve()
File “/usr/local/lib/python3.4/dist-packages/pkg_resources/init.py”, line 2297, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/lib/python3/dist-packages/pip/init.py”, line 61, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File “/usr/lib/python3/dist-packages/pip/vcs/mercurial.py”, line 9, in
from pip.download import path_to_url
File “/usr/lib/python3/dist-packages/pip/download.py”, line 22, in
import requests, six
File “”, line 2237, in _find_and_load
File “”, line 2226, in _find_and_load_unlocked
File “”, line 1191, in _load_unlocked
File “”, line 1161, in _load_backward_compatible
File “/usr/share/python-wheels/requests-2.2.1-py2.py3-none-any.whl/requests/init.py”, line 53, in
File “”, line 2237, in _find_and_load
File “”, line 2226, in _find_and_load_unlocked
File “”, line 1191, in _load_unlocked
File “”, line 1161, in _load_backward_compatible
File “/usr/share/python-wheels/urllib3-1.7.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py”, line 25, in
File “/usr/local/lib/python3.4/dist-packages/OpenSSL/init.py”, line 8, in
from OpenSSL import rand, crypto, SSL
File “/usr/local/lib/python3.4/dist-packages/OpenSSL/rand.py”, line 12, in
from OpenSSL._util import (
File “/usr/local/lib/python3.4/dist-packages/OpenSSL/_util.py”, line 6, in
from cryptography.hazmat.bindings.openssl.binding import Binding
File “/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 173, in
Binding.init_static_locks()
File “/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 137, in init_static_locks
cls._ensure_ffi_initialized()
File “/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 124, in _ensure_ffi_initialized
cls.lib = build_conditional_library(lib, CONDITIONAL_NAMES)
File “/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py”, line 89, in build_conditional_library
if not getattr(lib, condition):
AttributeError: cffi library ‘_openssl’ has no function, constant or global variable named ‘Cryptography_HAS_SCRYPT’

ubuntu@mail:~$

Could you check the replies in this post to see if that works for you?

1 Like

Much appreciated good sir! =)
wipes brow

Hi,
I faced the same SSL dependency problem after the upgarde to 0.21 and also foolowed what is mentioned on the v0.21 anouncement post Version 0.21 is posted
Now I am facing git issues.

If I use the mailinabox command, I get this kind of results :

Mail-in-a-Box Version: v0.21b

Updating system packages…
Installing system packages…
setup/system.sh: line 122: syntax error near unexpected token <<<' setup/system.sh: line 122: <<<<<<< HEAD’

When I go to mailinabox repository and do :

git status
The console shows :

root@box:~/mailinabox# git status
HEAD detached at v0.21b
You have unmerged paths.
(fix conflicts and run “git commit”)

Unmerged paths:
(use “git add …” to mark resolution)

both added: CHANGELOG.md
both added: CONTRIBUTING.md
both added: README.md
both added: conf/zpush/backend_imap.php
both added: management/backup.py
both added: management/dns_update.py
both added: management/ssl_certificates.py
both added: management/status_checks.py
both added: management/templates/aliases.html
both added: management/templates/custom-dns.html
both added: management/templates/index.html
both added: management/templates/ssl.html
both added: management/templates/system-backup.html
both added: setup/bootstrap.sh
both added: setup/mail-postfix.sh
both added: setup/owncloud.sh
both added: setup/preflight.sh
both added: setup/spamassassin.sh
both added: setup/system.sh
both added: setup/webmail.sh
both added: setup/zpush.sh
both added: tests/fail2ban.py

no changes added to commit (use “git add” and/or “git commit -a”)

Even the admin status page is broken. The template seems to have unattended git anotation (like <<<) which are visible when loading the page and break the HTML structure.

Do you think I can do this whithout deleting confing or data files ? :

git fetch --all
git reset --hard origin/master

You can also delete the git repo and fetch again.