Nginx.service failed because the control process exited with error code when Install Passbolt CE on Ubuntu 18.04

So following the steps on the guide the installation scrip stop at

===================

Setting up nginx…

===================

Server names hash bucket is 64

Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.

Executing: /lib/systemd/systemd-sysv-install enable nginx

Job for nginx.service failed because the control process exited with error code.

See “systemctl status nginx.service” and “journalctl -xe” for details.

Upon looking at the detail it show

nginx.service - A high performance web server and a reverse proxy server

Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Thu 2020-08-06 04:56:02 UTC; 30s ago

Docs: man:nginx(8)

Process: 2563 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Aug 06 04:56:02 ip-172-31-12-56 systemd[1]: Starting A high performance web server and a reverse proxy server…

Aug 06 04:56:02 ip-172-31-12-56 nginx[2563]: nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 64

Aug 06 04:56:02 ip-172-31-12-56 nginx[2563]: nginx: configuration file /etc/nginx/nginx.conf test failed

Aug 06 04:56:02 ip-172-31-12-56 systemd[1]: nginx.service: Control process exited, code=exited status=1

Aug 06 04:56:02 ip-172-31-12-56 systemd[1]: nginx.service: Failed with result ‘exit-code’.

Aug 06 04:56:02 ip-172-31-12-56 systemd[1]: Failed to start A high performance web server and a reverse proxy server.

Is there a fix for this? Next step is try to do a step by step installation.

Thanks for your help

Hi @tyw,

This is usally because your domain name is too long for the default server_names_hash_bucket_size

You can edit the /etc/nginx/nginx.conf and set server_names_has_buscket_size to a bigger value. Then try to restart nginx.

Thanks. I figure it out. I tried to reinstall with the ip and it didn’t work, but then I wipe it clean and start over it work.

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