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

bug: apisix cant find upstream and return 500 #3524

Closed
cocoonYh opened this issue Feb 5, 2021 · 4 comments
Closed

bug: apisix cant find upstream and return 500 #3524

cocoonYh opened this issue Feb 5, 2021 · 4 comments

Comments

@cocoonYh
Copy link

cocoonYh commented Feb 5, 2021

Issue description

i run apisix with docker for mac, and running server on mac directly.
apisix:2.2-centos
apisix-dashboard:2.3
etcd:3.4.9

Environment

  • apisix version (cmd: apisix version): 2.2
  • OS (cmd: uname -a): Linux a664481da340 4.19.121-linuxkit
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V): nginx version: 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): 3.4.0
  • apisix-dashboard version, if have: 2.3

Minimal test code / Steps to reproduce the issue

{ "methods": ["GET"], "uri": "/v1/oms/sub_user", "service_protocol": "grpc", "plugins": { "grpc-transcode": { "proto_id": "1", "service": "oms.SubUserService", "method": "ListSubUser" } }, "upstream_id": "340370032628335311" }

/apisix/upstreams/340370032628335311 {"id":"340370032628335311","create_time":1612405948,"update_time":1612491017,"nodes":[{"host":"docker.for.mac.host.internal","port":9001,"weight":1}],"timeout":{"connect":6000,"read":6000,"send":6000},"type":"roundrobin","pass_host":"pass","name":"sub-user"}

What's the actual result? (including assertion message & call stack if applicable)

got 500 resp, and here is err log
2021/02/05 02:10:23 [error] 43#43: *2543893 failed to run balancer_by_lua*: /usr/local/apisix/apisix/balancer.lua:165: attempt to index local 'up_conf' (a nil value) stack traceback: /usr/local/apisix/apisix/balancer.lua:165: in function 'pick_server' /usr/local/apisix/apisix/balancer.lua:272: in function 'load_balancer' /usr/local/apisix/apisix/init.lua:758: in function 'http_balancer_phase' balancer_by_lua:2: in main chunk while connecting to upstream, client: 172.18.0.1, server: , request: "GET /v1/oms/sub_user HTTP/1.1", host: "127.0.0.1:9080"

What's the expected result?

@Firstsawyou
Copy link
Contributor

It is very similar to the problem here and may have been fixed:
#3342
#3339

Try to configure another host, will this problem still occur?

"nodes":[{"host":"docker.for.mac.host.internal","port":9001,"weight":1}]

@cocoonYh
Copy link
Author

cocoonYh commented Feb 5, 2021

It is very similar to the problem here and may have been fixed:
#3342
#3339

Try to configure another host, will this problem still occur?

"nodes":[{"host":"docker.for.mac.host.internal","port":9001,"weight":1}]

i trid 192.168.65.2, it doesnt work either

@cocoonYh cocoonYh closed this as completed Feb 5, 2021
@cocoonYh cocoonYh reopened this Feb 5, 2021
@membphis
Copy link
Member

membphis commented Feb 5, 2021

@cocoonYh you can make a try with the master branch

@spacewander
Copy link
Member

Closed as lack of response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants