Welcome! Log In Create A New Profile

Advanced

Re: nginx 1.11.5 'duplicate' map_hash_bucket_size error when geoip_country block used?

Anonymous User
October 24, 2016 12:10PM
On Mon, Oct 24, 2016, at 05:20 AM, Maxim Dounin wrote:
> It's not relevant to geoip_country, but rather to the map{} block
> before the map_hash_bucket_size directive. Something like
>
> map $uri $foo {}
> map_hash_bucket_size 4096;
>
> is enough to trigger the error, as the map{} block requires some
> hash bucket size to be set. And if it is not set when parsing a
> map{} block, it is automatically configures bucket size to a
> default value. An attempt to redefine bucket size later will
> trigger the error, and this is what happens with the above
> configuration.
>
> The message is a bit misleading in this particular situation
> as it is a generic one. Though the fact that the configuration is
> rejected is correct: nginx can't use the value specified in the
> map_hash_bucket_size directive, and hence it is expected to reject
> the configuration.
>
> An obvious solution would be to specify map_hash_bucket_size
> before the map{} block, i.e.:
>
> map_hash_bucket_size 4096;
> map $uri $foo {}

Clearly explained, and the 'solution', of simply ordering the commands as above, works as promised.

Once you understand what's going on, "directive is duplicate in" actually makes sense.

Curious, did I miss this ^^ fact in the docs somewhere?

Obviously not critical, but a more clearly descriptive/relevant error would be nice ....

Thanks.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx 1.11.5 'duplicate' map_hash_bucket_size error when geoip_country block used?

Anonymous User October 22, 2016 12:32PM

Re: nginx 1.11.5 'duplicate' map_hash_bucket_size error when geoip_country block used?

itpp2012 October 22, 2016 12:42PM

Re: nginx 1.11.5 'duplicate' map_hash_bucket_size error when geoip_country block used?

Anonymous User October 22, 2016 01:30PM

Re: nginx 1.11.5 'duplicate' map_hash_bucket_size error when geoip_country block used?

Maxim Dounin October 24, 2016 08:22AM

Re: nginx 1.11.5 'duplicate' map_hash_bucket_size error when geoip_country block used?

Anonymous User October 24, 2016 12:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 110
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready