When I restart Nginx on a remote web server (slave member of a Pack), I get this:

root@testapp-01:/home/miguel# /etc/init.d/nginx restart
* Restarting nginx nginx
nginx: [emerg] "map_hash_bucket_size" directive is duplicate in /etc/nginx/conf.d/aegir.conf:42
nginx: configuration file /etc/nginx/nginx.conf test failed

The weird thing is, map_hash_bucket_size is only specified *once* on my entire system: in this very file.

This is under Ubuntu 12.04 LTS - nginx version 1.2.2-1~oneiric

I realise this might not be an Aegir-specific bug, but I wanted to raise it here in case anyone else has experienced the same thing and if so, did you find out what the root cause is? Have half a feeling that it's nginx treating the symlinks of this file (/etc/nginx/conf.d/aegir.conf symlinks to /var/aegir/config/nginx.conf which in turn is a symlink to the server-specific subfolder's nginx.conf) - but I might be wrong

Comments

Anonymous’s picture

Status: Active » Closed (works as designed)

I found my problematic line: hidden away in the main nginx.conf:

map $scheme $server_https { default off; https on; }

I missed this because I had been grepping for 'map_hash_bucket_size', 'bucket' etc, but never 'map'.

Ouch.

omega8cc’s picture

By the way, map_hash_bucket_size is no longer forced even in the extended configuration option, which is default:http://drupalcode.org/project/provision.git/commit/c74f5af

omega8cc’s picture

Issue summary: View changes

clarity

andyingham’s picture

I hit this same problem and investigated a bit further. It looks as though if you are going to declare a new value for "map_hash_bucket_size" then you have to do it before any 'map' blocks are defined. If a 'map' block appears before you set that new value, then you get the error:

"map_hash_bucket_size" directive is duplicate

The error is a bit misleading in this instance.