Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: upstream.lua:57: set_upstream(): upstream node has been specified, cannot be set repeatedly #3164

Closed
json7 opened this issue Dec 30, 2020 · 11 comments
Labels
checking check first if this issue occurred

Comments

@json7
Copy link

json7 commented Dec 30, 2020

Issue description

Occasionally, an error "upstream node has been specified, can't be set repeatedly" is reported when a configured route is requested

Environment

  • apisix version (cmd: apisix version):2.1
  • OS: (cmd: uname -a) linux 3.10.0-1127.8.2.el7.x86_64 centos 7
  • OpenResty / Nginx version: (cmd: nginx -V or openresty -V) nginx version: openresty/1.19.3.1
@json7
Copy link
Author

json7 commented Dec 31, 2020

I have created two routes, and each route has its own back-end handler. However, I find that once the back-end handler of a route requests another route as an "httpclient", this problem begins to occur

@spacewander
Copy link
Member

Is there runnable steps to reproduce this issue?

@json7
Copy link
Author

json7 commented Dec 31, 2020

Is there runnable steps to reproduce this issue?

I have created two routes, and each route has its own back-end handler. However, I find that once the back-end handler of a route requests another route as an "httpclient", this problem begins to occur

@spacewander
Copy link
Member

It seems that you have modified the APISIX? Currently APISIX only support using a remote address as the backend(upstream).

@json7
Copy link
Author

json7 commented Dec 31, 2020

It seems that you have modified the APISIX? Currently APISIX only support using a remote address as the backend(upstream).

There was no change
example:
routeA: back-end api (127.0.0.1:9001)
routeB: back-end api (127.0.0.1:9002)

httpclient(chrome) -> routerA -> 127.0.0.1:9001 ->routerB->error
httpclient(chrome) ->routerB->127.0.0.1:9002 ->success

@spacewander
Copy link
Member

Interesting. What is your route configuration?

@spacewander
Copy link
Member

Is it the same as #3079?

@json7
Copy link
Author

json7 commented Dec 31, 2020

Is it the same as #3079?

It's not the same problem

@json7
Copy link
Author

json7 commented Dec 31, 2020

Is it the same as #3079?

可以加我qq我给您提供复现环境 1210336990

@membphis membphis added the checking check first if this issue occurred label Dec 31, 2020
@json7
Copy link
Author

json7 commented Dec 31, 2020

Yes, it's about the openresty version. I went back to 1.17 and it's normal

@json7 json7 closed this as completed Dec 31, 2020
@mcdullbloom
Copy link

I also got the warning "upstream node has been specified, cannot be set repeatedly" and several 404 response as well(the qps is about 800) . I added some logs in set_by_route and udp-logger and found that apisix forward the request to wrong backend upstream node. I susspect that the api_ctx is polluted but I have no idea why this happen.

PS:we do not use the plugin "traffic-split"

Environment
apisix version (cmd: apisix version): 2.4
OS: (cmd: uname -a) linux 3.10.0-693.el7.x86_64 CentOS Linux release 7.4.1708 (Core)
OpenResty / Nginx version: (cmd: nginx -V or openresty -V) nginx version: openresty/1.19.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
checking check first if this issue occurred
Projects
None yet
Development

No branches or pull requests

4 participants