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 2020/12/23 02:33:46 UTC

[GitHub] [apisix] azura27 opened a new issue #3107: bug: zipkin sampler new delay, and cause error cannot autosolved

azura27 opened a new issue #3107:
URL: https://github.com/apache/apisix/issues/3107


   ### Issue description
   When I put a route and visit it whthin 0.3 seconds, It would cause an error in zipkin plugin. Corresponding code is in apisix/apisix/plugins/zipkin.lua : ctx.opentracing_sample = tracer.sampler:sample(). And It annot be solved automatically. Is there any solution to make apisix continuing working, after trigger this error? Waiting for your response, thanks a lot~
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):2.0
   * OS: (cmd: `uname -a`)  :3.10.0-693.el7.x86_64
   * OpenResty / Nginx version: (cmd: `nginx -V` or `openresty -V`):openresty/1.17.8.2
   ### Minimal test code / Steps to reproduce the issue
   1. PUT a route with zipkin plugin
   2. right after 1, visit this route
   3. 500 response happens
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   continuous 500 response until reload by hand
   
   ### What's the expected result?
   actual response from server


----------------------------------------------------------------
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.

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



[GitHub] [apisix] azura27 commented on issue #3107: bug: zipkin sampler new delay, and cause error cannot autosolved

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


   Thanks for your response, after lrucache optimization, this problem been solved.


----------------------------------------------------------------
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.

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



[GitHub] [apisix] azura27 closed issue #3107: bug: zipkin sampler new delay, and cause error cannot autosolved

Posted by GitBox <gi...@apache.org>.
azura27 closed issue #3107:
URL: https://github.com/apache/apisix/issues/3107


   


----------------------------------------------------------------
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.

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



[GitHub] [apisix] azura27 commented on issue #3107: bug: zipkin sampler new delay, and cause error cannot autosolved

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


   First thanks for your response, Some issue need to inform: the apisix is running in docker selfbuilt, with base image centOS7; and zipkin reporter been reconstructed, substitute the http report way in _M.flush with udp report way:
       local sock = ngx_socket_udp()
       sock:settimeout(conf.timeout)
       local ok, err = sock:setpeername(conf.host, conf.port)
       if not ok then
           return nil, "[zipkin-reporter] could not connect to ", conf.host, ":", conf.port, ": ", err
       end
       local ok, err
       ok, err = sock:send(pending_spans)
       if not ok then
           return nil, "failed to send: " .. err
       end
       ok, err = sock:close()
       if not ok then
           return nil, "failed to close connection from " .. self.host .. ":" .. tostring(self.port) .. ": " .. err
       end
   1,the route is: plugins open:zipkin, rewrite, limit-count
      visit :url --resolve 'domain:80:IP' http://domain/temp.htm
   2, error log:
   2020/12/22 17:07:05 [error] 74#0: *2481202 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/plugins/zipkin.lua:149: attempt to index field 'sampler' (a nil value)
   stack traceback:
   coroutine 0:
           /usr/local/apisix/apisix/plugins/zipkin.lua: in function 'phase_func'
           /usr/local/apisix/apisix/init.lua:157: in function 'run_plugin'
           /usr/local/apisix/apisix/init.lua:553: in function 'http_access_phase'
           access_by_lua(nginx.conf:207):2: in main chunk while sending to client, client: 
   
   If it is convenient, please help on test on your official version if this could be recurrent. If cannot be recurrent, could you give some advices? Thanks a lot~


----------------------------------------------------------------
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.

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



[GitHub] [apisix] azura27 commented on issue #3107: bug: zipkin sampler new delay, and cause error cannot autosolved

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


   My zipkin.lua:149 is this "ctx.opentracing_sample = tracer.sampler:sample()"


----------------------------------------------------------------
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.

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



[GitHub] [apisix] spacewander commented on issue #3107: bug: zipkin sampler new delay, and cause error cannot autosolved

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


   Could you try the master branch? I remember we have fixed similar bugs before.


----------------------------------------------------------------
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.

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



[GitHub] [apisix] spacewander commented on issue #3107: bug: zipkin sampler new delay, and cause error cannot autosolved

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


   1. What is the route you put, and how you hit the route?
   2. Please paste the backtrack in the error log when 500 response happened


----------------------------------------------------------------
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.

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



[GitHub] [apisix] spacewander commented on issue #3107: bug: zipkin sampler new delay, and cause error cannot autosolved

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


   Maybe this one: https://github.com/apache/apisix/issues/2709


----------------------------------------------------------------
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.

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