[SOLVED] Something went wrong for original domain and trying to replace certificate

Hello. Working only with the original domain, when trying to replace the certificate SSL, throws follow error:

Feb 19 09:55:04 miab Exception on /ssl/csr/miab.aulafacil.email [POST]#012Traceback (most recent call last):#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1982, in wsgi_app#012 response = self.full_dispatch_request()#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1614, in full_dispatch_request#012 rv = self.handle_user_exception(e)#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1517, in handle_user_exception#012 reraise(exc_type, exc_value, tb)#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/_compat.py”, line 33, in reraise#012 raise value#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1612, in full_dispatch_request#012 rv = self.dispatch_request()#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1598, in dispatch_request#012 return self.view_functionsrule.endpoint#012 File “/root/mailinabox/management/daemon.py”, line 53, in newview#012 return viewfunc(*args, **kwargs)#012 File “/root/mailinabox/management/daemon.py”, line 361, in ssl_get_csr#012 return create_csr(domain, ssl_private_key, request.form.get(‘countrycode’, ‘’), env)#012 File “/root/mailinabox/management/ssl_certificates.py”, line 559, in create_csr#012 “-subj”, “/C=%s/ST=/L=/O=/CN=%s” % (country_code, domain)])#012 File “/root/mailinabox/management/utils.py”, line 123, in shell#012 ret = getattr(subprocess, method)(cmd_args, **kwargs)#012 File “/usr/lib/python3.4/subprocess.py”, line 620, in check_output#012 raise CalledProcessError(retcode, process.args, output=output)#012subprocess.CalledProcessError: Command ‘[‘openssl’, ‘req’, ‘-new’, ‘-key’, ‘/home/user-data/ssl/ssl_private_key.pem’, ‘-sha256’, ‘-subj’, ‘/C=/ST=/L=/O=/CN=miab.aulafacil.email’]’ returned non-zero exit status 1

Reviewing this ticket, Why didn’t had ssl_certificates.py updated?

Why I had this line?:
“-subj”, “/C=%s/ST=/L=/O=/CN=%s” % (country_code, domain)])
instead of?:
“-subj”, “/C=%s/CN=%s” % (country_code, domain)])

I’ve installed MIAB one week ago (Feb 13, 2018)

After upgrading with
curl -s https://mailinabox.email/setup.sh | sudo bash

and get v0.26c version…, when trying to replace certificate, I get this error:

Feb 19 12:09:45 miab Exception on /ssl/csr/miab.aulafacil.email [POST]#012Traceback (most recent call last):#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1982, in wsgi_app#012 response = self.full_dispatch_request()#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1614, in full_dispatch_request#012 rv = self.handle_user_exception(e)#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1517, in handle_user_exception#012 reraise(exc_type, exc_value, tb)#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/_compat.py”, line 33, in reraise#012 raise value#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1612, in full_dispatch_request#012 rv = self.dispatch_request()#012 File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/flask/app.py”, line 1598, in dispatch_request#012 return self.view_functionsrule.endpoint#012 File “/root/mailinabox/management/daemon.py”, line 53, in newview#012 return viewfunc(*args, **kwargs)#012 File “/root/mailinabox/management/daemon.py”, line 361, in ssl_get_csr#012 return create_csr(domain, ssl_private_key, request.form.get(‘countrycode’, ‘’), env)#012 File “/root/mailinabox/management/ssl_certificates.py”, line 560, in create_csr#012 File “/root/mailinabox/management/utils.py”, line 123, in shell#012 ret = getattr(subprocess, method)(cmd_args, **kwargs)#012 File “/usr/lib/python3.4/subprocess.py”, line 620, in check_output#012 raise CalledProcessError(retcode, process.args, output=output)#012subprocess.CalledProcessError: Command ‘[‘openssl’, ‘req’, ‘-new’, ‘-key’, ‘/home/user-data/ssl/ssl_private_key.pem’, ‘-sha256’, ‘-subj’, ‘/C=/CN=miab.aulafacil.email’]’ returned non-zero exit status 1

Am I the only one I have this error?

I would try rebooting the box if you haven’t already. There was an error in a previous version related to restarting the control panel and that might still be going on until a reboot.

1 Like