You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/09/28 11:40:45 UTC

[GitHub] [apisix] ccxhwmy opened a new issue, #8014: help request: how to print debug log for special request

ccxhwmy opened a new issue, #8014:
URL: https://github.com/apache/apisix/issues/8014

   ### Description
   
   Hi~
   I want to print `debug` log for special request so I can debug apisix easily.
   So I add `debug_connection 127.0.0.1;` in the `event`:
   ```config
   events {
       accept_mutex off;
       worker_connections {* event.worker_connections *};
       debug_connection 127.0.0.1;
   }
   ```
   But I get a report that:
   ```shell
   nginx: [warn] "debug_connection" is ignored, you need to rebuild nginx using --with-debug option to enable it in /home/work/apisix/conf/nginx.conf:21
   ```
   
   My nginx environment is:
   ```shell
   ✗ ps -ef | grep nginx
   root      23261      1  0 14:36 ?        00:00:00 nginx: master process /usr/local/openresty/bin/openresty -p /home/work/apisix -c /home/work/apisix/conf/nginx.conf
   root      25520      1  0 14:46 ?        00:00:00 nginx: master process nginx -c /home/work/apisix/benchmark/server/conf/nginx.conf
   nobody    25521  25520  0 14:46 ?        00:00:00 nginx: worker process
   nobody    25522  25520  0 14:46 ?        00:00:00 nginx: worker process
   root      49372  23261  0 19:31 ?        00:00:00 nginx: worker process
   root      49373  23261  0 19:31 ?        00:00:00 nginx: worker process
   root      49374  23261  0 19:31 ?        00:00:00 nginx: worker process
   root      49375  23261  0 19:31 ?        00:00:00 nginx: worker process
   root      49376  23261  0 19:31 ?        00:00:00 nginx: cache manager process
   root      49377  23261  0 19:31 ?        00:00:00 nginx: privileged agent process
   root      49679   4254  0 19:34 pts/1    00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox nginx
   You have new mail.                                                                                                                                                                                                                                                         
   
   ✗ /usr/local/openresty/bin/openresty -V
   nginx version: openresty/1.21.4.1
   built by gcc 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC) 
   built with OpenSSL 1.1.1n  15 Mar 2022
   TLS SNI support enabled
   configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DAPISIX_BASE_VER=1.21.4.1.0 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl111/include' --add-module=../ngx_devel_kit-0.3.1 --add-module=../echo-nginx-module-0.62 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.33 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.09 --add-module=../srcache-nginx-module-0.32 --add-module=../ngx_lua-0.10.21 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.9 --add-module=../ngx_stream_lua-0.0.11 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -Wl,-rpath,/usr/local/openresty/wasmtime-c-ap
 i/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl111/lib' --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../mod_dubbo-1.0.2 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../ngx_multi_upstream_module-1.1.0 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../apisix-nginx-module-1.9.0 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../apisix-nginx-module-1.9.0/src/stream --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../apisix-nginx-module-1.9.0/src/meta --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../wasm-nginx-module-0.6.1 --add-module=/tmp/tmp.jxGTHHB5bC/openresty-1.21.4.1/../lua-var-nginx-module-v0.5.2 --with-poll_module --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_
 smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-compat --with-stream --with-http_ssl_module
   ```
   
   I found that nginx is build with some apisix module, so I want to know:
   1. how to get apisix nginx build environment.
   2. how to get apisix debug nginx directly.
   
   ### Environment
   
   - APISIX version (2.99.0):
   - Operating system (Linux apisix 3.10.0-862.el7.x86_64):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] soulbird commented on issue #8014: help request: how to print debug log for special request

Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #8014:
URL: https://github.com/apache/apisix/issues/8014#issuecomment-1261591927

   See here: https://github.com/api7/apisix-build-tools/blob/master/build-apisix-base.sh?rgh-link-date=2022-09-28T12%3A00%3A29Z#L14. You can compile it yourself using the `latest` parameter.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] ccxhwmy closed issue #8014: help request: how to print debug log for special request

Posted by GitBox <gi...@apache.org>.
ccxhwmy closed issue #8014: help request: how to print debug log for special request
URL: https://github.com/apache/apisix/issues/8014


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #8014: help request: how to print debug log for special request

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #8014:
URL: https://github.com/apache/apisix/issues/8014#issuecomment-1260800150

   > ```shell
   > nginx: [warn] "debug_connection" is ignored, you need to rebuild nginx using --with-debug option to enable it in /home/work/apisix/conf/nginx.conf:21
   > ```
   
   The error message is obvious enough.
   
   > * how to get apisix nginx build environment.
   
   see: https://github.com/api7/apisix-build-tools/blob/master/build-apisix-base.sh, you can build your own apisix-base by modifying this script.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] ccxhwmy commented on issue #8014: help request: how to print debug log for special request

Posted by GitBox <gi...@apache.org>.
ccxhwmy commented on issue #8014:
URL: https://github.com/apache/apisix/issues/8014#issuecomment-1260852721

   > > ```shell
   > > nginx: [warn] "debug_connection" is ignored, you need to rebuild nginx using --with-debug option to enable it in /home/work/apisix/conf/nginx.conf:21
   > > ```
   > 
   > The error message is obvious enough.
   > 
   > > * how to get apisix nginx build environment.
   > 
   > see: [api7/apisix-build-tools@`master`/build-apisix-base.sh](https://github.com/api7/apisix-build-tools/blob/master/build-apisix-base.sh?rgh-link-date=2022-09-28T12%3A00%3A29Z), you can build your own apisix-base by modifying this script.
   
   Does APISIX not provide a debug version of nginx currently?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] ccxhwmy commented on issue #8014: help request: how to print debug log for special request

Posted by GitBox <gi...@apache.org>.
ccxhwmy commented on issue #8014:
URL: https://github.com/apache/apisix/issues/8014#issuecomment-1261929979

   I get, Thanks~


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org