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 2021/02/07 06:44:37 UTC

[GitHub] [apisix] diaosj opened a new issue #3546: request help: when weight set to zero, the node still causes a 5xx error

diaosj opened a new issue #3546:
URL: https://github.com/apache/apisix/issues/3546


   ### Issue description
   Set two nodes to an upstream. Suppose they are `NodeA` and `NodeB`.
   Upstream JSON is like this:
   ```
   {"header":{"revision":"10298","cluster_id":"17817882145681418091","raft_term":"2","member_id":"12344213989818773070"},"count":"1","node":{"modifiedIndex":8878,"value":{"pass_host":"pass","nodes":{"NodeA":100,"NodeB":0},"desc":"","type":"roundrobin","create_time":1611630417,"name":"aplusb-demo-online-service","update_time":1611648368,"id":"aplusb-demo-online-service","hash_on":"vars","enable_websocket":false},"createdIndex":8875,"key":"\/apisix\/upstreams\/aplusb-demo-online-service"},"action":"get"}
   ```
   Notice that the weight of `NodeA` is set to 100 and the weight of `NodeB` is set to 0.
   
   When `NodeB` is destroyed, I found that the API call fails. Error message in `error.log` says:
   ```
   parse_domain(): failed to parse domain: <NodeB>, error: server returned error code: 3: name error...
   ```
   
   Then I weed out the offline `NodeB`, the API call succeeds.
   
   I'm confused. The weight of `NodeB` is set to 0, why this node still causes a 5xx error? Maybe we need a document to explain this to other users.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 2.1
   * OS (cmd: `uname -a`): Linux
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): openresty/1.19.3.1
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   * apisix-dashboard version, if have:
   


----------------------------------------------------------------
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] diaosj commented on issue #3546: request help: when weight set to zero, the node still causes a 5xx error

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


   But I still wonder why. Does APISIX loop all the nodes before routing?


----------------------------------------------------------------
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] diaosj commented on issue #3546: request help: when weight set to zero, the node still causes a 5xx error

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


   > You can try the latest version, not sure if this problem has been fixed.
   
   ok. thx!


----------------------------------------------------------------
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 closed issue #3546: request help: when weight set to zero, the node still causes a 5xx error

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


   


----------------------------------------------------------------
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] Firstsawyou commented on issue #3546: request help: when weight set to zero, the node still causes a 5xx error

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


   > But I still wonder why. Does APISIX loop all the nodes before routing?
   
   APISIX has a retry mechanism for all upstream nodes. You can learn more about it hereļ¼š https://github.com/apache/apisix/blob/master/doc/admin-api.md#upstream


----------------------------------------------------------------
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] Firstsawyou commented on issue #3546: request help: when weight set to zero, the node still causes a 5xx error

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


   You can try the latest version, not sure if this problem has been fixed.


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