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/10/12 04:33:35 UTC

[GitHub] [apisix] zh417233956 opened a new issue #2394: bug:prometheus metrics 500 Internal Server Error

zh417233956 opened a new issue #2394:
URL: https://github.com/apache/apisix/issues/2394


   ### Issue description
   访问:http://192.168.5.139/apisix/prometheus/metrics,出现:metrics 500 Internal Server Error
   apisix reload 以后正常,几分钟以后,仍然出现:metrics 500 Internal Server Error
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):1.5
   * OS:CentOS 7.6
   
   ### Minimal test code / Steps to reproduce the issue
   1. http://192.168.5.139/apisix/prometheus/metrics 
   
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   metrics 500 Internal Server Error
   error.log:
   2020/10/12 12:21:09 [error] 31448#31448: *217543 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/plugins/prometheus/exporter.lua:181: attempt to compare number with string
   stack traceback:
   coroutine 0:
   	/usr/local/apisix/apisix/plugins/prometheus/exporter.lua: in function 'set_modify_index'
   	/usr/local/apisix/apisix/plugins/prometheus/exporter.lua:233: in function 'etcd_modify_index'
   	/usr/local/apisix/apisix/plugins/prometheus/exporter.lua:262: in function 'handler'
   	/usr/local/apisix/apisix/plugin.lua:209: in function 'handler'
   	/usr/local/apisix//deps/share/lua/5.1/resty/radixtree.lua:739: in function 'dispatch'
   	/usr/local/apisix/apisix/http/router/radixtree_uri.lua:110: in function 'match'
   	/usr/local/apisix/apisix/init.lua:336: in function 'http_access_phase'
   	access_by_lua(nginx.conf:179):2: in main chunk, client: 192.168.6.88, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "192.168.5.139:80"
   
   ### What's the expected result?
   


----------------------------------------------------------------
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] membphis commented on issue #2394: bug:prometheus metrics 500 Internal Server Error

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


   this bug should have been fixed in `master` branch, you can make a try with the latest version.
   
   https://github.com/apache/apisix/blob/master/apisix/plugins/prometheus/exporter.lua#L197


----------------------------------------------------------------
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] idbeta commented on issue #2394: bug:prometheus metrics 500 Internal Server Error

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


   @membphis Can you tell me what is the triggering condition of this bug?


----------------------------------------------------------------
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] membphis commented on issue #2394: bug:prometheus metrics 500 Internal Server Error

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


   > @membphis Can you tell me what is the triggering condition of this bug?
   
   The `item.modifiedIndex` maybe updated in here: 
   
   https://github.com/apache/apisix/blob/v1.5/apisix/init.lua#L251
   
   It has changed to `string` object. 
   
   So we need to fetch the original value from `modifiedIndex_org`.
   


----------------------------------------------------------------
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] membphis closed issue #2394: bug:prometheus metrics 500 Internal Server Error

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


   


----------------------------------------------------------------
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] juzhiyuan commented on issue #2394: bug:prometheus metrics 500 Internal Server Error

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


   @idbeta Please take a look first, to check if this issue occurred.


----------------------------------------------------------------
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] membphis commented on issue #2394: bug:prometheus metrics 500 Internal Server Error

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


   I think we can close this issue. @zh417233956 if you still have a problem, please feel free to reopen this issue


----------------------------------------------------------------
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] idbeta commented on issue #2394: bug:prometheus metrics 500 Internal Server Error

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


   @zh417233956 This doesn’t happen in my environment(centos7.6,apisix1.5), is the problem in your environment happen immediately or after a while, can you provide more information? like the setting of Prometheus plugin etc.
   
   


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