Error running a command. cmd = /opt/rockstor/.venv/bin/supervisorctl restart nginx. rc = 1. stdout = ['nginx: ERROR (no such process)', 'nginx: ERROR (no such process)', '']. stderr = ['']

Brief description of the problem

I’m unable to update the SSL certificate for Rockstor through the web-ui (/home#update-certificate). After specifying a certificate name, certificate and private key, I get the error below. However, the certificate is indeed updated and you just need to manually restart nginx with systemctl restart nginx.

Detailed step by step instructions to reproduce the problem

SSL Certificate tab under System, Update SSL Certificate and add the relevant configs.

Error Traceback provided on the Web-UI

Traceback (most recent call last): File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 41, in _handle_exception yield File "/opt/rockstor/src/rockstor/storageadmin/views/tls_certificate.py", line 92, in post superctl("nginx", "restart") File "/opt/rockstor/src/rockstor/system/services.py", line 142, in superctl out, err, rc = run_command([SUPERCTL_BIN, switch, service]) File "/opt/rockstor/src/rockstor/system/osi.py", line 227, in run_command logger.debug("Running command: {}".format(" ".join(cmd))) CommandException: Error running a command. cmd = /opt/rockstor/.venv/bin/supervisorctl restart nginx. rc = 1. stdout = ['nginx: ERROR (no such process)', 'nginx: ERROR (no such process)', '']. stderr = ['']
2 Likes

Hi @6ixfalls ,

Thanks a lot for your excellent report… we can see right away what is happening here and why :slight_smile:.

Could you confirm you are running Rockstor v4.5.4-0 or more recent?

From that version, we indeed switched from using supervisord to systemd to manage nginx… It seems like we missed an instance to update here. As you identified, we should now call systemct restart nginx from storageadmin.views.tls_certificate.py.

Given you did all the identification work, report, and fix, would you mind creating an issue in our Github repo (link below)? No worries if you’d rather not and we’ll take care of it; just let us know :slight_smile: .
https://github.com/rockstor/rockstor-core/issues/new

Thanks again for the report!

3 Likes

No problem! I’m currently running Rockstor v4.6.0, the latest version.
I’ve posted the issue here: SSL Certificate update doesn't restart nginx · Issue #2566 · rockstor/rockstor-core · GitHub
Thanks for the quick response!

1 Like

@Flox Re:

My apologies, that one was down to me.