Unable to restart nginxNginx installation error in Ubuntu 16.04smbd (samba daemon) does not listen on ports 139/445Nginx failed question programs not downloadingFailed to start raise network interface on Ubuntu 16.04Install Redis-Server on Ubuntu 16.04 LTS minimalsite inaccesible when i run a vhostUbuntu 18.04 Error with apache2nginx not restarting
At what point can you walk out of a restaurant if they make you wait to pay the bill?
SpaceX Starship landing on Moon or Mars: why doesn't it fall over?
Had J. K. Rowling seen This Is Spinal Tap before writing Harry Potter and the Philosopher's Stone?
Phrase: the sun is out
How to handle a supposedly corrupt boot partition?
What's the origin of the trope that dragons used to be common but aren't any more?
Wood glue versus epoxy for doweling stripped screw holes
Best way to drill square tubing (Without drill press)
How to write 2**n - 1 as a recursive function?
How to get previous command without arrow key
"Push chord". What's that?
Is this really played by 2200+ players?
Would fantasy dwarves be able to invent and/or manufacture the radio?
How to delete music as it's being played
Why doesn't the nucleus have "nucleus-probability cloud"?
Is there a name for the phenomenon of false positives counterintuitively outstripping true positives
If equal temperament divides an octave into 12 equal parts, why are the hertz differences not the same but 12ths of two?
What happened to SEV?
Copying files: Does Windows write to disk if files are identical
Why are telemedicine services regional?
Response to referee after rejection
Bass - describe attacking one note in one or more bars
Heat-shrink tubing available as a roll like adhesive tape?
What is Noita downloading every time I quit the game?
Unable to restart nginx
Nginx installation error in Ubuntu 16.04smbd (samba daemon) does not listen on ports 139/445Nginx failed question programs not downloadingFailed to start raise network interface on Ubuntu 16.04Install Redis-Server on Ubuntu 16.04 LTS minimalsite inaccesible when i run a vhostUbuntu 18.04 Error with apache2nginx not restarting
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I need to restart the process. What do I do when I keep seeing these messages? Do you need more commands?
$ nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
$ service nginx start
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 Wed 2019-05-29 13:28:29 KST; 26s ago
Process: 24508 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 31955 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Process: 31952 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 13077 (code=exited, status=0/SUCCESS)
May 29 13:28:27 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:27 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:28 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:28 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:29 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:29 ip-172-26-12-170 nginx[31955]: nginx: [emerg] still could not bind()
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Control process exited, code=exited status=1
May 29 13:28:29 ip-172-26-12-170 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Unit entered failed state.
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Failed with result 'exit-code'.
server nginx
add a comment
|
I need to restart the process. What do I do when I keep seeing these messages? Do you need more commands?
$ nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
$ service nginx start
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 Wed 2019-05-29 13:28:29 KST; 26s ago
Process: 24508 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 31955 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Process: 31952 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 13077 (code=exited, status=0/SUCCESS)
May 29 13:28:27 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:27 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:28 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:28 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:29 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:29 ip-172-26-12-170 nginx[31955]: nginx: [emerg] still could not bind()
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Control process exited, code=exited status=1
May 29 13:28:29 ip-172-26-12-170 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Unit entered failed state.
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Failed with result 'exit-code'.
server nginx
add a comment
|
I need to restart the process. What do I do when I keep seeing these messages? Do you need more commands?
$ nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
$ service nginx start
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 Wed 2019-05-29 13:28:29 KST; 26s ago
Process: 24508 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 31955 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Process: 31952 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 13077 (code=exited, status=0/SUCCESS)
May 29 13:28:27 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:27 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:28 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:28 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:29 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:29 ip-172-26-12-170 nginx[31955]: nginx: [emerg] still could not bind()
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Control process exited, code=exited status=1
May 29 13:28:29 ip-172-26-12-170 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Unit entered failed state.
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Failed with result 'exit-code'.
server nginx
I need to restart the process. What do I do when I keep seeing these messages? Do you need more commands?
$ nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
$ service nginx start
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 Wed 2019-05-29 13:28:29 KST; 26s ago
Process: 24508 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 31955 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Process: 31952 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 13077 (code=exited, status=0/SUCCESS)
May 29 13:28:27 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:27 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:28 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:28 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:29 ip-172-26-12-170 nginx[31955]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
May 29 13:28:29 ip-172-26-12-170 nginx[31955]: nginx: [emerg] still could not bind()
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Control process exited, code=exited status=1
May 29 13:28:29 ip-172-26-12-170 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Unit entered failed state.
May 29 13:28:29 ip-172-26-12-170 systemd[1]: nginx.service: Failed with result 'exit-code'.
server nginx
server nginx
edited May 29 at 8:45
noeppi noeppi
1034 bronze badges
1034 bronze badges
asked May 29 at 4:31
YangeokYangeok
1
1
add a comment
|
add a comment
|
2 Answers
2
active
oldest
votes
A application is currently listening on the on port 80
. Most likely it is a other instance of nginx
.
Find application that is listening on the socket
With the netstat command you can find the application which is currently listening on the socket. Also use grep to filter the output of netstat
.
$ netstat -lpn | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 780/nginx: master p
tcp6 0 0 :::80 :::* LISTEN 780/nginx: master p
The last entry of the list 780/nginx
tells you the PID
of the process currently listening on the port 80
.
Find and kill the application
With ps you can see the process structure of the process using the socket:
$ ps f -g780
PID TTY STAT TIME COMMAND
780 ? Ss 0:00 nginx: master process nginx
781 ? S 0:00 _ nginx: worker process
782 ? S 0:00 _ nginx: worker process
783 ? S 0:00 _ nginx: worker process
784 ? S 0:00 _ nginx: worker process
785 ? S 0:00 _ nginx: worker process
786 ? S 0:00 _ nginx: worker process
787 ? S 0:00 _ nginx: worker process
788 ? S 0:00 _ nginx: worker process
With the kill command you can now terminate the process which uses the socket:
$ kill 780
If that does not terminate the process with -9
:
$ kill -9 780
Then try to restart your nginx
service.
If that other process (nginx, pid 780 in this case) is controlled bysystemd
(which isn't unlikely for Ubuntu), then this won't help because systemd will just restart it. But the basic idea is correct: find and stop the other process that ist listening on port 80. Or reconfigure them to use different ports.
– PerlDuck
May 29 at 8:56
Of course I tried to kill the process. The first time I killnginx: master
, I getnginx: worker
. I also killed it. I also tried restarting the service.
– Yangeok
May 29 at 10:17
And the kill did not work?
– Simon Sudler
May 29 at 12:04
add a comment
|
In the future, here's something that might come in useful. You can check the syntax of Nginx's configuration files by running:
nginx -t -c /etc/nginx/nginx.conf
The error output will give you a hint at what the problem is as well as the line number.
or:
debug with command:
$ service nginx configtest
Which outputs something like:
Testing nginx configuration: nginx: [emerg] unknown directive "stub_status" in /etc/nginx/sites-enabled/nginx_status:11
nginx: configuration file /etc/nginx/nginx.conf test failed
Yes, but in this particular case nginx cannot start (despite a correct config file) because the port 80 is already occupied by another process.
– PerlDuck
May 29 at 9:59
Thank you for your answer. I came to know something new.
– Yangeok
May 29 at 10:16
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1147003%2funable-to-restart-nginx%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
A application is currently listening on the on port 80
. Most likely it is a other instance of nginx
.
Find application that is listening on the socket
With the netstat command you can find the application which is currently listening on the socket. Also use grep to filter the output of netstat
.
$ netstat -lpn | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 780/nginx: master p
tcp6 0 0 :::80 :::* LISTEN 780/nginx: master p
The last entry of the list 780/nginx
tells you the PID
of the process currently listening on the port 80
.
Find and kill the application
With ps you can see the process structure of the process using the socket:
$ ps f -g780
PID TTY STAT TIME COMMAND
780 ? Ss 0:00 nginx: master process nginx
781 ? S 0:00 _ nginx: worker process
782 ? S 0:00 _ nginx: worker process
783 ? S 0:00 _ nginx: worker process
784 ? S 0:00 _ nginx: worker process
785 ? S 0:00 _ nginx: worker process
786 ? S 0:00 _ nginx: worker process
787 ? S 0:00 _ nginx: worker process
788 ? S 0:00 _ nginx: worker process
With the kill command you can now terminate the process which uses the socket:
$ kill 780
If that does not terminate the process with -9
:
$ kill -9 780
Then try to restart your nginx
service.
If that other process (nginx, pid 780 in this case) is controlled bysystemd
(which isn't unlikely for Ubuntu), then this won't help because systemd will just restart it. But the basic idea is correct: find and stop the other process that ist listening on port 80. Or reconfigure them to use different ports.
– PerlDuck
May 29 at 8:56
Of course I tried to kill the process. The first time I killnginx: master
, I getnginx: worker
. I also killed it. I also tried restarting the service.
– Yangeok
May 29 at 10:17
And the kill did not work?
– Simon Sudler
May 29 at 12:04
add a comment
|
A application is currently listening on the on port 80
. Most likely it is a other instance of nginx
.
Find application that is listening on the socket
With the netstat command you can find the application which is currently listening on the socket. Also use grep to filter the output of netstat
.
$ netstat -lpn | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 780/nginx: master p
tcp6 0 0 :::80 :::* LISTEN 780/nginx: master p
The last entry of the list 780/nginx
tells you the PID
of the process currently listening on the port 80
.
Find and kill the application
With ps you can see the process structure of the process using the socket:
$ ps f -g780
PID TTY STAT TIME COMMAND
780 ? Ss 0:00 nginx: master process nginx
781 ? S 0:00 _ nginx: worker process
782 ? S 0:00 _ nginx: worker process
783 ? S 0:00 _ nginx: worker process
784 ? S 0:00 _ nginx: worker process
785 ? S 0:00 _ nginx: worker process
786 ? S 0:00 _ nginx: worker process
787 ? S 0:00 _ nginx: worker process
788 ? S 0:00 _ nginx: worker process
With the kill command you can now terminate the process which uses the socket:
$ kill 780
If that does not terminate the process with -9
:
$ kill -9 780
Then try to restart your nginx
service.
If that other process (nginx, pid 780 in this case) is controlled bysystemd
(which isn't unlikely for Ubuntu), then this won't help because systemd will just restart it. But the basic idea is correct: find and stop the other process that ist listening on port 80. Or reconfigure them to use different ports.
– PerlDuck
May 29 at 8:56
Of course I tried to kill the process. The first time I killnginx: master
, I getnginx: worker
. I also killed it. I also tried restarting the service.
– Yangeok
May 29 at 10:17
And the kill did not work?
– Simon Sudler
May 29 at 12:04
add a comment
|
A application is currently listening on the on port 80
. Most likely it is a other instance of nginx
.
Find application that is listening on the socket
With the netstat command you can find the application which is currently listening on the socket. Also use grep to filter the output of netstat
.
$ netstat -lpn | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 780/nginx: master p
tcp6 0 0 :::80 :::* LISTEN 780/nginx: master p
The last entry of the list 780/nginx
tells you the PID
of the process currently listening on the port 80
.
Find and kill the application
With ps you can see the process structure of the process using the socket:
$ ps f -g780
PID TTY STAT TIME COMMAND
780 ? Ss 0:00 nginx: master process nginx
781 ? S 0:00 _ nginx: worker process
782 ? S 0:00 _ nginx: worker process
783 ? S 0:00 _ nginx: worker process
784 ? S 0:00 _ nginx: worker process
785 ? S 0:00 _ nginx: worker process
786 ? S 0:00 _ nginx: worker process
787 ? S 0:00 _ nginx: worker process
788 ? S 0:00 _ nginx: worker process
With the kill command you can now terminate the process which uses the socket:
$ kill 780
If that does not terminate the process with -9
:
$ kill -9 780
Then try to restart your nginx
service.
A application is currently listening on the on port 80
. Most likely it is a other instance of nginx
.
Find application that is listening on the socket
With the netstat command you can find the application which is currently listening on the socket. Also use grep to filter the output of netstat
.
$ netstat -lpn | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 780/nginx: master p
tcp6 0 0 :::80 :::* LISTEN 780/nginx: master p
The last entry of the list 780/nginx
tells you the PID
of the process currently listening on the port 80
.
Find and kill the application
With ps you can see the process structure of the process using the socket:
$ ps f -g780
PID TTY STAT TIME COMMAND
780 ? Ss 0:00 nginx: master process nginx
781 ? S 0:00 _ nginx: worker process
782 ? S 0:00 _ nginx: worker process
783 ? S 0:00 _ nginx: worker process
784 ? S 0:00 _ nginx: worker process
785 ? S 0:00 _ nginx: worker process
786 ? S 0:00 _ nginx: worker process
787 ? S 0:00 _ nginx: worker process
788 ? S 0:00 _ nginx: worker process
With the kill command you can now terminate the process which uses the socket:
$ kill 780
If that does not terminate the process with -9
:
$ kill -9 780
Then try to restart your nginx
service.
edited May 29 at 8:12
answered May 29 at 8:03
Simon SudlerSimon Sudler
2,16610 silver badges21 bronze badges
2,16610 silver badges21 bronze badges
If that other process (nginx, pid 780 in this case) is controlled bysystemd
(which isn't unlikely for Ubuntu), then this won't help because systemd will just restart it. But the basic idea is correct: find and stop the other process that ist listening on port 80. Or reconfigure them to use different ports.
– PerlDuck
May 29 at 8:56
Of course I tried to kill the process. The first time I killnginx: master
, I getnginx: worker
. I also killed it. I also tried restarting the service.
– Yangeok
May 29 at 10:17
And the kill did not work?
– Simon Sudler
May 29 at 12:04
add a comment
|
If that other process (nginx, pid 780 in this case) is controlled bysystemd
(which isn't unlikely for Ubuntu), then this won't help because systemd will just restart it. But the basic idea is correct: find and stop the other process that ist listening on port 80. Or reconfigure them to use different ports.
– PerlDuck
May 29 at 8:56
Of course I tried to kill the process. The first time I killnginx: master
, I getnginx: worker
. I also killed it. I also tried restarting the service.
– Yangeok
May 29 at 10:17
And the kill did not work?
– Simon Sudler
May 29 at 12:04
If that other process (nginx, pid 780 in this case) is controlled by
systemd
(which isn't unlikely for Ubuntu), then this won't help because systemd will just restart it. But the basic idea is correct: find and stop the other process that ist listening on port 80. Or reconfigure them to use different ports.– PerlDuck
May 29 at 8:56
If that other process (nginx, pid 780 in this case) is controlled by
systemd
(which isn't unlikely for Ubuntu), then this won't help because systemd will just restart it. But the basic idea is correct: find and stop the other process that ist listening on port 80. Or reconfigure them to use different ports.– PerlDuck
May 29 at 8:56
Of course I tried to kill the process. The first time I kill
nginx: master
, I get nginx: worker
. I also killed it. I also tried restarting the service.– Yangeok
May 29 at 10:17
Of course I tried to kill the process. The first time I kill
nginx: master
, I get nginx: worker
. I also killed it. I also tried restarting the service.– Yangeok
May 29 at 10:17
And the kill did not work?
– Simon Sudler
May 29 at 12:04
And the kill did not work?
– Simon Sudler
May 29 at 12:04
add a comment
|
In the future, here's something that might come in useful. You can check the syntax of Nginx's configuration files by running:
nginx -t -c /etc/nginx/nginx.conf
The error output will give you a hint at what the problem is as well as the line number.
or:
debug with command:
$ service nginx configtest
Which outputs something like:
Testing nginx configuration: nginx: [emerg] unknown directive "stub_status" in /etc/nginx/sites-enabled/nginx_status:11
nginx: configuration file /etc/nginx/nginx.conf test failed
Yes, but in this particular case nginx cannot start (despite a correct config file) because the port 80 is already occupied by another process.
– PerlDuck
May 29 at 9:59
Thank you for your answer. I came to know something new.
– Yangeok
May 29 at 10:16
add a comment
|
In the future, here's something that might come in useful. You can check the syntax of Nginx's configuration files by running:
nginx -t -c /etc/nginx/nginx.conf
The error output will give you a hint at what the problem is as well as the line number.
or:
debug with command:
$ service nginx configtest
Which outputs something like:
Testing nginx configuration: nginx: [emerg] unknown directive "stub_status" in /etc/nginx/sites-enabled/nginx_status:11
nginx: configuration file /etc/nginx/nginx.conf test failed
Yes, but in this particular case nginx cannot start (despite a correct config file) because the port 80 is already occupied by another process.
– PerlDuck
May 29 at 9:59
Thank you for your answer. I came to know something new.
– Yangeok
May 29 at 10:16
add a comment
|
In the future, here's something that might come in useful. You can check the syntax of Nginx's configuration files by running:
nginx -t -c /etc/nginx/nginx.conf
The error output will give you a hint at what the problem is as well as the line number.
or:
debug with command:
$ service nginx configtest
Which outputs something like:
Testing nginx configuration: nginx: [emerg] unknown directive "stub_status" in /etc/nginx/sites-enabled/nginx_status:11
nginx: configuration file /etc/nginx/nginx.conf test failed
In the future, here's something that might come in useful. You can check the syntax of Nginx's configuration files by running:
nginx -t -c /etc/nginx/nginx.conf
The error output will give you a hint at what the problem is as well as the line number.
or:
debug with command:
$ service nginx configtest
Which outputs something like:
Testing nginx configuration: nginx: [emerg] unknown directive "stub_status" in /etc/nginx/sites-enabled/nginx_status:11
nginx: configuration file /etc/nginx/nginx.conf test failed
edited May 29 at 16:41
answered May 29 at 8:57
Mrz.RstMrz.Rst
14 bronze badges
14 bronze badges
Yes, but in this particular case nginx cannot start (despite a correct config file) because the port 80 is already occupied by another process.
– PerlDuck
May 29 at 9:59
Thank you for your answer. I came to know something new.
– Yangeok
May 29 at 10:16
add a comment
|
Yes, but in this particular case nginx cannot start (despite a correct config file) because the port 80 is already occupied by another process.
– PerlDuck
May 29 at 9:59
Thank you for your answer. I came to know something new.
– Yangeok
May 29 at 10:16
Yes, but in this particular case nginx cannot start (despite a correct config file) because the port 80 is already occupied by another process.
– PerlDuck
May 29 at 9:59
Yes, but in this particular case nginx cannot start (despite a correct config file) because the port 80 is already occupied by another process.
– PerlDuck
May 29 at 9:59
Thank you for your answer. I came to know something new.
– Yangeok
May 29 at 10:16
Thank you for your answer. I came to know something new.
– Yangeok
May 29 at 10:16
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1147003%2funable-to-restart-nginx%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown