You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/03/04 04:40:23 UTC

[GitHub] [openwhisk-wskdebug] alexkli opened a new issue #7: [bug] Concurrency error when using wskdebug with IBM Cloud Functions

alexkli opened a new issue #7: [bug] Concurrency error when using wskdebug with IBM Cloud Functions
URL: https://github.com/apache/openwhisk-wskdebug/issues/7
 
 
   _Moved from https://github.com/adobe/wskdebug/issues/30_
   
   ## Version
   ```
   wskdebug --version
   1.0.10
   ```
   
   ## Description
   I am trying to use wskdebug with IBM Cloud Functions.
   
   ### Step 1: My action is very simple
   
   ```
   function main(args) {
     if (args && args.name) {
       console.log(`hello ${args.name}`);
       return { msg: `hello ${args.name}` };
     } else {
       console.log(`hello world`);
       return { msg: `hello world` };
     }
   }
   ```
   
   ### Step 2: Created the action on IBM Cloud
   `ibmcloud fn action create hello-debug index.js`
   
   ### Step 3: started wskdebug
   I get an error when it tried to create the temporary Agent action. I don’t need the LiveReload support.
   
   ## Error
   ```
   $ wskdebug hello-debug index.js -v
   Starting debugger for /_/hello-debug
   Starting local debug container wskdebug-hello-debug-1573772149542
   docker run -d --name wskdebug-hello-debug-1573772149542 --rm -m 268435456 -p 8080 -p 9229:9229 -v "/Users/ulidder/Documents/icloud-documents/code-upkar/temp/openwhisk/simple:/code" ibmfunctions/action-nodejs-v10:1.13.0 node --expose-gc --inspect=0.0.0.0:9229 app.js
   cf95f1d200e860c91aa179ef40f747c0065b998a2acbe1b914c18c33f4db36f9
   Mounting sources onto local debug container: /Users/ulidder/Documents/icloud-documents/code-upkar/temp/openwhisk/simple/index.js
   2019-11-14T22:55:50.728771670Z Debugger listening on ws://0.0.0.0:9229/5c06b464-72f7-45a4-b0f8-0c74fc9deaf2
   2019-11-14T22:55:50.728824972Z For help, see: https://nodejs.org/en/docs/inspector
   Installing agent in OpenWhisk (concurrency)...
   Original action backed up at hello-debug_wskdebug_original.
   { OpenWhiskError: PUT https://us-south.functions.cloud.ibm.com/api/v1/namespaces/_/actions/hello-debug?overwrite=true Returned HTTP 400 (Bad Request) --> "The request content was malformed:
   requirement failed: concurrency 200 exceeds allowed threshold of 1"
       at Client.handleErrors (/usr/local/lib/node_modules/@adobe/wskdebug/node_modules/openwhisk/lib/client.js:216:11)
       at params.then.catch.err (/usr/local/lib/node_modules/@adobe/wskdebug/node_modules/openwhisk/lib/client.js:147:58)
       at processTicksAndRejections (internal/process/task_queues.js:86:5)
     name: 'OpenWhiskError',
     message:
      'PUT https://us-south.functions.cloud.ibm.com/api/v1/namespaces/_/actions/hello-debug?overwrite=true Returned HTTP 400 (Bad Request) --> "The request content was malformed:\nrequirement failed: concurrency 200 exceeds allowed threshold of 1"',
     error:
      { code: 'df940ccf1d076f103c3743685c25d2b2',
        error:
         'The request content was malformed:\nrequirement failed: concurrency 200 exceeds allowed threshold of 1' },
     statusCode: 400 }
   
   Restoring action
   ```
   
   ## Workaround by @alexkli 
   It should normally automatically pick a different agent that does not require the concurrency feature, but I guess that detection is not perfect yet (it looks at the swagger api docs and maybe the ibm cloud has different information in there).
   As alternative, you can try the ngrok option using `--ngrok`. It should just work - you don’t even need an ngrok.com account.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [openwhisk-wskdebug] alexkli closed issue #7: Concurrency error when using wskdebug with IBM Cloud Functions

Posted by GitBox <gi...@apache.org>.
alexkli closed issue #7: Concurrency error when using wskdebug with IBM Cloud Functions
URL: https://github.com/apache/openwhisk-wskdebug/issues/7
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services