pawarjayesh1985 opened a new issue #4667:
URL: https://github.com/apache/apisix/issues/4667
### Issue description
I have created simple route and upstream configuration. as follows:
Created route:
{
"uri": "/order",
"name": "",
"host": "localhost",
"upstream_id": "1",
"status": 1
}
Created Upstream:
{
"nodes": [
{
"host": "localhost",
"port": 9181,
"weight": 1
}
],
"timeout": {
"connect": 6,
"read": 6,
"send": 6
},
"type": "roundrobin",
"scheme": "http",
"pass_host": "pass",
"name": "Upstream1"
}
Binding
curl "http://127.0.0.1:9080/apisix/admin/routes/365245490364678847" -H
"X-API-KEY: <KEY>" -X PUT -d '
{
"uri": "/order",
"host": "localhost",
"upstream_id": "1"
}'
But, when I tried this curl:
I am getting following issue:
$ curl -i -X GET "http://127.0.0.1:9080/order" -H "Host: localhost"
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left Speed
100 154 100 154 0 0 154 0 0:00:01 --:--:-- 0:00:01
150kHTTP/1.1 502 Bad Gateway
Date: Sun, 25 Jul 2021 17:13:38 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 154
Connection: keep-alive
Server: APISIX/2.6
X-APISIX-Upstream-Status: 502
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>openresty</center>
</body>
</html>
Could you please help me out to resolve this issue as soon as possible?
### Environment
Bug report without environment information will be ignored or closed.
* apisix version (cmd: `apisix version`):
* OS (cmd: `uname -a`):
* OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
* etcd version, if have (cmd: run `curl
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
* apisix-dashboard version, if have:
* luarocks version, if the issue is about installation (cmd: `luarocks
--version`):
### Minimal test code / Steps to reproduce the issue
Bug report without steps to reproduce will be ignored or closed.
1.
2.
3.
### What's the actual result? (including assertion message & call stack if
applicable)
$ curl -i -X GET "http://127.0.0.1:9080/order" -H "Host: localhost"
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left Speed
100 154 100 154 0 0 154 0 0:00:01 --:--:-- 0:00:01
150kHTTP/1.1 502 Bad Gateway
Date: Sun, 25 Jul 2021 17:13:38 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 154
Connection: keep-alive
Server: APISIX/2.6
X-APISIX-Upstream-Status: 502
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>openresty</center>
</body>
</html>
### What's the expected result?
http://localhost:9080/order
should give me proper response from the upstream(microservice).
--
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]