Welcome! Log In Create A New Profile

Advanced

Perl module logs located in wrong file

January 12, 2021 08:59AM
Hello !

Here is the output of nginx -V :


nginx version: nginx/1.19.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)
built with OpenSSL 1.1.1g 21 Apr 2020
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx/1.19.2 --with-cc-opt='-I /logiciels/openssl/1.1.1/include/ -fstack-protector-strong' --with-cc='gcc -L/logiciels/openssl/1.1.1/lib64 -Wl,-rpath,/logiciels/openssl/1.1.1/lib64' --with-compat --with-file-aio --with-http_flv_module --with-http_stub_status_module --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module --with-pcre --with-debug --with-http_realip_module --with-http_addition_module --with-http_mp4_module --with-http_dav_module --with-http_random_index_module --with-http_degradation_module --with-http_perl_module --with-perl_modules_path=/opt/nginx/1.19.2/modules/perl/ --with-mail --with-mail_ssl_module --with-stream_ssl_module --with-http_secure_link_module --with-http_sub_module --with-http_auth_request_module --with-ipv6 --with-http_v2_module --with-stream --with-threads --with-http_gunzip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_slice_module --add-dynamic-module=./ngx_devel_kit-0.3.1 --add-dynamic-module=./lua-nginx-module-0.10.15 --add-dynamic-module=./headers-more-nginx-module-0.33 --add-module=./ngx_http_auth_ldap_module --with-ld-opt=-Wl,-rpath,/opt/luajit/lib

Here is my nginx.conf :


user w3user webgrp;
worker_processes 1;

load_module ./modules/ngx_http_headers_more_filter_module.so;
error_log /var/projects/instance/nginx_1.19/logs/error.log debug;

pid /var/projects/instance/nginx_1.19/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;
perl_modules /appli/projects/instance/nginx_1.19/conf/perl/modules/;
perl_modules ./modules/perl/;
perl_require test.pm;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/projects/instance/nginx_1.19/logs/access.log;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;
proxy_cache_path //var/projects/instance/nginx_1.19/cache/ levels=1:2 keys_zone=instance_cache:10m max_size=10g inactive=60m use_temp_path=off;
include /appli/projects/instance/nginx_1.19/conf//instance.conf;

}


I am witnessing a weird behaviour.
All logs are well written down in /var/projects/instance/nginx_1.19/logs/error.log (as provided in nginx.conf) excepting logs from perl_module which are written in /opt/nginx/1.19.2/logs/error.log.

For example (when nginx failed to locate perl module)

$ cat /opt/nginx/1.19.2/logs/error.log
2021/01/12 10:28:27 [emerg] 48992#48992: require_pv("test.pm") failed: "Can't locate test.pm in @INC (@INC contains: /appli/projects/instance/nginx_1.19/perl/modules/ /opt/nginx/1.19.2/./modules/perl/ /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 1) line 1."

or when start up went fine :

$ cat /opt/nginx/1.19.2/logs/error.log
2021/01/12 11:40:55 [notice] 53486#53486: signal process started

In other hand, remaining logs can be found in /var/projects/instance/nginx_1.19/logs/error.log.
This behaviour does not reproduce when I start nginx without perl module directives.

Any ideas of what is going on here ?

Thank you !

Antoine
Subject Author Posted

Perl module logs located in wrong file

Flinou January 12, 2021 08:59AM

Re: Perl module logs located in wrong file

Maxim Dounin January 12, 2021 12:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 221
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready