openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

Openwhisk actions return "The connection failed, or timed out. (HTTP status code 404)" after machine is rebooted

Open Sheshadri-1992 opened this issue 3 years ago • 1 comments

Environment details:

  • Native Ubuntu

  • version of docker Client: Docker Engine - Community Version: 20.10.12 API version: 1.41 Go version: go1.16.12 Git commit: e91ed57 Built: Mon Dec 13 11:45:27 2021 OS/Arch: linux/amd64

  • Ubuntu NAME="Ubuntu" VERSION="18.04.6 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.6 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic

Steps to reproduce the issue:

  1. Installed Openwhisk with the [https://github.com/apache/openwhisk/blob/master/tools/ubuntu-setup/README.md]. I could create actions, and execute them by issuing wsk cli commands.
  2. Restarted my machine, set the environment variable to ENVIRONMENT=local
  3. When i start issuing action requests, I get the error error: Unable to obtain the list of actions for namespace 'default': The connection failed, or timed out. (HTTP status code 404)

Provide the expected results and outputs:

(base) swamiji@28-Nov-2022:bin$ ./wsk action list --insecure
List of actions that I had created in the default namespace

Provide the actual results and outputs:

error: Unable to obtain the list of actions for namespace 'default': The connection failed, or timed out. (HTTP status code 404)

Additional information you deem important:

  • This problem was getting resolved if I restarted the computer and tried it again. But this is unreliable, it used to work before. Now it consistently shows the HTTP 404 error for any request to the 'default' namespace.

Openwhisk config file (whisk.properties)

Screenshot from 2022-11-28 20-38-02

Openwhisk (whisk.conf)

Screenshot from 2022-11-28 20-38-56

All the services of the openwhisk are up:

Screenshot from 2022-11-28 20-32-15

Attaching the debug logs for the command

(base) swamiji@28-Nov-2022:bin$ ./wsk action list --insecure --debug

[-go/whisk.addRouteOptions]:051:[Inf] Adding options &{Limit:30 Skip:0 Docs:false} to route 'actions' [-go/whisk.addRouteOptions]:076:[Inf] Returning route options 'actions?limit=30&skip=0' from input struct &{Limit:30 Skip:0 Docs:false} [isk.(*ActionService).List]:189:[Err] Action list route with options: actions [k.(*Client).NewRequestUrl]:825:[Inf] basepath: https://172.17.0.1/api, version/namespace path: v1/namespaces/, resource path: actions?limit=30&skip=0 [k.(*Client).addAuthHeader]:335:[Inf] Adding basic auth header; using authkey REQUEST: [GET] https://172.17.0.1/api/v1/namespaces//actions?limit=30&skip=0 Req Headers { "Authorization": [ "Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A=" ], "User-Agent": [ "OpenWhisk-CLI/1.0 (2021-03-26T01:02:38.401+0000) linux amd64" ] } RESPONSE:Got response with code 404 Resp Headers { "Content-Length": [ "19" ], "Content-Type": [ "text/plain; charset=utf-8" ], "Date": [ "Mon, 28 Nov 2022 14:57:47 GMT" ], "X-Content-Type-Options": [ "nosniff" ] } Response body size is 19 bytes Response body received: 404 page not found

[o/whisk.PrintResponseInfo]:536:[Inf] Response body received (ASCII quoted string): "404 page not found\n" [/whisk.parseErrorResponse]:551:[Inf] HTTP failure 404 + body [/whisk.parseErrorResponse]:573:[Err] HTTP response with unexpected body failed due to contents parsing error: 'json: cannot unmarshal number into Go value of type whisk.ErrorResponse' [isk.(*ActionService).List]:203:[Err] s.client.Do() error - HTTP req https://172.17.0.1/api/v1/namespaces/_/actions?limit=30&skip=0; error 'The connection failed, or timed out. (HTTP status code 404)' [/commands.actionListError]:1062:[Err] Client.Actions.List(, &whisk.ActionListOptions{Limit:30, Skip:0, Docs:false}) error: The connection failed, or timed out. (HTTP status code 404) [-cli/commands.ExitOnError]:1193:[Inf] err object type: *whisk.WskError [-cli/commands.ExitOnError]:1204:[Err] Got a *whisk.WskError error: &whisk.WskError{RootErr:(*errors.errorString)(0xc00009cea0), ExitCode:148, DisplayMsg:true, MsgDisplayed:false, DisplayUsage:true, DisplayPrefix:true, ApplicationError:false, TimedOut:false} error: Unable to obtain the list of actions for namespace 'default': The connection failed, or timed out. (HTTP status code 404)

Sheshadri-1992 avatar Nov 28 '22 15:11 Sheshadri-1992

I'm also facing this issue. Is there any resolution/workaround so far? @akrabat @jthomas

saswat0 avatar Dec 02 '22 05:12 saswat0