[Master Bug] Package nginx-* failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 (due to "Address in Use" issue)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Nginx |
Invalid
|
Undecided
|
Thomas Ward | ||
nginx (Ubuntu) |
Invalid
|
Undecided
|
Thomas Ward |
Bug Description
This is a master bug for all package-type nginx bugs with install/upgrade failures as a result of port 80 being already used by another process. It was created to be a 'master' for all the bugs which are caused by some other service being bound to *:80 (both IPv4 and IPv6) when any of the nginx flavors or server-binary packages are installed, and all subsequent bugs which match this type of issue will be marked as a duplicate of this one.
A purposely-generated 'package' bug of this type was created, and is located at https:/
------
The issue observed is not in and of itself a bug - this is an issue in which the system you are installing NGINX on already has something else listening on port 80.
To fix this issue, you need to first find what is listening on Port 80, and turn it off. At that time, either install NGINX or use 'apt-get install -f' to try and finish configuration.
An example of the error logs of this can be seen in Vivid and later with `systemctl -l status nginx.service` which will return something like the attached "systemctl_
summary: |
- Package nginx-* failed to install/upgrade due to Port 80 not being able - to be bound to. + [Master Bug] Package nginx-* failed to install/upgrade due to Port 80 + not being able to be bound to. |
Changed in nginx (Ubuntu): | |
status: | New → Invalid |
summary: |
- [Master Bug] Package nginx-* failed to install/upgrade due to Port 80 - not being able to be bound to, due to "Address In Use" errors. + [Master Bug] Package nginx-* failed to install/upgrade: subprocess + installed post-installation script returned error exit status 1 (due to + Port 80 being in use) |
summary: |
- [Master Bug] Package nginx-* failed to install/upgrade: subprocess - installed post-installation script returned error exit status 1 (due to - Port 80 being in use) + Package nginx-* failed to install/upgrade: subprocess installed post- + installation script returned error exit status 1 |
summary: |
- Package nginx-* failed to install/upgrade: subprocess installed post- - installation script returned error exit status 1 + [Master Bug] Package nginx-* failed to install/upgrade: subprocess + installed post-installation script returned error exit status 1 (due to + "Address in Use" issue) |
description: | updated |
Changed in nginx (Ubuntu): | |
status: | Invalid → Confirmed |
Changed in nginx (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in nginx: | |
assignee: | nobody → Rakib Hasan (rkb) |
status: | New → Invalid |
Changed in nginx: | |
assignee: | Rakib Hasan (rkb) → Thomas Ward (teward) |
When trying to fix this yourself...
(1) Check the output of one of these two commands:
'sudo netstat -tulpn | grep :80' OR 'sudo ss -tulpn | grep :80'
This will indicate what processes are listening on IP/Port combination *:80
(2) Once you know the process/pid that is listening on Port 80, kill it. Either stop the service (for example, if Apache is the one causing the conflict, use `sudo service apache2 stop`), or kill the process itself.
If you intend to use things side by side, such as Apache *and* nginx, temporarily stop one service while installing the other. Then modify your configurations so neither service is listening on the same ports as each other, and start up the services. This will resolve the issues.