Nginx won't start since Ubuntu upgrade (16.04)
I have recently upgraded my Ubuntu server to the 16.04 release. Since then I can't start the nginx service.
Results of 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.
What my system logs says (cat /var/log/syslog
) :
May 20 17:03:53: Stopped A high performance web server and a reverse proxy server.
May 20 17:03:53: Starting A high performance web server and a reverse proxy server...
May 20 17:03:53: nginx.service: Failed at step EXEC spawning /usr/sbin/nginx: No such file or directory
May 20 17:03:53: nginx.service: Control process exited, code=exited status=203
May 20 17:03:53: Failed to start A high performance web server and a reverse proxy server.
May 20 17:03:53: nginx.service: Unit entered failed state.
May 20 17:03:53: nginx.service: Failed with result 'exit-code'.
Results of cat /lib/systemd/system/nginx.service
:
# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
# http://nginx.org/en/docs/control.html
#
[Unit]
Description=A high performance web server and a reverse proxy server
After=network.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
# Use TERM instead of QUIT to prevent Nginx from leaving stale Unix socket and failing the next start (https://trac.nginx.org/nginx/ticket/753)
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry TERM/5 --pidfile /run/nginx.pid
# Give Passenger a chance to clean up before being killed by systemd.
ExecStop=/bin/sleep 1
TimeoutStopSec=5
KillMode=mixed
[Install]
WantedBy=multi-user.target
There is indeed no file at /usr/sbin/nginx
, so I tried apt install nginx
, but here's the result :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nginx : Depends: nginx-core (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-full (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-light (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-extras (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed
Depends: nginx-core (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-full (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-light (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-extras (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
As a newbie, I'm pretty lost in that mess and I realy need a bit of help.
Thank you very much for your time.
Update 1:
Results of apt-cache policy nginx
:
nginx:
Installed: 1.12.0-1+xenial1
Candidate: 1.12.0-1+xenial1
Version table:
*** 1.12.0-1+xenial1 500
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main amd64 Packages
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main i386 Packages
100 /home/var/lib/dpkg/status
1.10.0-0ubuntu0.16.04.4 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
1.9.15-0ubuntu1 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main i386 Packages
upgrade nginx
add a comment |
I have recently upgraded my Ubuntu server to the 16.04 release. Since then I can't start the nginx service.
Results of 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.
What my system logs says (cat /var/log/syslog
) :
May 20 17:03:53: Stopped A high performance web server and a reverse proxy server.
May 20 17:03:53: Starting A high performance web server and a reverse proxy server...
May 20 17:03:53: nginx.service: Failed at step EXEC spawning /usr/sbin/nginx: No such file or directory
May 20 17:03:53: nginx.service: Control process exited, code=exited status=203
May 20 17:03:53: Failed to start A high performance web server and a reverse proxy server.
May 20 17:03:53: nginx.service: Unit entered failed state.
May 20 17:03:53: nginx.service: Failed with result 'exit-code'.
Results of cat /lib/systemd/system/nginx.service
:
# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
# http://nginx.org/en/docs/control.html
#
[Unit]
Description=A high performance web server and a reverse proxy server
After=network.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
# Use TERM instead of QUIT to prevent Nginx from leaving stale Unix socket and failing the next start (https://trac.nginx.org/nginx/ticket/753)
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry TERM/5 --pidfile /run/nginx.pid
# Give Passenger a chance to clean up before being killed by systemd.
ExecStop=/bin/sleep 1
TimeoutStopSec=5
KillMode=mixed
[Install]
WantedBy=multi-user.target
There is indeed no file at /usr/sbin/nginx
, so I tried apt install nginx
, but here's the result :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nginx : Depends: nginx-core (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-full (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-light (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-extras (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed
Depends: nginx-core (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-full (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-light (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-extras (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
As a newbie, I'm pretty lost in that mess and I realy need a bit of help.
Thank you very much for your time.
Update 1:
Results of apt-cache policy nginx
:
nginx:
Installed: 1.12.0-1+xenial1
Candidate: 1.12.0-1+xenial1
Version table:
*** 1.12.0-1+xenial1 500
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main amd64 Packages
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main i386 Packages
100 /home/var/lib/dpkg/status
1.10.0-0ubuntu0.16.04.4 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
1.9.15-0ubuntu1 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main i386 Packages
upgrade nginx
I had something similar happen for a different reason. I'm not sure how this happened, but overnight, possibly because of a restart that triggered an update, Apache was running and was blocking Nginx from running. If the above doesn't work, you may want to see if you have apache running too. In which case, stop the apache service, then try to start nginx.
– user7547701
Feb 7 at 17:50
add a comment |
I have recently upgraded my Ubuntu server to the 16.04 release. Since then I can't start the nginx service.
Results of 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.
What my system logs says (cat /var/log/syslog
) :
May 20 17:03:53: Stopped A high performance web server and a reverse proxy server.
May 20 17:03:53: Starting A high performance web server and a reverse proxy server...
May 20 17:03:53: nginx.service: Failed at step EXEC spawning /usr/sbin/nginx: No such file or directory
May 20 17:03:53: nginx.service: Control process exited, code=exited status=203
May 20 17:03:53: Failed to start A high performance web server and a reverse proxy server.
May 20 17:03:53: nginx.service: Unit entered failed state.
May 20 17:03:53: nginx.service: Failed with result 'exit-code'.
Results of cat /lib/systemd/system/nginx.service
:
# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
# http://nginx.org/en/docs/control.html
#
[Unit]
Description=A high performance web server and a reverse proxy server
After=network.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
# Use TERM instead of QUIT to prevent Nginx from leaving stale Unix socket and failing the next start (https://trac.nginx.org/nginx/ticket/753)
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry TERM/5 --pidfile /run/nginx.pid
# Give Passenger a chance to clean up before being killed by systemd.
ExecStop=/bin/sleep 1
TimeoutStopSec=5
KillMode=mixed
[Install]
WantedBy=multi-user.target
There is indeed no file at /usr/sbin/nginx
, so I tried apt install nginx
, but here's the result :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nginx : Depends: nginx-core (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-full (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-light (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-extras (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed
Depends: nginx-core (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-full (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-light (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-extras (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
As a newbie, I'm pretty lost in that mess and I realy need a bit of help.
Thank you very much for your time.
Update 1:
Results of apt-cache policy nginx
:
nginx:
Installed: 1.12.0-1+xenial1
Candidate: 1.12.0-1+xenial1
Version table:
*** 1.12.0-1+xenial1 500
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main amd64 Packages
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main i386 Packages
100 /home/var/lib/dpkg/status
1.10.0-0ubuntu0.16.04.4 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
1.9.15-0ubuntu1 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main i386 Packages
upgrade nginx
I have recently upgraded my Ubuntu server to the 16.04 release. Since then I can't start the nginx service.
Results of 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.
What my system logs says (cat /var/log/syslog
) :
May 20 17:03:53: Stopped A high performance web server and a reverse proxy server.
May 20 17:03:53: Starting A high performance web server and a reverse proxy server...
May 20 17:03:53: nginx.service: Failed at step EXEC spawning /usr/sbin/nginx: No such file or directory
May 20 17:03:53: nginx.service: Control process exited, code=exited status=203
May 20 17:03:53: Failed to start A high performance web server and a reverse proxy server.
May 20 17:03:53: nginx.service: Unit entered failed state.
May 20 17:03:53: nginx.service: Failed with result 'exit-code'.
Results of cat /lib/systemd/system/nginx.service
:
# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
# http://nginx.org/en/docs/control.html
#
[Unit]
Description=A high performance web server and a reverse proxy server
After=network.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
# Use TERM instead of QUIT to prevent Nginx from leaving stale Unix socket and failing the next start (https://trac.nginx.org/nginx/ticket/753)
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry TERM/5 --pidfile /run/nginx.pid
# Give Passenger a chance to clean up before being killed by systemd.
ExecStop=/bin/sleep 1
TimeoutStopSec=5
KillMode=mixed
[Install]
WantedBy=multi-user.target
There is indeed no file at /usr/sbin/nginx
, so I tried apt install nginx
, but here's the result :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nginx : Depends: nginx-core (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-full (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-light (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed or
nginx-extras (>= 1.10.0-0ubuntu0.16.04.4) but it is not going to be installed
Depends: nginx-core (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-full (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-light (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed or
nginx-extras (< 1.10.0-0ubuntu0.16.04.4.1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
As a newbie, I'm pretty lost in that mess and I realy need a bit of help.
Thank you very much for your time.
Update 1:
Results of apt-cache policy nginx
:
nginx:
Installed: 1.12.0-1+xenial1
Candidate: 1.12.0-1+xenial1
Version table:
*** 1.12.0-1+xenial1 500
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main amd64 Packages
500 http://ppa.launchpad.net/nginx/stable/ubuntu xenial/main i386 Packages
100 /home/var/lib/dpkg/status
1.10.0-0ubuntu0.16.04.4 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
1.9.15-0ubuntu1 500
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu xenial/main i386 Packages
upgrade nginx
upgrade nginx
edited May 20 '17 at 15:40
William Mai
asked May 20 '17 at 15:33
William MaiWilliam Mai
2815
2815
I had something similar happen for a different reason. I'm not sure how this happened, but overnight, possibly because of a restart that triggered an update, Apache was running and was blocking Nginx from running. If the above doesn't work, you may want to see if you have apache running too. In which case, stop the apache service, then try to start nginx.
– user7547701
Feb 7 at 17:50
add a comment |
I had something similar happen for a different reason. I'm not sure how this happened, but overnight, possibly because of a restart that triggered an update, Apache was running and was blocking Nginx from running. If the above doesn't work, you may want to see if you have apache running too. In which case, stop the apache service, then try to start nginx.
– user7547701
Feb 7 at 17:50
I had something similar happen for a different reason. I'm not sure how this happened, but overnight, possibly because of a restart that triggered an update, Apache was running and was blocking Nginx from running. If the above doesn't work, you may want to see if you have apache running too. In which case, stop the apache service, then try to start nginx.
– user7547701
Feb 7 at 17:50
I had something similar happen for a different reason. I'm not sure how this happened, but overnight, possibly because of a restart that triggered an update, Apache was running and was blocking Nginx from running. If the above doesn't work, you may want to see if you have apache running too. In which case, stop the apache service, then try to start nginx.
– user7547701
Feb 7 at 17:50
add a comment |
1 Answer
1
active
oldest
votes
So you've got two things which are in conflict and have led it seems to the nginx binaries going away somehow: Xenial repository version, and the NGINX PPA. As the maintainer of both, allow me to explain the conflict.
In Xenial, we released 1.10.0 just after release as an update. This update pushed us to a 'stable' branch but didn't have dynamically-loadable modules built and made available. This was due to time but also build conflicts that arose during tests. We eventually got dynamic module support working, in Zesty.
In the PPA, we've always cloned directly from Debian. That means, we always had Debian's 'dynamic module' support, which conflicted with the Xenial packages and resulted in some installation and upgrade conflicts.
There's a small conflict here - you can't mix-and-match nginx-core
(which is the default flavor installed for the nginx
package in Ubuntu) and the PPAs, as it sometimes makes things disappearify. The problem here, then, is we need to remove the existing Ubuntu package and then install from the PPA only.
To resolve this, you'll first need to back up your nginx configurations you want to keep for your sites. That is, make a copy of your /etc/nginx/sites-available/ directory somewhere else (even in your user's home directory is fine, we just need a copy of the site configurations). As well, we'll need a backup of your website data, so copy that somewhere else as well (NOT in the standard docroot, so it doesn't get messed up).
Once you make the copy, you'll have to remove the existing nginx packages. This can be done with the following command:
sudo apt-get remove nginx nginx-common nginx-doc nginx-core nginx-full nginx-extras nginx-light
Once that is complete, run sudo apt-get update
again just to make sure we have the most up to date version numberings.
Then, install nginx
from the PPA - sudo apt-get install nginx nginx-full nginx-common
should do this.
You should no longer be getting failed to start errors. Make sure your site configurations are still in place, and didn't get overwritten. If they did, restore from the backups we took earlier of the site config and the site data. Otherwise, you're all set.
Worked! Thank you very much for your help Thomas.
– William Mai
May 20 '17 at 16:25
add a comment |
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/3.0/"u003ecc by-sa 3.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%2f917147%2fnginx-wont-start-since-ubuntu-upgrade-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
So you've got two things which are in conflict and have led it seems to the nginx binaries going away somehow: Xenial repository version, and the NGINX PPA. As the maintainer of both, allow me to explain the conflict.
In Xenial, we released 1.10.0 just after release as an update. This update pushed us to a 'stable' branch but didn't have dynamically-loadable modules built and made available. This was due to time but also build conflicts that arose during tests. We eventually got dynamic module support working, in Zesty.
In the PPA, we've always cloned directly from Debian. That means, we always had Debian's 'dynamic module' support, which conflicted with the Xenial packages and resulted in some installation and upgrade conflicts.
There's a small conflict here - you can't mix-and-match nginx-core
(which is the default flavor installed for the nginx
package in Ubuntu) and the PPAs, as it sometimes makes things disappearify. The problem here, then, is we need to remove the existing Ubuntu package and then install from the PPA only.
To resolve this, you'll first need to back up your nginx configurations you want to keep for your sites. That is, make a copy of your /etc/nginx/sites-available/ directory somewhere else (even in your user's home directory is fine, we just need a copy of the site configurations). As well, we'll need a backup of your website data, so copy that somewhere else as well (NOT in the standard docroot, so it doesn't get messed up).
Once you make the copy, you'll have to remove the existing nginx packages. This can be done with the following command:
sudo apt-get remove nginx nginx-common nginx-doc nginx-core nginx-full nginx-extras nginx-light
Once that is complete, run sudo apt-get update
again just to make sure we have the most up to date version numberings.
Then, install nginx
from the PPA - sudo apt-get install nginx nginx-full nginx-common
should do this.
You should no longer be getting failed to start errors. Make sure your site configurations are still in place, and didn't get overwritten. If they did, restore from the backups we took earlier of the site config and the site data. Otherwise, you're all set.
Worked! Thank you very much for your help Thomas.
– William Mai
May 20 '17 at 16:25
add a comment |
So you've got two things which are in conflict and have led it seems to the nginx binaries going away somehow: Xenial repository version, and the NGINX PPA. As the maintainer of both, allow me to explain the conflict.
In Xenial, we released 1.10.0 just after release as an update. This update pushed us to a 'stable' branch but didn't have dynamically-loadable modules built and made available. This was due to time but also build conflicts that arose during tests. We eventually got dynamic module support working, in Zesty.
In the PPA, we've always cloned directly from Debian. That means, we always had Debian's 'dynamic module' support, which conflicted with the Xenial packages and resulted in some installation and upgrade conflicts.
There's a small conflict here - you can't mix-and-match nginx-core
(which is the default flavor installed for the nginx
package in Ubuntu) and the PPAs, as it sometimes makes things disappearify. The problem here, then, is we need to remove the existing Ubuntu package and then install from the PPA only.
To resolve this, you'll first need to back up your nginx configurations you want to keep for your sites. That is, make a copy of your /etc/nginx/sites-available/ directory somewhere else (even in your user's home directory is fine, we just need a copy of the site configurations). As well, we'll need a backup of your website data, so copy that somewhere else as well (NOT in the standard docroot, so it doesn't get messed up).
Once you make the copy, you'll have to remove the existing nginx packages. This can be done with the following command:
sudo apt-get remove nginx nginx-common nginx-doc nginx-core nginx-full nginx-extras nginx-light
Once that is complete, run sudo apt-get update
again just to make sure we have the most up to date version numberings.
Then, install nginx
from the PPA - sudo apt-get install nginx nginx-full nginx-common
should do this.
You should no longer be getting failed to start errors. Make sure your site configurations are still in place, and didn't get overwritten. If they did, restore from the backups we took earlier of the site config and the site data. Otherwise, you're all set.
Worked! Thank you very much for your help Thomas.
– William Mai
May 20 '17 at 16:25
add a comment |
So you've got two things which are in conflict and have led it seems to the nginx binaries going away somehow: Xenial repository version, and the NGINX PPA. As the maintainer of both, allow me to explain the conflict.
In Xenial, we released 1.10.0 just after release as an update. This update pushed us to a 'stable' branch but didn't have dynamically-loadable modules built and made available. This was due to time but also build conflicts that arose during tests. We eventually got dynamic module support working, in Zesty.
In the PPA, we've always cloned directly from Debian. That means, we always had Debian's 'dynamic module' support, which conflicted with the Xenial packages and resulted in some installation and upgrade conflicts.
There's a small conflict here - you can't mix-and-match nginx-core
(which is the default flavor installed for the nginx
package in Ubuntu) and the PPAs, as it sometimes makes things disappearify. The problem here, then, is we need to remove the existing Ubuntu package and then install from the PPA only.
To resolve this, you'll first need to back up your nginx configurations you want to keep for your sites. That is, make a copy of your /etc/nginx/sites-available/ directory somewhere else (even in your user's home directory is fine, we just need a copy of the site configurations). As well, we'll need a backup of your website data, so copy that somewhere else as well (NOT in the standard docroot, so it doesn't get messed up).
Once you make the copy, you'll have to remove the existing nginx packages. This can be done with the following command:
sudo apt-get remove nginx nginx-common nginx-doc nginx-core nginx-full nginx-extras nginx-light
Once that is complete, run sudo apt-get update
again just to make sure we have the most up to date version numberings.
Then, install nginx
from the PPA - sudo apt-get install nginx nginx-full nginx-common
should do this.
You should no longer be getting failed to start errors. Make sure your site configurations are still in place, and didn't get overwritten. If they did, restore from the backups we took earlier of the site config and the site data. Otherwise, you're all set.
So you've got two things which are in conflict and have led it seems to the nginx binaries going away somehow: Xenial repository version, and the NGINX PPA. As the maintainer of both, allow me to explain the conflict.
In Xenial, we released 1.10.0 just after release as an update. This update pushed us to a 'stable' branch but didn't have dynamically-loadable modules built and made available. This was due to time but also build conflicts that arose during tests. We eventually got dynamic module support working, in Zesty.
In the PPA, we've always cloned directly from Debian. That means, we always had Debian's 'dynamic module' support, which conflicted with the Xenial packages and resulted in some installation and upgrade conflicts.
There's a small conflict here - you can't mix-and-match nginx-core
(which is the default flavor installed for the nginx
package in Ubuntu) and the PPAs, as it sometimes makes things disappearify. The problem here, then, is we need to remove the existing Ubuntu package and then install from the PPA only.
To resolve this, you'll first need to back up your nginx configurations you want to keep for your sites. That is, make a copy of your /etc/nginx/sites-available/ directory somewhere else (even in your user's home directory is fine, we just need a copy of the site configurations). As well, we'll need a backup of your website data, so copy that somewhere else as well (NOT in the standard docroot, so it doesn't get messed up).
Once you make the copy, you'll have to remove the existing nginx packages. This can be done with the following command:
sudo apt-get remove nginx nginx-common nginx-doc nginx-core nginx-full nginx-extras nginx-light
Once that is complete, run sudo apt-get update
again just to make sure we have the most up to date version numberings.
Then, install nginx
from the PPA - sudo apt-get install nginx nginx-full nginx-common
should do this.
You should no longer be getting failed to start errors. Make sure your site configurations are still in place, and didn't get overwritten. If they did, restore from the backups we took earlier of the site config and the site data. Otherwise, you're all set.
edited May 20 '17 at 18:03
answered May 20 '17 at 15:58
Thomas Ward♦Thomas Ward
45k23125178
45k23125178
Worked! Thank you very much for your help Thomas.
– William Mai
May 20 '17 at 16:25
add a comment |
Worked! Thank you very much for your help Thomas.
– William Mai
May 20 '17 at 16:25
Worked! Thank you very much for your help Thomas.
– William Mai
May 20 '17 at 16:25
Worked! Thank you very much for your help Thomas.
– William Mai
May 20 '17 at 16:25
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%2f917147%2fnginx-wont-start-since-ubuntu-upgrade-16-04%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
I had something similar happen for a different reason. I'm not sure how this happened, but overnight, possibly because of a restart that triggered an update, Apache was running and was blocking Nginx from running. If the above doesn't work, you may want to see if you have apache running too. In which case, stop the apache service, then try to start nginx.
– user7547701
Feb 7 at 17:50