nareshnagamalle commented on issue #7844:
URL: https://github.com/apache/apisix/issues/7844#issuecomment-1236608410
Thanks @tokers and @tzssangglass for your responses.
The machine which I deployed apisix , following are tested.
1. When I accessed httpbin.org or any other external portal with curl
command, the response is coming fine.
**Reason** I have given my company proxy details in .bashrc and
.bash_profile, so it could able to fetch our proxy and send request to external
portal and getting response.
2. I have done the following
i. 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/*",
"upstream": {
"type": "roundrobin",
"nodes": {
"httpbin.org:80": 1
}
}
}'
**Response**: Got successful response
{"node":{"value":{"create_time":1662109538,"priority":0,"methods":
["GET"],"update_time":1662351433,"uri":"\/anything\/*","host":"example.com","status":1,"upstream":{"nodes":{"httpbin.org:80":1},"hash_on":"vars","scheme":"http","pass_host":"pass","type":"roundrobin"},"id":"1"},"key":"\/apisix\/routes\/1"},"action":"set"}
ii. After above step, executed the following statement
curl -i -X GET "http://127.0.0.1:9080/anything/foo?arg=10" -H "Host:
example.com"
**Response** Got following error response
HTTP/1.1 504 Gateway Time-out
Date: Mon, 05 Sep 2022 04:21:24 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 164
Connection: keep-alive
Apisix-Plugins: no plugin
Server: APISIX/2.15.0
X-APISIX-Upstream-Status: 504
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>openresty</center>
</body>
</html>
**I feel reason for above error response** is apisix software not
considering our company proxy details from .bashrc and bash_profile file and
not able to connect to external portal .
And please find also the messages from access.log and error.log
**access.log**
127.0.0.1 - - [05/Sep/2022:09:51:24 +0530] example.com "GET
/anything/foo?arg=10 HTTP/1.1" 504 164 60.038 "-" "curl/7.29.0"
34.227.213.82:80 504 60.000 "http.example.com"
**error.log**
2022/09/05 09:51:24 [error] 3702#3702: *9444121 upstream timed out (110:
Connection timed out) while connecting to upstream, client: 127.0.0.1, server:
_, request: "GET /anything/foo?arg=10 HTTP/1.1", upstream:
"http://34.227.213.82:80/anything/foo?arg=10", host: "example.com"
Please let me know where can I give our company proxy details in apisix
software, so that when ever apisix want to communicate with external portal it
should consider our company proxy and connect &get response.
Please let me know any other details are required further and help to
resolve the issue
--
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]