Skip to content

apigateway spits out "Oops. Something went wrong. Check your URI and try again." #370

Description

@JiniousChoi

Environment details:

  • on my vagrant (but not seemingly limited to)

Steps to reproduce the issue:

  1. just ran ansible-playbook -i environment/vagrant apigateway.yml
  2. and then followed https://github.com/apache/openwhisk/blob/master/docs/apigateway.md
  3. curl http://172.17.0.1:9001/api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/hello/world

Provide the expected results and outputs:

$ curl -k http://172.17.0.1:9001/api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/hello/world
{ 
  "payload": "Hello world Serverless API"
}

Provide the actual results and outputs:

$ curl -k http://172.17.0.1:9001/api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/hello/world
{"code":502, "message":"Oops. Something went wrong. Check your URI and try again."}

Additional information you deem important:

For 'docker logs -f apigateway'

==> /var/log/api-gateway/access.log <==
172.17.0.1 - remote_user="-" [30/Jan/2020:04:41:03 +0000] request_method="GET" request_uri="/api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/hello/world" request_protocol="HTTP/1.1" status=502 bbs=84 rl=131 rt=0.005 hr="-" ua="curl/7.47.0" xfwdf="-" upadd="127.0.0.1:443" upstat=502 uprt=0.003 tenantId="23bc46b1-71f6-4ed5-8c54-816aa4f8c502" tenantNamespace="23bc46b1-71f6-4ed5-8c54-816aa4f8c502" tenantInstance="" requestHeaders="" requestBody="" responseHeaders="" responseBody="" apiId="6319ce99-8cd5-4f90-8c4c-3cef943f9f1a" apiKey="-" analyticsUri="/hello/world" reqid="uGgLLc56FKLdGQs90ScVgvzm7TARXBrW"

==> /var/log/api-gateway/gateway_error.log <==
2020/01/30 04:41:03 [error] 34#0: *50 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET /api/23bc46b1-71f6-4ed5-8c54-816aa4f8c502/hello/world HTTP/1.1", upstream: "https://127.0.0.1:443/api/v1/web/guest/default/hello.json", host: "172.17.0.1:9001"

In apigateway bash shell

# netstat -naptl
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:9000            0.0.0.0:*               LISTEN      24/stderr warn;
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      24/stderr warn;
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      24/stderr warn;
tcp        0      0 127.0.0.1:8888          0.0.0.0:*               LISTEN      8/api-gateway-confi
bash-4.4# curl -k https://127.0.0.1:443/api/v1/web/guest/default/hello.json
curl: (7) Failed to connect to 127.0.0.1 port 443: Connection refused
bash-4.4# curl -k https://172.17.0.1:443/api/v1/web/guest/default/hello.json
{
  "payload": "Hello world Serverless API"
}

In a nutshell, I think the upstream in apigateway seems somewhat misconfigured. Is this a known issue? Or am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions