Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoking action gives 403: Trigger authentication request failed #773

Open
jhawarchirag0 opened this issue Jan 2, 2024 · 1 comment
Open

Comments

@jhawarchirag0
Copy link

jhawarchirag0 commented Jan 2, 2024

I have openwhisk deployed on a kubernetes cluster. I created a trigger called once-per-minute using this swagger ui,
The curl request: -

curl -X PUT "https://localhost:4430/api/v1/namespaces/_/triggers/once-per-min?overwrite=false" -H "accept: application/json" -H "authorization: Basic Nzg5YzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOmFiY3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A=" -H "Content-Type: application/json" -d "{\"name\":\"once-per-min\",\"annotations\":[{\"key\":\"feed\",\"value\":\"/whisk.system/alarms/alarm\"}]}"

Got Response 200

{
  "annotations": [
    {
      "key": "feed",
      "value": "/whisk.system/alarms/alarm"
    }
  ],
  "limits": {},
  "name": "once-per-min",
  "namespace": "whisk.system",
  "parameters": [],
  "publish": false,
  "updated": 1703607489753,
  "version": "0.0.1"
}

Now, I tried to create a cron job for the alarm action in whisk.system

curl -X POST "https://localhost:4430/api/v1/namespaces/whisk.system%2Falarms/actions/alarm?blocking=true&result=false" -H "accept: application/json" -H "authorization: Basic Nzg5YzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOmFiY3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A=" -H "Content-Type: application/json" -d "{\"authKey\":\"23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP\",\"cron\":\"*/1 * * * *\",\"lifecycleEvent\":\"CREATE\",\"triggerName\":\"/_/once-per-min\"}"

Got a 502 bad gateway

{
  "activationId": "260396828cb84c158396828cb82c15b7",
  "annotations": [
    {
      "key": "path",
      "value": "whisk.system/alarms/alarm"
    },
    {
      "key": "waitTime",
      "value": 13
    },
    {
      "key": "kind",
      "value": "nodejs:10"
    },
    {
      "key": "timeout",
      "value": false
    },
    {
      "key": "limits",
      "value": {
        "concurrency": 1,
        "logs": 10,
        "memory": 256,
        "timeout": 60000
      }
    }
  ],
  "duration": 38,
  "end": 1703607625061,
  "logs": [],
  "name": "alarm",
  "namespace": "whisk.system",
  "publish": false,
  "response": {
    "result": {
      "error": {
        "error": "Trigger authentication request failed."
      }
    },
    "size": 60,
    "status": "application error",
    "success": false
  },
  "start": 1703607625023,
  "subject": "whisk.system",
  "version": "0.0.1"
}

Tried to read the activation

{
  "activationId": "260396828cb84c158396828cb82c15b7",
  "annotations": [
    {
      "key": "path",
      "value": "whisk.system/alarms/alarm"
    },
    {
      "key": "waitTime",
      "value": 13
    },
    {
      "key": "kind",
      "value": "nodejs:10"
    },
    {
      "key": "timeout",
      "value": false
    },
    {
      "key": "limits",
      "value": {
        "concurrency": 1,
        "logs": 10,
        "memory": 256,
        "timeout": 60000
      }
    }
  ],
  "duration": 38,
  "end": 1703607625061,
  "logs": [
    "2023-12-26T16:20:25.061306357Z stdout: alarm: Error invoking whisk action: 403 { error: 'Trigger authentication request failed.' }"
  ],
  "name": "alarm",
  "namespace": "whisk.system",
  "publish": false,
  "response": {
    "result": {
      "error": {
        "error": "Trigger authentication request failed."
      }
    },
    "size": 60,
    "status": "application error",
    "success": false
  },
  "start": 1703607625023,
  "subject": "whisk.system",
  "version": "0.0.1"
}
@jhawarchirag0 jhawarchirag0 changed the title Invoking action gives 403: Trigger authentication request failed Invoking whisk.system/alarms/alarm action gives error Jan 3, 2024
@jhawarchirag0 jhawarchirag0 changed the title Invoking whisk.system/alarms/alarm action gives error Invoking action gives 403: Trigger authentication request failed Jan 3, 2024
@style95
Copy link
Member

style95 commented Jan 3, 2024

I think the alarm web action failed to access CouchDB.
Try checking if the CouchDB credentials are correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants