package nginx-light 1.6.2-5ubuntu3.1 failed to install/upgrade - postinstallation script failed due to bad configuration directive in left over configuration files from prior installation tasks

Bug #1479477 reported by Bernhard Nikola
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nginx (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

only tried to install ...

ProblemType: Package
DistroRelease: Ubuntu 15.04
Package: nginx-light 1.6.2-5ubuntu3.1
ProcVersionSignature: Ubuntu 3.19.0-25.26-generic 3.19.8-ckt2
Uname: Linux 3.19.0-25-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
Date: Wed Jul 29 00:32:29 2015
DuplicateSignature: package:nginx-light:1.6.2-5ubuntu3.1:Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
ErrorMessage: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
InstallationDate: Installed on 2015-07-19 (10 days ago)
InstallationMedia: Lubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
RelatedPackageVersions:
 dpkg 1.17.25ubuntu1
 apt 1.0.9.7ubuntu4.1
SourcePackage: nginx
Title: package nginx-light 1.6.2-5ubuntu3.1 failed to install/upgrade: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Bernhard Nikola (bnikola) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Thomas Ward (teward) wrote :

Your apt history shows the following:

Start-Date: 2015-07-19 20:43:33
Commandline: /usr/sbin/synaptic
Install: ... nginx- core:amd64 (1.6.2-5ubuntu3, automatic), ... nginx-common:amd64 (1.6.2-5ubuntu3, automatic), nginx:amd64 (1.6.2-5ubuntu3), ...
Upgrade: tzdata:amd64 (2015c-1, 2015d-0ubuntu0.15.04)
End-Date: 2015-07-19 20:45:30

...

Start-Date: 2015-07-29 00:29:54
Commandline: /usr/sbin/synaptic
Remove: nginx-core:amd64 (1.6.2-5ubuntu3.1), nginx-common:amd64 (1.6.2-5ubuntu3.1), nginx:amd64 (1.6.2-5ubuntu3.1)
End-Date: 2015-07-29 00:29:58

Start-Date: 2015-07-29 00:32:21
Commandline: /usr/sbin/synaptic
Install: nginx-common:amd64 (1.6.2-5ubuntu3.1, automatic), nginx:amd64 (1.6.2-5ubuntu3.1), nginx-light:amd64 (1.6.2-5ubuntu3.1)

On July 19th: you installed the `nginx` metapackage, which installed nginx-common and nginx-core. Ten days later, on the 29th, you removed nginx-core, nginx-common, and nginx. You then installed nginx-common, nginx-light, and nginx.

With the bug, this is the error you are failing to install with (i.e. the service can't start because of - see the SystemctlStatusFull_Nginx.txt.txt attachment):

Jul 29 20:08:06 nn nginx[976]: nginx: [emerg] open() "/etc/nginx/fastcgi.config" failed (2: No such file or directory) in /etc/nginx/sites-enabled/default:49
Jul 29 20:08:06 nn nginx[976]: nginx: configuration file /etc/nginx/nginx.conf test failed

This indicates that somewhere in your configuration, an `include` was added to include the `fastcgi.config` file. However, that file doesn't exist even in a standard installation. It's actually called 'fastcgi.conf'.

Also, when you 'remove' a package, it doesn't actually erase the configuration files - it just removes the binary executables, so it left whatever configurations you had intact.

This is not a bug in the nginx package. This is an issue with the configuration file being left behind (it is NOT removed during an `apt-get remove` or a 'Remove package' command from Synaptic, only when you say 'Completely Remove' or run `apt-get remove --purge` to totally remove the package AND configuration files) having an incorrect configuration argument.

I can only surmise that during the ten days you had nginx-core installed, you messed around with the configuration files and mistyped the include line in the default sites-available file. This is, however, not a bug.

Changed in nginx (Ubuntu):
status: New → Invalid
summary: - package nginx-light 1.6.2-5ubuntu3.1 failed to install/upgrade:
- Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1
- zurück
+ package nginx-light 1.6.2-5ubuntu3.1 failed to install/upgrade -
+ postinstallation script failed due to bad configuration directive in
+ left over configuration files from prior installation tasks
Revision history for this message
Thomas Ward (teward) wrote :

If you wish to replace everything with a default install, do the following commands. ***Make sure that you back up anything you want to keep from /etc/nginx or /usr/share/nginx/html***:

sudo apt-get purge nginx nginx-light nginx-full nginx-extras nginx-common
sudo apt-get install nginx nginx-light nginx-common

This will purge all the existing configuration files and any of the nginx flavors, and then reinstall then with defaults.

Revision history for this message
Bernhard Nikola (bnikola) wrote : Re: [Bug 1479477] Re: package nginx-light 1.6.2-5ubuntu3.1 failed to install/upgrade - postinstallation script failed due to bad configuration directive in left over configuration files from prior installation tasks

Hello Thomas,

thx for the answer(s).

The -misstyped- file was really

fastcgi.config, cos i tool from the internet, and there are much configurations possible, everyone makes one - lol.

Now NGINX (1.9.1.1) is running, thx.

Greetings
Bernhard

.......................

Am 29.07.2015 um 22:22 schrieb Thomas Ward:
> If you wish to replace everything with a default install, do the
> following commands. ***Make sure that you back up anything you want to
> keep from /etc/nginx or /usr/share/nginx/html***:
>
> sudo apt-get purge nginx nginx-light nginx-full nginx-extras nginx-common
> sudo apt-get install nginx nginx-light nginx-common
>
>
> This will purge all the existing configuration files and any of the nginx flavors, and then reinstall then with defaults.
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.