ericsyh opened a new issue #56:
URL: https://github.com/apache/apisix-go-plugin-runner/issues/56
### Issue description
I followed the step to install the APISIX, build the go-plugin-runner and
create the route with plugin say. But the response is `503 Service Temporarily
Unavailable` when i execute `curl 127.0.0.1:9080/get`.
Step to reproduce:
1. Install the APISIX, build the go-plugin-runner
2. Change the APISIX config:
```
apisix:
admin_key:
- name: admin
key: edd1c9f034335f136f87ad84b625c8f1
role: admin
ext-plugin:
cmd: ["/home/ericsyh/apisix-go-plugin-runner-master/go-runner","run"]
```
3. start the APISIX, and check the process
```
ps -ef | grep apisix
root 1127 1 0 16:51 ? 00:00:00 nginx: master process
openresty -p /usr/local/apisix -c /usr/local/apisix/conf/nginx.conf
root 3208 934 0 17:03 pts/0 00:00:00 grep --color=auto apisix
```
4. Create the route
```
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/get",
"plugins": {
"ext-plugin-pre-req": {
"conf": [
{"name":"say", "value":"{\"body\":\"hello\"}"}
]
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:1980": 1
}
}
}'
{"action":"set","node":{"key":"\/apisix\/routes\/1","value":{"status":1,"update_time":1640451895,"upstream":{"pass_host":"pass","nodes":{"127.0.0.1:1980":1},"type":"roundrobin","scheme":"http","hash_on":"vars"},"create_time":1640451895,"id":"1","plugins":{"ext-plugin-pre-req":{"conf":[{"name":"say","value":"{\"body\":\"hello\"}"}]}},"priority":0,"uri":"\/get"}}}
```
5. Test the plugin say:
```
curl 127.0.0.1:9080/get
<html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>openresty</center>
</body>
</html>
```
### Environment
* APISIX Go Plugin Runner's version: master/latest
* APISIX version: 2.11.0
* Go version: go1.17.5 linux/amd64
* OS (cmd: `uname -a`): CentOS7
--
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]