Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with ubuntu 16.04/nginx-extras #104

Closed
brandune opened this issue Aug 12, 2020 · 2 comments
Closed

Incompatibility with ubuntu 16.04/nginx-extras #104

brandune opened this issue Aug 12, 2020 · 2 comments

Comments

@brandune
Copy link

I think I've found an incompatibility using the nginx-extras package from ubuntu xenial/16.04 due to the version of the LUA module it was built with.

I do not expect a change from this project to fix the problem, but I'm inexperienced with LUA and C so I hope someone else can confirm what I found. If so, maybe it's worth a note in the README troubleshooting section.

Using the following versions:

  • os ubuntu=16.04
  • package nginx-extras=1.10.3-0ubuntu0.16.04.5
    • built with nginx-lua-module=v0.10.0 (based on the README found in the source tarball)
  • nginx-lua-prometheus=0.20200523

Using the init_worker block from this project's README, this error is logged on nginx startup:

2020/08/12 17:49:12 [error] 23560#23560: init_worker_by_lua error: /opt/nginx_lua/prometheus_keys.lua:90: expecting 3 arguments, but only seen 4
stack traceback:
        [C]: in function 'incr'
        /opt/nginx_lua/prometheus_keys.lua:90: in function 'add'
        /opt/nginx_lua/prometheus.lua:528: in function 'init'
        init_worker_by_lua:2: in main chunk
/opt/nginx_lua/prometheus_keys.lua:90:         self.dict:incr(self.key_count, 1, 0)

That call to incr is using the optional init parameter which was only added to nginx-lua-module in v0.10.6 - https://github.com/openresty/lua-nginx-module#ngxshareddictincr, so the version embedded in the nginx-extras package is too old to support this call.

At the cost of downgrading, using this project's 0.20181120 release seems to work without error.

@dolik-rce
Copy link
Contributor

Hi @brandune,

Your understanding of the problem is correct. I'm afraid you'll need to upgrade your nginx, if you need it to work with this module. You can try too look in PPAs or some other repositories...

Note that there is an open issue #98, which should help a bit by at least showing a clear error message.

@brandune
Copy link
Author

Thanks for the quick confirmation @dolik-rce, I'll close this since there isn't much to do. Adding that error message is definitely better than enumerating incompatibilities in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants