apache / apache/apisix-java-plugin-runner

request help: failed to connect to the unix socket through docker

Đang mở
#161 8 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
152
Fork
102
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

After solved the issue [https://github.com/apache/apisix-java-plugin-runner/issues/156]

I use docker-compose.yml which file is created by you to start apisix
```
sudo docker-compose -f ../ci/docker-compose.yml up -d

```

After that, apisix works. I can set routes as the quick-start.md.
But it not works after I configuring the Java plugin via
```
curl "http://127.0.0.1:9080/apisix/admin/routes/1" -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
{
"methods": ["GET"],
"host": "example.com",
"uri": "/anything/*",
"plugins": {
"ext-plugin-pre-req": {
"conf": [
{
"name": "RewriteRequestDemoFilter",
"value": "{\"body\":\"hello\"}"
}
]
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"httpbin.org:80": 1
}
}
}'
```

I have checked the logs of the apisix docker
```
sudo docker logs -f ab0b81f8bdd5

```

```

2022/07/03 14:11:05 [error] 49#49: *49726 connect() to unix:/tmp/runner.sock failed (111: Connection refused), client: 172.18.0.1, server: _, request: "GET /anything/foo?arg=10 HTTP/1.1", host: "example.com"
2022/07/03 14:11:05 [error] 49#49: *49726 [lua] init.lua:841: phase_func(): failed to connect to the unix socket unix:/tmp/runner.sock: connection refused, client: 172.18.0.1, server: _, request: "GET /anything/foo?arg=10 HTTP/1.1", host: "example.com"
2022/07/03 14:11:05 [warn] 49#49: *49726 [lua] plugin.lua:844: run_plugin(): ext-plugin-pre-req exits with http status code 503, client: 172.18.0.1, server: _, request: "GET /anything/foo?arg=10 HTTP/1.1", host: "example.com"
172.18.0.1 - - [03/Jul/2022:14:11:05 +0000] example.com "GET /anything/foo?arg=10 HTTP/1.1" 503 194 0.000 "-" "curl/7.77.0" - - - "http://example.com"
```

There is the issue about the unix domain socket through docker and the host machine?

@tzssangglass Do you mind taking a look at this issue...
Thanks for your help in advance.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.