You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "thor533 (via GitHub)" <gi...@apache.org> on 2023/03/31 05:13:01 UTC
[GitHub] [apisix] thor533 opened a new issue, #9213: 503 Service Temporarily Unavailable
thor533 opened a new issue, #9213:
URL: https://github.com/apache/apisix/issues/9213
### Current Behavior
After I configured the log-rotate plugin, the jwt api I used was invalid, the api is “/apisix/plugin/jwt/sign”.
return:
![图片](https://user-images.githubusercontent.com/62246176/228789203-17d19623-43bf-4da5-9942-0a9d83df4e05.png)
the apisix conf is :
apisix:
node_listen: 9080 # APISIX listening port
enable_ipv6: false
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0 # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
admin_key:
- name: "admin"
key: edd1c9f034335f136f87ad84b625c8f1
role: admin # admin: manage all configuration data
# viewer: only can view configuration data
- name: "viewer"
key: 4054f7cf07e344346cd3f287985e76a2
role: viewer
enable_control: true
control:
ip: "0.0.0.0"
port: 9092
etcd:
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- "http://etcd:2379" # multiple etcd address
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds
#plugins:
# the plugins you enabled
- log-rotate
plugin_attr:
log-rotate:
interval: 3 # rotate interval (unit: second)
max_kept: 168 # max number of log files will be kept
enable_compression: false # enable log file compression(gzip) or not, default false
the route conf is :
{
"uri": "/apisix/plugin/jwt/sign",
"name": "public-api",
"desc": "public-api",
"priority": 1,
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE"
],
"plugins": {
"public-api": {}
},
"status": 1
}
### Expected Behavior
when i set the
### Error Logs
The other plug-ins are used normally after the log-rorate plug-in parameter is configured
### Steps to Reproduce
1.set the route
2.set the log-rorate config in apisix config
3.request the route by postman
### Environment
- APISIX version (run `apisix :2.15-alpine`):
- 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
[GitHub] [apisix] thor533 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "thor533 (via GitHub)" <gi...@apache.org>.
thor533 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1493692634
> you add plugin to dashboard plugin list, this is not right. You should add plugin to apisix config
This is the latest configuration
1./apisix_conf/config.yaml
![图片](https://user-images.githubusercontent.com/62246176/229420558-a48b7176-ef56-44c5-9c8f-06ffa219bcc1.png)
2. ./dashboard_conf/config.yaml
![图片](https://user-images.githubusercontent.com/62246176/229420671-7f09e259-3af3-406d-811f-8ca20e5687f1.png)
--
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
[GitHub] [apisix] thor533 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "thor533 (via GitHub)" <gi...@apache.org>.
thor533 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1493688752
> you add plugin to dashboard plugin list, this is not right. You should add plugin to apisix config
I have just removed the log-rorate in dashboard plugin list and only loads apisix config, but the same error
--
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
[GitHub] [apisix] mscb402 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "mscb402 (via GitHub)" <gi...@apache.org>.
mscb402 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1493723441
please add jwt-auth to this file /apisix_conf/config.yaml
![image](https://user-images.githubusercontent.com/11229089/229426348-f7f81fef-f556-4ed4-930d-918076fc9a72.png)
--
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
[GitHub] [apisix] thor533 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "thor533 (via GitHub)" <gi...@apache.org>.
thor533 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1493565716
> Can you show us error message in error.log?
2023/04/03 02:05:46 [error] 48#48: *12778 [lua] init.lua:520: http_access_phase(): failed to set upstream: missing upstream configuration in Route or Service, client: 172.19.0.1, server: _, request: "GET /apisix/plugin/jwt/sign?key=xubin HTTP/1.1", host: "10.210.21.105:9080"
the route config is :
`{
"uri": "/apisix/plugin/jwt/sign",
"name": "public-api",
"desc": "public-api",
"priority": 1,
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE"
],
"plugins": {
"public-api": {}
},
"status": 1
}`
ps:
The log-rorate plug-in is unavailable if I do not start it. All the plug-ins are unavailable
the other error info is :
![图片](https://user-images.githubusercontent.com/62246176/229400921-11222c31-1e86-41b3-ad86-211d924a2101.png)
the bug is ruined!!!!
--
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
[GitHub] [apisix] thor533 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "thor533 (via GitHub)" <gi...@apache.org>.
thor533 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1493734116
> jwt-
thanks! sir ,it can work now,
The documents on the official website need to be updated in time
![图片](https://user-images.githubusercontent.com/62246176/229427903-2559b9b1-90d2-47ef-a567-a3afab877957.png)
--
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
[GitHub] [apisix] mscb402 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "mscb402 (via GitHub)" <gi...@apache.org>.
mscb402 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1493687034
you add plugin to dashboard plugin list, this is not right
--
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
[GitHub] [apisix] thor533 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "thor533 (via GitHub)" <gi...@apache.org>.
thor533 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1493683030
> jwt-auth
NO ,I've already set
1. ./apisix_conf/config.yaml
`apisix:
node_listen: 9080 # APISIX listening port
enable_ipv6: false
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 0.0.0.0/0 # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
admin_key:
- name: "admin"
key: edd1c9f034335f136f87ad84b625c8f1
role: admin # admin: manage all configuration data
# viewer: only can view configuration data
- name: "viewer"
key: 4054f7cf07e344346cd3f287985e76a2
role: viewer
enable_control: true
control:
ip: "0.0.0.0"
port: 9092
etcd:
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
- "http://etcd:2379" # multiple etcd address
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds
nginx_config: # config for render the template to generate nginx.conf
error_log: logs/error.log
error_log_level: info
worker_processes: auto # if you want use multiple cores in container, you can inject the number of cpu as environment variable "APISIX_WORKER_PROCESSES"
#
plugins:
# the plugins you enabled
- log-rotate
plugin_attr:
log-rotate:
interval: 3600 # rotate interval (unit: second)
max_kept: 168 # max number of log files will be kept
enable_compression: false # enable log file compression(gzip) or not, default false`
2. ./dashboard_conf/config.yaml
...
plugins: # plugin list (sorted in alphabetical order)
- api-breaker
- authz-keycloak
- basic-auth
- batch-requests
- consumer-restriction
- cors
# - dubbo-proxy
- echo
- error-log-logger
# - example-plugin
- fault-injection
- grpc-transcode
- hmac-auth
- http-logger
- ip-restriction
- jwt-auth
- kafka-logger
- key-auth
- limit-conn
- public-api
- limit-count
- limit-req
- log-rotate
- node-status
- openid-connect
- prometheus
- proxy-cache
- proxy-mirror
- proxy-rewrite
- redirect
- referer-restriction
- request-id
- request-validation
- response-rewrite
- serverless-post-function
- serverless-pre-function
# - skywalking
- sls-logger
- syslog
- tcp-logger
- udp-logger
- uri-blocker
- wolf-rbac
- zipkin
- server-info
- traffic-split
--
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
[GitHub] [apisix] mscb402 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "mscb402 (via GitHub)" <gi...@apache.org>.
mscb402 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1491394273
Can you show us error message in error.log?
--
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
[GitHub] [apisix] thor533 closed issue #9213: 503 Service Temporarily Unavailable
Posted by "thor533 (via GitHub)" <gi...@apache.org>.
thor533 closed issue #9213: 503 Service Temporarily Unavailable
URL: https://github.com/apache/apisix/issues/9213
--
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
[GitHub] [apisix] mscb402 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "mscb402 (via GitHub)" <gi...@apache.org>.
mscb402 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1493575083
Look like jwt-auth plugin is not loading. You should enable jwt-auth in config file.
--
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
[GitHub] [apisix] thor533 commented on issue #9213: 503 Service Temporarily Unavailable
Posted by "thor533 (via GitHub)" <gi...@apache.org>.
thor533 commented on issue #9213:
URL: https://github.com/apache/apisix/issues/9213#issuecomment-1493710239
> you add plugin to dashboard plugin list, this is not right. You should add plugin to apisix config
This bug is easy to reproduce, you can simply try, thank you very mach
--
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