# Unable to restart the nginx service

**URL:** <https://discuss.elastic.co/t/unable-to-restart-the-nginx-service/335170>\
**Category:** Elasticsearch\
**Created:** [June 4, 2023, 7:10pm UTC](https://discuss.elastic.co/t/unable-to-restart-the-nginx-service/335170 "2023-06-04T19:10:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![surajhekare](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@surajhekare](https://discuss.elastic.co/u/surajhekare)\
**Post date:** [June 4, 2023, 7:10pm UTC](https://discuss.elastic.co/t/unable-to-restart-the-nginx-service/335170/1 "2023-06-04T19:10:01Z")

</div>

ubuntu@ip-172-31-37-106:~$ sudo service nginx restart  
Job for nginx.service failed because the control process exited with error code.  
See "systemctl status nginx.service" and "journalctl -xe" for details.

systemctl status nginx.service  
● 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 Sun 2023-06-04 19:04:59 UTC; 5min ago  
Docs: man:nginx(8)  
Process: 50555 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master\_process on; (code=exited, status=1/FAILURE)

Jun 04 19:04:59 ip-172-31-37-106 systemd[1]: Starting A high performance web server and a reverse proxy server...  
Jun 04 19:04:59 ip-172-31-37-106 nginx[50555]: nginx: [emerg] cannot load certificate "/etc/nginx/ssl/self-signed.crt": BIO\_new\_file() failed (SSL: e\>  
Jun 04 19:04:59 ip-172-31-37-106 nginx[50555]: nginx: configuration file /etc/nginx/nginx.conf test failed  
Jun 04 19:04:59 ip-172-31-37-106 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE  
Jun 04 19:04:59 ip-172-31-37-106 systemd[1]: nginx.service: Failed with result 'exit-code'.  
Jun 04 19:04:59 ip-172-31-37-106 systemd[1]: Failed to start A high performance web server and a reverse proxy server.

journalctl -xe  
Failed to start A high performance web server and a reverse proxy server.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 4, 2023, 7:48pm UTC](https://discuss.elastic.co/t/unable-to-restart-the-nginx-service/335170/2 "2023-06-04T19:48:02Z")

</div>

Hello,

Not sure how this relate to Elastic as Nginx is not an Elastic tool.

You need to look on a specific forum for Nginx or ask on Stack Overflow, this forum is for issues and question about Elastic tools.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 2, 2023, 7:48pm UTC](https://discuss.elastic.co/t/unable-to-restart-the-nginx-service/335170/3 "2023-07-02T19:48:32Z")

</div>

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