vozlt / nginx-module-vts

Nginx virtual host traffic status module
BSD 2-Clause "Simplified" License
3.22k stars 459 forks source link

[emerg] 1#1: module "/etc/nginx/modules/ngx_http_vhost_traffic_status_module.so" version 1022001 instead of 1025002 in /etc/nginx/nginx.conf:5 #281

Closed Udayendu closed 11 months ago

Udayendu commented 11 months ago

Unable to start the nginx 1.25.2 with nginx-module-vts v0.2.2 but when using nginx 1.22.1, its working fine. beyond this version its not working and giving the following error message:

➜ docker ps -a
CONTAINER ID   IMAGE            COMMAND                  CREATED         STATUS                     PORTS     NAMES
11ebb3cade44   nginx-with-vts   "/docker-entrypoint.…"   5 seconds ago   Exited (1) 4 seconds ago             nginx

➜ docker logs nginx 
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/10/20 13:18:22 [emerg] 1#1: module "/etc/nginx/modules/ngx_http_vhost_traffic_status_module.so" version 1022001 instead of 1025002 in /etc/nginx/nginx.conf:5
nginx: [emerg] module "/etc/nginx/modules/ngx_http_vhost_traffic_status_module.so" version 1022001 instead of 1025002 in /etc/nginx/nginx.conf:5

The module entry in my nginx.conf file:

➜ cat nginx.conf 
user www-data;
pid /run/nginx.pid;
worker_processes auto;
worker_rlimit_nofile 1048576;
load_module /etc/nginx/modules/ngx_http_vhost_traffic_status_module.so;

I have a requirement to use the latest version of nginx. How can I use the this module with the latest version of nginx ?

Udayendu commented 11 months ago

After using --with-compat option, its able to build the image. I will do some more testing and if all good, will close this issue.