gplessis/dotdeb-nginx

Unknown directive "xxx" preventing a proper upgrade to Nginx 1.10

Closed this issue · 13 comments

Hi,

I've just upgraded nginx on a couple of server. Everything is fine on Jessie. On Wheezy, nginx give me a:
unknown directive "add_header"

Here is the line from my configuration:
add_header X-Request-Received $time_iso8601;

The same configuration is used on both Wheezy and Jessie. Both nginx has "headers-more-nginx-module". Try some cleanup from my configuration to avoid any side-effect, still the same.

Is there someone with the same problem?

Hi,

there are definitely some module loading/linking issues with Nginx 1.10 and I'm currently investigating them.

But first, could you please make sure that you have the following line at the beginning of your /etc/nginx/nginx.conf file :

include /etc/nginx/modules-enabled/*.conf;

those unknown directive issues disappear with line

include /etc/nginx/modules-enabled/*.conf;

but still I get Floating point exception s on wheezy

some other problems resulted from failed updates/upgrades that just didn't complete due to that missing line. Which lead to broken packages and looping installation errors. I bet there won't be any "automated" solution.

Here is a minimal configuration with problem:

user www-data;
worker_processes auto;

pid /run/nginx.pid;

include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 12288;
}

http {
        add_header Ping pong;
        server {
                listen 80;

                root /var/www/html;
        }
}

Removing the "modules-enabled" line changes nothing.

As a side note, I had to disable mod-http-perl to avoid a "trap divide error".

Maybe linked to https://forum.nginx.org/read.php?2,264422,264482. Maybe trying without pagespeed.

tried minimal config (and pkg-dist, too) on wheezy => floating point error, removed mod-http-perl => unknown directive "add_header", so silly

the most clean downgrade procedure I was able to apply to 20+ different VMs by now:

save your config! (ie. tar cvfz /etc/nginx.tgz /etc/nginx)

stop nginx and make sure pid file is removed (located in /run/nginx.pid or wherever your config points it at)

clean removal of all updated packages:

apt-get remove libnginx* nginx-*

fresh reinstall of downgraded versions

apt-get install --reinstall nginx-common=1.8.1-1~dotdeb+7.1 nginx-extras=1.8.1-1~dotdeb+7.1

The Floating point exception error only happened on Wheezy. I'm investigating it.

@olivier-monaco good catch! Patching ngx_pagespeed resolved the Floating point exception issue on Wheezy. And it may even fix the Unknown directive / module loading issue. Packages are building now, I'll try to reproduce and fix the issue on the VM that @mashpie kindly provided. I'll keep you posted.

I managed to have the Floating point exception and Unknown directive issues fixed on Wheezy with the packages (version 1.10.1-1~dotdeb+7.2) that I just uploaded to the main Dotdeb repository.

Could you please try on your side and keep me posted?

@gplessis everything is fine with this version. Thank you!

I can confirm it's working with a simple update. Thanks again @gplessis !

applied to 10+VMs so far - 60+ to come. VMs that don't use any dynamic modules features upgrade fine without include /etc/nginx/modules-enabled/*.conf;

nginx-upload-progress appears broken still under jessie, error is:

nginx: [emerg] unknown directive "upload_progress" in /etc/nginx/nginx.conf:55

It is strange, because the module appears with nginx -V:

configure arguments: --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-file-aio --with-threads --with-http_addition_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --add-module=/usr/src/builddir/debian/modules/headers-more-nginx-module --add-dynamic-module=/usr/src/builddir/debian/modules/nginx-auth-pam --add-module=/usr/src/builddir/debian/modules/nginx-cache-purge --add-module=/usr/src/builddir/debian/modules/nginx-dav-ext-module --add-dynamic-module=/usr/src/builddir/debian/modules/nginx-development-kit --add-module=/usr/src/builddir/debian/modules/nginx-echo --add-module=/usr/src/builddir/debian/modules/ngx-fancyindex --add-module=/usr/src/builddir/debian/modules/nginx-push-stream-module --add-dynamic-module=/usr/src/builddir/debian/modules/nginx-lua --add-module=/usr/src/builddir/debian/modules/nginx-upload-progress --add-module=/usr/src/builddir/debian/modules/nginx-upstream-fair --add-module=/usr/src/builddir/debian/modules/ngx_http_substitutions_filter_module --add-module=/usr/src/builddir/debian/modules/nginx-auth-ldap --add-module=/usr/src/builddir/debian/modules/ngx_http_pinba_module --add-module=/usr/src/builddir/debian/modules/ngx_pagespeed --add-module=/usr/src/builddir/debian/modules/nginx-x-rid-header --add-module=/usr/src/builddir/debian/modules/nginx-rtmp-module --with-ld-opt=-lossp-uuid

@nathanjahnke see #82 i have the same issue