Hi Sergey, Thank you for the prompt reply!
On Wed, May 14, 2025 at 2:31 AM Sergey A. Osokin <o...@freebsd.org.ru> wrote: > > [...] > > Is there a chance to build nginx with a debugging log as described on > the following page, https://nginx.org/en/docs/debugging_log.html > and tracing fcgi requests. Please expect a lot of messages in > the nginx error.log file. > I'm sharing the requested logs as attachments: - restconf_nginx_error.log - restconf_nginx_access.log - terminal.log - restconf-test.sh (a test script for reproducing the issue) I would also like to share the steps to reproduce the issue: Steps to reproduce: 1. I created a simple script with an infinite loop, see attached *restconf-test.sh* 2. in the previously attached *NGINX-restconf* conf file , update *line 33* to specify the full path to the restconf-test.sh fastcgi_param SCRIPT_FILENAME /YOUR_REAL_PATH_TO/restconf-test.sh; 3. Restart nginx and run this in the first terminal: *curl -v http://localhost/restconf/streams <http://localhost/restconf/streams>* 4. Then run the same command in a second terminal: *curl -v http://localhost/restconf/streams <http://localhost/restconf/streams>* At this point, the second connection hangs until the first one is closed. Let me know if you need anything else to help with debugging. Thank you, -Rostyslav
127.0.0.1 - - [14/May/2025:12:18:22 -0700] "GET /restconf/streams HTTP/1.1" 200 7 "-" "curl/7.81.0" 127.0.0.1 - - [14/May/2025:12:20:49 -0700] "GET /restconf/streams HTTP/1.1" 499 0 "-" "curl/7.81.0"
## STEP 1: curl -v http://localhost/restconf/streams -H 'Accept: text/event-stream' 2025/05/14 12:16:48 [debug] 3423135#3423135: accept on 0.0.0.0:80, ready: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: posix_memalign: 00005EC5CA39A9A0:512 @16 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 accept: 127.0.0.1:33896 fd:27 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 event timer add: 27: 60000:285201568 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 reusable connection: 1 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 epoll add event: fd:27 op:1 ev:80002001 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http wait request handler 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 malloc: 00005EC5CA39D200:1024 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 recv: eof:0, avail:-1 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 recv: fd:27 103 of 1024 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 reusable connection: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 posix_memalign: 00005EC5CA3CF0B0:4096 @16 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http process request line 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http request line: "GET /restconf/streams HTTP/1.1" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http uri: "/restconf/streams" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http args: "" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http exten: "" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 posix_memalign: 00005EC5CA3A2420:4096 @16 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http process request header line 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http header: "Host: localhost" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http header: "User-Agent: curl/7.81.0" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http header: "Accept: text/event-stream" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http header done 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 event timer del: 27: 285201568 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 generic phase: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 rewrite phase: 1 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 test location: "/restconf" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 using configuration "/restconf" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http cl:-1 max:1048576 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 rewrite phase: 3 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 post rewrite phase: 4 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 generic phase: 5 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 generic phase: 6 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 generic phase: 7 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 access phase: 8 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 access phase: 9 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 access phase: 10 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 post access phase: 11 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 generic phase: 12 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 generic phase: 13 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http init upstream, client timer: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 epoll add event: fd:27 op:3 ev:80002005 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "QUERY_STRING" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "QUERY_STRING: " 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "REQUEST_METHOD" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "GET" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "REQUEST_METHOD: GET" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "CONTENT_TYPE" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "CONTENT_TYPE: " 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "CONTENT_LENGTH" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "CONTENT_LENGTH: " 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "SCRIPT_NAME" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "/restconf/streams" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "SCRIPT_NAME: /restconf/streams" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "REQUEST_URI" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "/restconf/streams" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "REQUEST_URI: /restconf/streams" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "DOCUMENT_URI" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "/restconf/streams" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "DOCUMENT_URI: /restconf/streams" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "DOCUMENT_ROOT" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "/var/www/yang-api" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "DOCUMENT_ROOT: /var/www/yang-api" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "SERVER_PROTOCOL" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "HTTP/1.1" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "SERVER_PROTOCOL: HTTP/1.1" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "REQUEST_SCHEME" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "http" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "REQUEST_SCHEME: http" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "GATEWAY_INTERFACE" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "CGI/1.1" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "GATEWAY_INTERFACE: CGI/1.1" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "SERVER_SOFTWARE" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "nginx/" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "1.18.0" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "SERVER_SOFTWARE: nginx/1.18.0" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "REMOTE_ADDR" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "127.0.0.1" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "REMOTE_ADDR: 127.0.0.1" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "REMOTE_PORT" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "33896" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "REMOTE_PORT: 33896" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "REMOTE_USER" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "REMOTE_USER: " 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "SERVER_ADDR" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "127.0.0.1" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "SERVER_ADDR: 127.0.0.1" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "SERVER_PORT" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "80" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "SERVER_PORT: 80" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "SERVER_NAME" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script var: "localhost" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "SERVER_NAME: localhost" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "REDIRECT_STATUS" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "200" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "REDIRECT_STATUS: 200" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "SCRIPT_NAME" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "restconf" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "SCRIPT_NAME: restconf" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "SCRIPT_FILENAME" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "/var/www/yang-api/restconf" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "SCRIPT_FILENAME: /var/www/yang-api/restconf" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http script copy: "NO_BUFFERING" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "NO_BUFFERING: " 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "HTTP_HOST: localhost" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "HTTP_USER_AGENT: curl/7.81.0" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 fastcgi param: "HTTP_ACCEPT: text/event-stream" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http cleanup add: 00005EC5CA3A2FF8 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 get rr peer, try: 1 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 stream socket 28 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 epoll add connection: fd:28 ev:80002005 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 connect to unix:/var/run/fcgiwrap.socket, fd:28 #2 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 connected 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream connect: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 posix_memalign: 00005EC5CA383EE0:128 @16 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream send request 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream send request body 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 chain writer buf fl:0 s:616 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 chain writer in: 00005EC5CA3A3038 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 writev: 616 of 616 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 chain writer out: 0000000000000000 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 event timer add: 28: 120000:285261568 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http finalize request: -4, "/restconf/streams?" a:1, c:2 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http request count:2 blk:0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http run request: "/restconf/streams?" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream check client, write event:1, "/restconf/streams" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream request: "/restconf/streams?" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream dummy handler 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream request: "/restconf/streams?" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream dummy handler 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream request: "/restconf/streams?" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream process header 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 malloc: 00005EC5CA3A3430:4096 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 recv: eof:0, avail:-1 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 recv: fd:28 128 of 4096 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi record byte: 01 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi record byte: 06 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi record byte: 00 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi record byte: 01 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi record byte: 00 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi record byte: 78 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi record byte: 00 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi record byte: 00 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi record length: 120 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi parser: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi header: "Content-Type: text/event-stream" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi parser: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi header: "Status: 200 OK" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi parser: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi header: "Cache-Control: no-cache" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi parser: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi header: "Pragma: no-cache" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi parser: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi header: "Connection: keep-alive" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi parser: 1 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi header done 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 xslt filter header 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 posix_memalign: 00005EC5CA3A4440:4096 @16 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 HTTP/1.1 200 OK Server: nginx/1.18.0 (Ubuntu) Date: Wed, 14 May 2025 19:16:48 GMT Content-Type: text/event-stream Transfer-Encoding: chunked Connection: keep-alive Cache-Control: no-cache Pragma: no-cache 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 write new buf t:1 f:0 00005EC5CA3A4460, pos 00005EC5CA3A4460, size: 215 file: 0, size: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http write filter: l:0 f:0 s:215 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 tcp_nodelay 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http fastcgi output buf 00005EC5CA3A34AE 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream process non buffered downstream 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http output filter "/restconf/streams?" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http copy filter: "/restconf/streams?" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 image filter 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 xslt filter body 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http postpone filter "/restconf/streams?" 00005EC5CA3A3358 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http chunk: 2 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 write old buf t:1 f:0 00005EC5CA3A4460, pos 00005EC5CA3A4460, size: 215 file: 0, size: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 write new buf t:1 f:0 00005EC5CA3A33D8, pos 00005EC5CA3A33D8, size: 3 file: 0, size: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 write new buf t:0 f:0 0000000000000000, pos 00005EC5CA3A34AE, size: 2 file: 0, size: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 write new buf t:0 f:0 0000000000000000, pos 00005EC5A9B422E8, size: 2 file: 0, size: 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http write filter: l:0 f:1 s:222 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http write filter limit 0 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 writev: 222 of 222 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http write filter 0000000000000000 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http copy filter: 0 "/restconf/streams?" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 event timer: 28, old: 285261568, new: 285261569 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream request: "/restconf/streams?" 2025/05/14 12:16:48 [debug] 3423135#3423135: *1 http upstream dummy handler ## STEP 2: CTRL+C 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http run request: "/restconf/streams?" 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http upstream check client, write event:0, "/restconf/streams" 2025/05/14 12:18:22 [info] 3423135#3423135: *1 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending to client, client: 127.0.0.1, server: localhost, request: "GET /restconf/streams HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "localhost" 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 finalize http upstream request: 499 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 finalize http fastcgi request 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 free rr peer 1 0 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 close http upstream connection: 28 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 free: 00005EC5CA383EE0, unused: 48 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 event timer del: 28: 285261568 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 reusable connection: 0 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http finalize request: 499, "/restconf/streams?" a:1, c:1 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http terminate request count:1 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http terminate cleanup count:1 blk:0 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http posted request: "/restconf/streams?" 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http terminate handler count:1 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http request count:1 blk:0 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http close request 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 http log handler 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 geoip2 http log handler 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 free: 00005EC5CA3A3430 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 free: 00005EC5CA3CF0B0, unused: 5 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 free: 00005EC5CA3A2420, unused: 0 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 free: 00005EC5CA3A4440, unused: 3400 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 close http connection: 27 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 reusable connection: 0 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 free: 00005EC5CA39D200 2025/05/14 12:18:22 [debug] 3423135#3423135: *1 free: 00005EC5CA39A9A0, unused: 120 ## STEP 3: curl -v http://localhost/restconf/streams -H 'Accept: text/event-stream' 2025/05/14 12:19:44 [debug] 3423135#3423135: accept on 0.0.0.0:80, ready: 0 2025/05/14 12:19:44 [debug] 3423135#3423135: posix_memalign: 00005EC5CA39A9A0:512 @16 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 accept: 127.0.0.1:52278 fd:27 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 event timer add: 27: 60000:285377710 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 reusable connection: 1 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 epoll add event: fd:27 op:1 ev:80002001 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http wait request handler 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 malloc: 00005EC5CA39D200:1024 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 recv: eof:0, avail:-1 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 recv: fd:27 103 of 1024 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 reusable connection: 0 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 posix_memalign: 00005EC5CA3CF0B0:4096 @16 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http process request line 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http request line: "GET /restconf/streams HTTP/1.1" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http uri: "/restconf/streams" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http args: "" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http exten: "" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 posix_memalign: 00005EC5CA3A2420:4096 @16 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http process request header line 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http header: "Host: localhost" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http header: "User-Agent: curl/7.81.0" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http header: "Accept: text/event-stream" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http header done 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 event timer del: 27: 285377710 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 generic phase: 0 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 rewrite phase: 1 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 test location: "/restconf" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 using configuration "/restconf" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http cl:-1 max:1048576 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 rewrite phase: 3 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 post rewrite phase: 4 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 generic phase: 5 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 generic phase: 6 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 generic phase: 7 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 access phase: 8 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 access phase: 9 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 access phase: 10 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 post access phase: 11 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 generic phase: 12 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 generic phase: 13 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http init upstream, client timer: 0 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 epoll add event: fd:27 op:3 ev:80002005 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "QUERY_STRING" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "QUERY_STRING: " 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "REQUEST_METHOD" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "GET" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "REQUEST_METHOD: GET" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "CONTENT_TYPE" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "CONTENT_TYPE: " 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "CONTENT_LENGTH" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "CONTENT_LENGTH: " 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "SCRIPT_NAME" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "/restconf/streams" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "SCRIPT_NAME: /restconf/streams" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "REQUEST_URI" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "/restconf/streams" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "REQUEST_URI: /restconf/streams" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "DOCUMENT_URI" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "/restconf/streams" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "DOCUMENT_URI: /restconf/streams" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "DOCUMENT_ROOT" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "/var/www/yang-api" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "DOCUMENT_ROOT: /var/www/yang-api" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "SERVER_PROTOCOL" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "HTTP/1.1" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "SERVER_PROTOCOL: HTTP/1.1" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "REQUEST_SCHEME" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "http" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "REQUEST_SCHEME: http" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "GATEWAY_INTERFACE" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "CGI/1.1" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "GATEWAY_INTERFACE: CGI/1.1" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "SERVER_SOFTWARE" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "nginx/" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "1.18.0" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "SERVER_SOFTWARE: nginx/1.18.0" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "REMOTE_ADDR" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "127.0.0.1" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "REMOTE_ADDR: 127.0.0.1" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "REMOTE_PORT" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "52278" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "REMOTE_PORT: 52278" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "REMOTE_USER" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "REMOTE_USER: " 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "SERVER_ADDR" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "127.0.0.1" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "SERVER_ADDR: 127.0.0.1" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "SERVER_PORT" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "80" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "SERVER_PORT: 80" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "SERVER_NAME" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script var: "localhost" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "SERVER_NAME: localhost" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "REDIRECT_STATUS" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "200" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "REDIRECT_STATUS: 200" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "SCRIPT_NAME" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "restconf" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "SCRIPT_NAME: restconf" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "SCRIPT_FILENAME" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "/var/www/yang-api/restconf" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "SCRIPT_FILENAME: /var/www/yang-api/restconf" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http script copy: "NO_BUFFERING" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "NO_BUFFERING: " 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "HTTP_HOST: localhost" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "HTTP_USER_AGENT: curl/7.81.0" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 fastcgi param: "HTTP_ACCEPT: text/event-stream" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http cleanup add: 00005EC5CA3A2FF8 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 get rr peer, try: 1 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 stream socket 28 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 epoll add connection: fd:28 ev:80002005 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 connect to unix:/var/run/fcgiwrap.socket, fd:28 #4 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 connected 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http upstream connect: 0 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 posix_memalign: 00005EC5CA383EE0:128 @16 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http upstream send request 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http upstream send request body 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 chain writer buf fl:0 s:616 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 chain writer in: 00005EC5CA3A3038 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 writev: 616 of 616 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 chain writer out: 0000000000000000 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 event timer add: 28: 120000:285437710 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http finalize request: -4, "/restconf/streams?" a:1, c:2 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http request count:2 blk:0 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http run request: "/restconf/streams?" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http upstream check client, write event:1, "/restconf/streams" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http upstream request: "/restconf/streams?" 2025/05/14 12:19:44 [debug] 3423135#3423135: *3 http upstream dummy handler ## STEP 4: no response, press CTRL+C 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http run request: "/restconf/streams?" 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http upstream check client, write event:0, "/restconf/streams" 2025/05/14 12:20:49 [info] 3423135#3423135: *3 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: 127.0.0.1, server: localhost, request: "GET /restconf/streams HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "localhost" 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 finalize http upstream request: 499 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 finalize http fastcgi request 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 free rr peer 1 0 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 close http upstream connection: 28 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 free: 00005EC5CA383EE0, unused: 48 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 event timer del: 28: 285437710 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 reusable connection: 0 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http finalize request: 499, "/restconf/streams?" a:1, c:1 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http terminate request count:1 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http terminate cleanup count:1 blk:0 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http posted request: "/restconf/streams?" 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http terminate handler count:1 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http request count:1 blk:0 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http close request 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 http log handler 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 geoip2 http log handler 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 free: 00005EC5CA3CF0B0, unused: 5 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 free: 00005EC5CA3A2420, unused: 848 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 close http connection: 27 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 reusable connection: 0 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 free: 00005EC5CA39D200 2025/05/14 12:20:49 [debug] 3423135#3423135: *3 free: 00005EC5CA39A9A0, unused: 120
rostyslav@Rostyslav-i9-dev:~$ nginx -V nginx version: nginx/1.18.0 (Ubuntu) built with OpenSSL 3.0.2 15 Mar 2022 TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -ffile-prefix-map=/build/nginx-niToSo/nginx-1.18.0=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --add-dynamic-module=/build/nginx-niToSo/nginx-1.18.0/debian/modules/http-geoip2 --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_sub_module rostyslav@Rostyslav-i9-dev:~$ curl -v http://localhost/restconf/streams -H 'Accept: text/event-stream' * Trying 127.0.0.1:80... * Connected to localhost (127.0.0.1) port 80 (#0) > GET /restconf/streams HTTP/1.1 > Host: localhost > User-Agent: curl/7.81.0 > Accept: text/event-stream > * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Server: nginx/1.18.0 (Ubuntu) < Date: Wed, 14 May 2025 19:16:48 GMT < Content-Type: text/event-stream < Transfer-Encoding: chunked < Connection: keep-alive < Cache-Control: no-cache < Pragma: no-cache < ^C rostyslav@Rostyslav-i9-dev:~$ curl -v http://localhost/restconf/streams -H 'Accept: text/event-stream' * Trying 127.0.0.1:80... * Connected to localhost (127.0.0.1) port 80 (#0) > GET /restconf/streams HTTP/1.1 > Host: localhost > User-Agent: curl/7.81.0 > Accept: text/event-stream > ^C rostyslav@Rostyslav-i9-dev:~$ netstat -anp | grep netconfd-pro (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) unix 3 [ ] STREAM CONNECTED 8858336 - /var/run/netconfd-pro/ncxserver.sock unix 2 [ ACC ] STREAM LISTENING 8860708 - /var/run/netconfd-pro/ncxserver.sock rostyslav@Rostyslav-i9-dev:~$
restconf-test.sh
Description: application/shellscript
_______________________________________________ nginx mailing list nginx@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx