sahara0506 opened a new issue #89:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/89
部署好java的plugin之后,调用报错
以下是报错信息
2021/11/27 17:38:12 [error] 45#45: *36398 [lua] init.lua:617: phase_func():
failed to connect to the unix socket unix:/usr/local/apisix/conf/apisix-1.sock:
no such file or directory, client: 172.25.0.1, server: _, request: "POST
/provider HTTP/1.1", host: "192.168.101.8:9080"
2021/11/27 17:38:12 [warn] 45#45: *36398 [lua] plugin.lua:680: run_plugin():
ext-plugin-pre-req exits with http status code 503, client: 172.25.0.1, server:
_, request: "POST /lotus2/provider HTTP/1.1", host: "192.168.101.8:9080"
### Environment
docker-compose 部署的
`apisix:
#image: apache/apisix:2.10.0-alpine
image: apache/apisix:2.10.0-alpine-java8
restart: always
volumes:
- ./apisix_log:/usr/local/apisix/logs
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
#-
/Users/franks/apisix/apisix-docker/example/runner/runner.sock:/tmp/runner.sock
-
/Users/franks/workspace/franks/apisix-java-plugin-runner/dist/apisix-runner-bin/apisix-java-plugin-runner.jar:/tmp/apisix-java-plugin-runner.jar
depends_on:
- etcd
##network_mode: host
environment:
- TZ=Asia/Shanghai
ports:
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9092:9092/tcp"
networks:
apisix:`
apisix的配置文件:
`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
plugin_attr:
prometheus:
export_addr:
ip: "0.0.0.0"
port: 9091
ext-plugin:
#path_for_test: "/tmp/runner.sock"
cmd: ['java', '-jar', '-Xmx128m', '-Xms128m',
'/tmp/apisix-java-plugin-runner.jar']`
路由配置:
`{
"uri": "/test/**",
"name": "test路由",
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE"
],
"plugins": {
"ext-plugin-pre-req": {
"conf": [
{
"name": "ApiAuthenticationFilter",
"value": "bar"
}
],
"disable": false
},
"proxy-rewrite": {
"regex_uri": [
"^/test/(.*)",
"/$1"
]
}
},
"service_id": "383314542148453061",
"upstream_id": "383314501446927045",
"status": 1
}`
apisix-java-plugin-runner version is 0.1.0
如果不使用plugin的时候,调用正常,但是加入plugin之后,就变成503报错,通过日志看,也没有进入这个plugin
请问是什么问题导致的?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]