-
Notifications
You must be signed in to change notification settings - Fork 542
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: upstream.upstreams() returns nil #2934
Comments
When an upstream is deleted, this error occurs even if no route uses it. |
Could u please show me ur config.yaml of apisix and conf.yaml of dashboard? |
APISIX config apisix:
node_listen: 9080
enable_ipv6: false
enable_control: true
control:
ip: "0.0.0.0"
port: 9092
extra_lua_path: "/lua_extra/?.lua"
extra_lua_cpath: ""
deployment:
admin:
allow_admin:
- 0.0.0.0/0
etcd:
host:
- "http://etcd:2379"
prefix: "/apisix"
timeout: 30
plugin_attr:
prometheus:
export_addr:
ip: "0.0.0.0"
port: 9091
metrics:
http_status:
extra_labels:
- upstream_addr: $upstream_addr
http_latency:
extra_labels:
- upstream_addr: $upstream_addr
bandwidth:
extra_labels:
- upstream_addr: $upstream_addr
nginx_config:
envs:
- NGINX_PORT
plugins:
- api-breaker
- authz-keycloak
- basic-auth
- batch-requests
- consumer-restriction
- cors
- ext-plugin-post-resp
- ext-plugin-post-req
- ext-plugin-pre-req
- fault-injection
- grpc-transcode
- hmac-auth
- http-logger
- ip-restriction
- jwt-auth
- kafka-logger
- key-auth
- limit-conn
- limit-count
- limit-req
- openid-connect
- prometheus
- proxy-cache
- proxy-mirror
- proxy-rewrite
- redirect
- referer-restriction
- request-id
- request-validation
- response-rewrite
- serverless-post-function
- serverless-pre-function
- sls-logger
- tcp-logger
- udp-logger
- uri-blocker
- wolf-rbac
- zipkin
- server-info
- traffic-split
- elasticsearch-logger
ext-plugin:
cmd: ["/plugins/go-runner", "run"]
path_for_test: /tmp/runner.sock
Dashboard config: conf:
listen:
host: 0.0.0.0
port: 9000
allow_list:
- 0.0.0.0/0
etcd:
endpoints:
- "http://etcd:2379"
mtls:
key_file: ""
cert_file: ""
ca_file: ""
log:
error_log:
level: warn
file_path:
logs/error.log
access_log:
file_path:
logs/access.log
security:
content_security_policy: "default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; frame-src *"
authentication:
enable: false
secret:
secret
expire_time: 360000
users:
- username: admin
password: admin
- username: user
password: user
plugins:
- api-breaker
- authz-keycloak
- basic-auth
- batch-requests
- consumer-restriction
- cors
- echo
- fault-injection
- grpc-transcode
- hmac-auth
- http-logger
- ip-restriction
- jwt-auth
- kafka-logger
- key-auth
- limit-conn
- limit-count
- limit-req
- openid-connect
- prometheus
- proxy-cache
- proxy-mirror
- proxy-rewrite
- redirect
- referer-restriction
- request-id
- request-validation
- response-rewrite
- serverless-post-function
- serverless-pre-function
- sls-logger
- tcp-logger
- udp-logger
- uri-blocker
- wolf-rbac
- zipkin
- server-info
- traffic-split
- ext-plugin-post-resp
- ext-plugin-post-req
- ext-plugin-pre-req
- elasticsearch-logger
|
You might need to change it to the correct host instead of using etcd:2379, as DNS might not resolve correctly. |
I set the value but no change occurred. |
Can you provide some logs about apisix , please? |
Current Behavior
When we update the upstreams in the dashboard, this value becomes nil.
local upstreams, _ = upstream.upstreams()
Expected Behavior
Since APISIX is real-time, upstreams should be updated as soon as they are updated in the dashboard.
Error Logs
local upstreams, _ = upstream.upstreams()
upstream is a nil value
Steps to Reproduce
1- update the upstreams in the dashboard
Environment
The text was updated successfully, but these errors were encountered: