Bug 218956

Summary: www/nginx: XRID_HEADER option/module incompatible with nginx 1.12
Product: Ports & Packages Reporter: Thomas Steen Rasmussen / Tykling <thomas>
Component: Individual Port(s)Assignee: Sergey A. Osokin <osa>
Status: Closed FIXED    
Severity: Affects Some People CC: thomas
Priority: --- Flags: bugzilla: maintainer-feedback? (osa)
Version: Latest   
Hardware: Any   
OS: Any   

Description Thomas Steen Rasmussen / Tykling 2017-04-29 19:37:27 UTC
Hello,

nginx 1.12 grew its own $request_id variable [1] which means that the x-rid header module doesn't work anymore. When the module is compiled into 1.12 nginx fails to start with the following error:

    nginx: [emerg] the duplicate "request_id" variable in /usr/local/etc/nginx/nginx.conf:16

where line 16 is where the http {} section starts. This happens even with an empty http {} section.

This can be a nasty surprise if upgrading nginx on a server and it refuses to start no matter what you do.

Since nginx now has it's own $request_id variable which does the same thing more or less, I suggest just removing the XRID_HEADER option and module. Servers which use $request_id in logs or other places will keep working, although the unique request id looks different:

$request_id under nginx 1.10 with XRID_HEADER option: b14cb555-2c7a-11e7-9c03-0cc47a500f28
$request_id under nginx 1.12 without XRID_HEADER option: 416e2ca685b484a7c7218e24e3e98d4b

Alternatively we would have to get upstream to change the name of the request id variable in the 3rd party module at [2]. Once that is done we would have to warn all users to rename the variable in their configs.


Best regards

/Thomas

[1]: https://github.com/nginx/nginx/commit/f315b7a924fa2c0da69c21078c930391a424aeef
[2]: https://github.com/gabor/nginx-x-rid-header/blob/master/ngx_x_rid_header_module.c#L84
Comment 1 Thomas Steen Rasmussen / Tykling 2017-04-29 19:49:09 UTC
I've opened https://github.com/gabor/nginx-x-rid-header/pull/1 with upstream
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-04-30 20:56:32 UTC
A commit references this bug:

Author: osa
Date: Sun Apr 30 20:56:09 UTC 2017
New revision: 439844
URL: https://svnweb.freebsd.org/changeset/ports/439844

Log:
  Add IPV6 support knob back.

  Remove obsolete third-party modules:

  o) http_accesskey;
  o) xrid_header. (*)

  Bump PORTREVISION.

  PR:	218956 (*)

Changes:
  head/www/nginx/Makefile
  head/www/nginx-devel/Makefile
Comment 3 Sergey A. Osokin freebsd_committer freebsd_triage 2017-04-30 21:08:05 UTC
xrid_header has been removed, thanks for the report!