You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "kellyseeme (via GitHub)" <gi...@apache.org> on 2025/08/06 08:34:18 UTC

[I] get_by_id return different values [apisix]

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

   ### Current Behavior
   
   when i use the admin api change the upstream nodes,then use the curl command to get reponse,the upstream.lua    fuction get_by_id return two values ,one is ok,the other is bad.
   
   when use curl ,there all time have the two response ,and not recover only apisix reload.
   
   in etcd there is the new ip,and sync_data log is the new ip.
   
   and in some envirment is ok,some enviroment is bad,this envrioment just same.
   
    [lua] upstream.lua:610: get_by_id(): parsed upstream: {"value":{"update_time":1754289018,"timeout":{"connect":180,"read":180,"send":180},"scheme":"http","keepalive_pool":{"size":320,"idle_timeout":180,"requests":1000},"nodes_ref":[{"weight":100,"port":9998,"host":"10.1.63.56","priority":0},{"weight":100,"port":9998,"host":"10.1.93.214","priority":0}],"parent":{"value":"table: 0x7f2a93309e98","key":"/upstreams\/21195","has_domain":false,"createdIndex":6883811,"clean_handlers":{},"modifiedIndex":6901836},"type":"roundrobin","pass_host":"pass","desc":"","create_time":1754271075,"name":"ea","nodes":"table: 0x7f2a93309ee0","hash_on":"vars","retries":0,"id":"21195","original_nodes":"table: 0x7f2a93309ee0"},"key":"\/upstreams\/21195","has_domain":false,"createdIndex":6883811,"clean_handlers":"table: 0x7f2a931084a8","modifiedIndex":6901836}
   
    [lua] upstream.lua:610: get_by_id(): parsed upstream: {"value":{"hash_on":"vars","timeout":{"connect":180,"read":180,"send":180},"scheme":"http","keepalive_pool":{"size":320,"idle_timeout":180,"requests":1000},"nodes_ref":[{"host":"10.1.63.54","port":9998,"priority":0,"weight":100},{"host":"10.1.63.55","port":9998,"priority":0,"weight":100},{"host":"10.1.63.56","port":9998,"priority":0,"weight":100},{"host":"10.1.93.214","port":9998,"priority":0,"weight":100},{"host":"10.1.95.23","port":9998,"priority":0,"weight":100}],"parent":{"value":"table: 0x7f2a8f5d59f0","key":"/upstreams\/21195","has_domain":false,"createdIndex":6883811,"clean_handlers":{},"modifiedIndex":6901847},"id":"21195","pass_host":"pass","desc":"","create_time":1754271075,"retries":0,"nodes":"table: 0x7f2a98692a60","update_time":1754289018,"name":"ea","type":"roundrobin","original_nodes":"table: 0x7f2a98692a60"},"key":"\/upstreams\/21195","has_domain":false,"createdIndex":6883811,"clean_handlers":"table: 0x7f2a8f69
 af28","modifiedIndex":6901847}
   
   why this happen?
   
   ### Expected Behavior
   
   get the upstream ip is the new ip
   
   ### Error Logs
   
   none error logs
   
   ### Steps to Reproduce
   
   1 curl change the upstream node
   2 curl get the upstream ip
   
   ### Environment
   
   - APISIX version (run `apisix version`):2.15.3
   - Operating system (run `uname -a`):
   - 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


Re: [I] get_by_id return different values [apisix]

Posted by "SkyeYoung (via GitHub)" <gi...@apache.org>.
SkyeYoung commented on issue #12493:
URL: https://github.com/apache/apisix/issues/12493#issuecomment-3173086489

   @kellyseeme Hi, may I ask if there are steps and a minimal environment available for reproduction?


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


Re: [I] get_by_id return different values [apisix]

Posted by "SkyeYoung (via GitHub)" <gi...@apache.org>.
SkyeYoung commented on issue #12493:
URL: https://github.com/apache/apisix/issues/12493#issuecomment-3166367761

   @kellyseeme Please try upgrading first, the latest version is already 3.13.0. The issue you pointed out may have already been fixed in the process.


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


Re: [I] get_by_id return different values [apisix]

Posted by "kellyseeme (via GitHub)" <gi...@apache.org>.
kellyseeme commented on issue #12493:
URL: https://github.com/apache/apisix/issues/12493#issuecomment-3173440946

   it's hard 
   
   > [@kellyseeme](https://github.com/kellyseeme) Hi, may I ask if there are steps and a minimal environment available for reproduction?
   
   1 create a apisix cluster (etcd cluster 3 point),route just /* to the upstream
   2 use the admin api delete upstream nodes
   curl http://127.0.0.1:9180/apisix/admin/upstreams/15218 -H "X-API-KEY: xx" -X PUT -d
   '
   {
       "desc": "",
       "name": "sss",
       "pass_host": "pass",
       "nodes": [
           {
               "priority": 0,
               "host": "10.1.84.113",
               "port": 80,
               "weight": 100
           }
       ],
       "type": "roundrobin",
       "scheme": "http",
       "id": "15218",
       "timeout": {
           "send": 180,
           "connect": 180,
           "read": 180
       },
       "hash_on": "vars",
       "keepalive_pool": {
           "idle_timeout": 180,
           "requests": 22,
           "size": 320
       }
   }
   '
   3 use the admin api add upstream nodes
   curl http://127.0.0.1:9180/apisix/admin/upstreams/15218 -H "X-API-KEY: xx" -X PUT -d
   '
   {
       "desc": "",
       "name": "sss",
       "pass_host": "pass",
       "nodes": [
           {
               "priority": 0,
               "host": "10.1.71.118",
               "port": 80,
               "weight": 100
           },
           {
               "priority": 0,
               "host": "10.1.73.196",
               "port": 80,
               "weight": 100
           },
           {
               "priority": 0,
               "host": "10.1.84.112",
               "port": 80,
               "weight": 100
           },
           {
               "priority": 0,
               "host": "10.1.84.113",
               "port": 80,
               "weight": 100
           }
       ],
       "type": "roundrobin",
       "scheme": "http",
       "id": "15218",
       "timeout": {
           "send": 180,
           "connect": 180,
           "read": 180
       },
       "hash_on": "vars",
       "keepalive_pool": {
           "idle_timeout": 180,
           "requests": 22,
           "size": 320
       }
   }
   '
   and see the apisix info logs,see the etcd res and use curl look upstream nodes


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


Re: [I] get_by_id return different values [apisix]

Posted by "kellyseeme (via GitHub)" <gi...@apache.org>.
kellyseeme commented on issue #12493:
URL: https://github.com/apache/apisix/issues/12493#issuecomment-3173610863

   @SkyeYoung 
   the good cluster have the /version request,but in the bad cluster ,no /version request, have any idea?
   
   <img width="464" height="333" alt="Image" src="https://github.com/user-attachments/assets/bdfcafc5-dd18-48ad-a3b8-538a42a07d6c" />
   
   <img width="525" height="347" alt="Image" src="https://github.com/user-attachments/assets/85f768b9-629d-4f60-b011-1c8e4ac88139" />


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


Re: [I] get_by_id return different values [apisix]

Posted by "kellyseeme (via GitHub)" <gi...@apache.org>.
kellyseeme closed issue #12493: get_by_id return different values
URL: https://github.com/apache/apisix/issues/12493


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


Re: [I] get_by_id return different values [apisix]

Posted by "kellyseeme (via GitHub)" <gi...@apache.org>.
kellyseeme commented on issue #12493:
URL: https://github.com/apache/apisix/issues/12493#issuecomment-3160071783

   We found that different worker processes use different backend versions
   


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


Re: [I] get_by_id return different values [apisix]

Posted by "kellyseeme (via GitHub)" <gi...@apache.org>.
kellyseeme commented on issue #12493:
URL: https://github.com/apache/apisix/issues/12493#issuecomment-3174845098

   in etcd,have one node have the different version ,we recreate the etcd endpoint ,this is ok now,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


Re: [I] get_by_id return different values [apisix]

Posted by "kellyseeme (via GitHub)" <gi...@apache.org>.
kellyseeme commented on issue #12493:
URL: https://github.com/apache/apisix/issues/12493#issuecomment-3167019958

   This is a difficult task


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


Re: [I] get_by_id return different values [apisix]

Posted by "SkyeYoung (via GitHub)" <gi...@apache.org>.
SkyeYoung commented on issue #12493:
URL: https://github.com/apache/apisix/issues/12493#issuecomment-3173721931

   @kellyseeme Please first refer to https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code to adjust the format, as it's currently difficult to distinguish.
   
   > the good cluster have the /version request,but in the bad cluster ,no /version request, have any idea?
   
   I need to check first before I can tell you the reason. 


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