Bug 225473 - www/nginx unknown directive "upload_progress" after upgrade 1.12.2_4,2 -> 1.12.2_6,2
Summary: www/nginx unknown directive "upload_progress" after upgrade 1.12.2_4,2 -> 1.1...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jochen Neumeister
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-26 20:42 UTC by Matthias Fechner
Modified: 2018-04-25 19:01 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (joneum)


Attachments
patch (1.50 KB, patch)
2018-01-27 08:53 UTC, Jochen Neumeister
no flags Details | Diff
patch (1.49 KB, patch)
2018-01-27 08:56 UTC, Jochen Neumeister
no flags Details | Diff
testpatch (3.39 KB, patch)
2018-01-27 09:54 UTC, Jochen Neumeister
no flags Details | Diff
patch (1.82 KB, patch)
2018-04-25 18:53 UTC, Jochen Neumeister
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fechner freebsd_committer 2018-01-26 20:42:42 UTC
Nginx is compiled with the

OPTIONS_FILE_SET+=HTTP_UPLOAD_PROGRESS

set.

nginx -V shows:
...p_realip_module --with-http_slice_module --with-http_stub_status_module --add-module=/wrkdirs/usr/ports/www/nginx/work/nginx-upload-progress-module-0.9.2 --add-module=/wrkdirs/usr/ports/www/nginx/work/naxsi-0.55.3/naxsi_src --with-pcre --add-dynamic-module=/wrkdirs/usr/ports/www/nginx/work/passenger-5.1.12/src/nginx_module --with-http_v2_module -...

So you see the upload-progress module is compiled in.

With the update from 1.12.2_4,2 -> 1.12.2_6,2 I see now the following error message:
nginx -t
nginx: [emerg] unknown directive "upload_progress" in /usr/local/etc/nginx/nginx.conf:38
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Comment 1 Jochen Neumeister freebsd_committer 2018-01-27 07:49:12 UTC
Moin Matthias :-)

I do not have the problem. You are the only one who has reported anything like this

# nginx -V
nginx version: nginx/1.12.2
..... --with-http_slice_module --with-http_stub_status_module --with-http_sub_module --add-module=/usr/ports/www/nginx/work/nginx-upload-progress-module-0.9.2 --with-pcre --with-http_v2_module.....


# nginx -t
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Comment 2 Matthias Fechner freebsd_committer 2018-01-27 08:16:04 UTC
Moin Jochen,

have you configured nginx to use it?
Just add the following lines to your /usr/local/etc/nginx/nginx.conf:
http {
...
        # Support Upload Progress
        upload_progress uploads 1m;
...
}

Maybe then you will see the problem, too.
Comment 3 Jochen Neumeister freebsd_committer 2018-01-27 08:53:04 UTC
Created attachment 190099 [details]
patch
Comment 4 Jochen Neumeister freebsd_committer 2018-01-27 08:53:29 UTC
Heya Matthias,

i found this: https://github.com/masterzen/nginx-upload-progress-module/issues/50

Can you please test the attached patch and give me a feedback?
Comment 5 Jochen Neumeister freebsd_committer 2018-01-27 08:56:09 UTC
Created attachment 190100 [details]
patch
Comment 6 Matthias Fechner freebsd_committer 2018-01-27 09:36:24 UTC
Tested patch https://bugs.freebsd.org/bugzilla/attachment.cgi?id=190100

But it does not work.
Comment 7 Jochen Neumeister freebsd_committer 2018-01-27 09:39:02 UTC
(In reply to Matthias Fechner from comment #6)

The same error?
Comment 8 Matthias Fechner freebsd_committer 2018-01-27 09:43:01 UTC
yes:
nginx -t
nginx: [emerg] unknown directive "upload_progress" in /usr/local/etc/nginx/nginx.conf:44
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Comment 9 Matthias Fechner freebsd_committer 2018-01-27 09:51:00 UTC
Hi Jochen,

is it maybe now a dynamic module which must be loaded manually using a load_module line in the configuration?
Comment 10 Jochen Neumeister freebsd_committer 2018-01-27 09:53:59 UTC
hmmmm

https://github.com/masterzen/nginx-upload-progress-module/pull/51

If I understand correctly, he fixed it in afb2d31 [1].

So it would be possible to switch to this version

[1] https://github.com/masterzen/nginx-upload-progress-module/commit/afb2d31d1277c50bd6215c470ba94b843349e250
Comment 11 Jochen Neumeister freebsd_committer 2018-01-27 09:54:17 UTC
Created attachment 190102 [details]
testpatch
Comment 12 Jochen Neumeister freebsd_committer 2018-01-27 09:56:00 UTC
(In reply to Matthias Fechner from comment #9)

The problem is, the documentation is outdated and not up to date: https://github.com/masterzen/nginx-upload-progress-module
Comment 13 Jochen Neumeister freebsd_committer 2018-01-27 10:07:09 UTC
(In reply to Matthias Fechner from comment #2)


https://www.nginx.com/resources/wiki/modules/upload_progress/#configuration-example

Can you tested with "upload_progress proxied 1m;" ?
Comment 14 Matthias Fechner freebsd_committer 2018-01-27 10:32:52 UTC
(In reply to Jochen Neumeister from comment #11)
your patch https://bugs.freebsd.org/bugzilla/attachment.cgi?id=190102 fixed it.

No configuration changes necessary.
Thanks!
Comment 15 Alexey Markov 2018-01-27 12:08:23 UTC
I can confirm that the latest official port version nginx-1.12.2_6,2 has a forementioned problem with an upload_progress module:

test:/# /usr/local/etc/rc.d/nginx configtest
Performing sanity check on nginx configuration:
nginx: [emerg] unknown directive "upload_progress" in /usr/local/etc/nginx/nginx.conf:18
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed

After applying Jochen Neumeister's patch from comment #11 it at least pass the config test:

test:/# /usr/local/etc/rc.d/nginx configtest
Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Comment 16 commit-hook freebsd_committer 2018-01-27 12:58:10 UTC
A commit references this bug:

Author: joneum
Date: Sat Jan 27 12:57:24 UTC 2018
New revision: 460121
URL: https://svnweb.freebsd.org/changeset/ports/460121

Log:
  www/nginx: Fix building of uploadprogress module

  PR:		225473
  Reported by:	Matthias Fechner <idefix@fechner.net>
  Approved by:	tcberner (mentor)
  Differential Revision:	https://reviews.freebsd.org/D14069

Changes:
  head/www/nginx/Makefile
  head/www/nginx/distinfo
  head/www/nginx/files/extra-patch-masterzen-nginx-upload-progress-module
Comment 17 Jochen Neumeister freebsd_committer 2018-01-27 12:58:56 UTC
Landed. Thanks :-)
Comment 18 Matthias Fechner freebsd_committer 2018-03-30 08:41:28 UTC
The problem reappeared again with the new version nginx-1.12.2_11,2.
Comment 19 Bernard Spil freebsd_committer 2018-04-24 18:00:09 UTC
(In reply to Matthias Fechner from comment #18)

Hi Matthias,

Can you confirm if this is fixed in 1.14.0,2 or that the problem persists?

Cheers, Bernard.
Comment 20 Matthias Fechner freebsd_committer 2018-04-25 12:03:42 UTC
(In reply to Bernard Spil from comment #19)
sry I cannot test it anymore, I removed upload_progress from all my servers as the module is not stable.
Comment 21 Alexey Markov 2018-04-25 18:17:13 UTC
I can confirm that this error is NOT fixed in the latest port revision 1.14.0,2:

Performing sanity check on nginx configuration:
nginx: [emerg] unknown directive "upload_progress" in /usr/local/etc/nginx/nginx.conf:18
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Comment 22 Bernard Spil freebsd_committer 2018-04-25 18:27:54 UTC
 1. Is your nginx built with Dynamic modules
 2. Do you load the module in your config
      load_module "modules/ngx_http_uploadprogress_module";
Comment 23 Jochen Neumeister freebsd_committer 2018-04-25 18:53:05 UTC
Created attachment 192813 [details]
patch

Matthias and Alexey, can you please test this new patch?
Comment 24 Alexey Markov 2018-04-25 18:55:25 UTC
(In reply to Bernard Spil from comment #22)

After unchecking DSO and rebuilding port everything works fine.
Comment 25 Bernard Spil freebsd_committer 2018-04-25 18:58:28 UTC
(In reply to Alexey Markov from comment #24)
Did you test this with DSO enabled and the module loaded in config?
Comment 26 Jochen Neumeister freebsd_committer 2018-04-25 19:01:07 UTC
okay, solved ...
and i can delete the patch :-)