[alibaba/tengine]syslog模块加载出错

2024-08-21 637 views
2

配置文件一直使用正常,从GitHub新版升级引起出错

编译参数: Tengine version: Tengine/2.2.0 (nginx/1.8.0) built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) TLS SNI support enabled configure arguments: --with-http_sub_module --with-http_stub_status_module --with-jemalloc --with-http_gzip_static_module --with-syslog --with-http_ssl_module --with-http_v2_module

出错日志: tarting nginx: nginx: [emerg] unknown syslog parameter "daemon:err:syslog

回答

5

syslog的用法在Tengine/2.2.0应该是与官方统一了

参见http://nginx.org/en/docs/syslog.html

3

使用官方的语法,nginx -t是正常,但是运行不了,出现错误提示: nginx: [alert] pipe process 1939 exited on signal 11

8

能否把你syslog的配置贴一下。不清楚你用的是syslog还是pipe。不过不管怎么说,这块兼容性有待改进。

2

error_log syslog:server=192.168.1.1 debug; 就是nginx官方的测试代码

4

同样的配置文件在nginx1.9.9正常使用

2
  • reproduce with following configure:
error_log  syslog:server=192.168.1.1 debug;  # only one error_log directive in nginx.conf
  • gdb stacktrace info:
(gdb) set follow-fork-mode child
(gdb) r
Starting program: /home/xiaochen.wxc/work/github/tengine-xiaochen/output/sbin/nginx
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New process 31359]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Thread 2.1 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fdb7e0 (LWP 31359)]
0x0000000000419609 in ngx_log_redirect_stderr (cycle=0x7917e0) at src/core/ngx_log.c:448
448         fd = cycle->log->file->fd;
(gdb) bt
#0  0x0000000000419609 in ngx_log_redirect_stderr (cycle=0x7917e0) at src/core/ngx_log.c:448
#1  0x0000000000417e8f in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:409
(gdb) p cycle->log->file
$1 = (ngx_open_file_t *) 0x0
6

Thanks to @chobits for burying my old pit.