alibaba / tengine

A distribution of Nginx with some advanced features
https://tengine.taobao.org
BSD 2-Clause "Simplified" License
12.82k stars 2.52k forks source link

syslog模块加载出错 #683

Open telking opened 8 years ago

telking commented 8 years ago

配置文件一直使用正常,从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

lhanjian commented 8 years ago

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

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

telking commented 8 years ago

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

cfsego commented 8 years ago

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

telking commented 8 years ago

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

telking commented 8 years ago

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

chobits commented 7 years ago
error_log  syslog:server=192.168.1.1 debug;  # only one error_log directive in nginx.conf
(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
chobits commented 7 years ago

hi @telking 修复了segfault段错误:https://github.com/alibaba/tengine/pull/810 你可以使用master分支最新代码测试下

lhanjian commented 7 years ago

Thanks to @chobits for burying my old pit.