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 2022/06/15 02:18:22 UTC

[GitHub] [openwhisk-composer] GitHubDiom opened a new issue, #85: Cannot find module 'redis-commands'

GitHubDiom opened a new issue, #85:
URL: https://github.com/apache/openwhisk-composer/issues/85

   Hi, community 
   
   The error occurs when I am trying to run a set of parallel actions.
   > {
       "error": "Internal error: Cannot find module 'redis-commands'\nRequire stack:\n- /nodejsAction/runner.js\n- /nodejsAction/src/service.js\n- /nodejsAction/app.js"
   }
   
   
   Here is my basic env info, the `/guest/image` itself can be run normally
   ```
   $ wsk action list
   actions
   /guest/concur-images                                                   private nodejs:14
   /guest/image                                                           private python:3
   
   $ node -v
   v10.24.0
   ```
   
   I also wrote some scripts for building and invoking the parallel actions as below:
   `concur-images.js`
   ```shell
   const composer = require('openwhisk-composer');
   
   const workflow = 
       composer.par(
           composer.action("image"),
           composer.action("image"),
           composer.action("image"),
   )
   module.exports = workflow
   ```
   `build_concur_images.sh`
   ```shell
   docker stop redis
   docker rm redis 
   
   function_name="concur-images"
   
   
   redis_container_id=$(docker run -itd --name redis -p 6379:6379 redis)
   
   redis_container_ip=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $redis_container_id)
   echo "IP = $redis_container_ip"
   echo '{
       "$composer": {
           "openwhisk": {
               "ignore_certs": true
           },
           "redis": {
               "uri": "redis://'${redis_container_ip}':6379"
           }
       }
   }' > ${function_name}-input.json
   
   
   compose $function_name.js > $function_name.json
   deploy $function_name $function_name.json -w
   
   ```
   
   `invoke-concur-image.sh`
   ```shell
   wsk action invoke -r /guest/concur-images -P concur-images-input.json
   ```
   And I just run `./invoke-concur_image.sh` after `./build_concur_images.sh`, then the error happends.
   ```shell
   
   $ ./build_concur_images.sh 
   redis
   redis
   IP = 172.17.0.2
   ok: created action /_/concur-images
   $ ./invoke-concur_image.sh 
   {
       "error": "Internal error: Cannot find module 'redis-commands'\nRequire stack:\n- /nodejsAction/runner.js\n- /nodejsAction/src/service.js\n- /nodejsAction/app.js"
   }
   ```
   
   Thank you
   


-- 
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: issues-unsubscribe@openwhisk.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk-composer] HongyuHe commented on issue #85: Cannot find module 'redis-commands'

Posted by "HongyuHe (via GitHub)" <gi...@apache.org>.
HongyuHe commented on issue #85:
URL: https://github.com/apache/openwhisk-composer/issues/85#issuecomment-1430267669

   Hi @GitHubDiom, have you solved the issue by any chance? I encountered the same problem.


-- 
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: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk-composer] GitHubDiom closed issue #85: Cannot find module 'redis-commands'

Posted by "GitHubDiom (via GitHub)" <gi...@apache.org>.
GitHubDiom closed issue #85: Cannot find module 'redis-commands'
URL: https://github.com/apache/openwhisk-composer/issues/85


-- 
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: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk-composer] HongyuHe commented on issue #85: Cannot find module 'redis-commands'

Posted by "HongyuHe (via GitHub)" <gi...@apache.org>.
HongyuHe commented on issue #85:
URL: https://github.com/apache/openwhisk-composer/issues/85#issuecomment-1433639337

   > yeah, changing nodejs image version (7f7c181) solved this issue `{ "kind": "nodejs:14", "default": true, "image": { "prefix": "openwhisk", "name": "action-nodejs-v14", "tag": "7f7c181" }, ... } `
   
   Hi @GitHubDiom, thanks a lot for the suggestion!
   I've changed the nodejs runtime to `7f7c181`:
   ```sh
   Thursday 16 February 2023  12:32:00 -0700 (0:00:00.044)       0:01:22.147 *****
   changed: [invoker1] => (item={'prefix': 'openwhisk', 'name': 'action-nodejs-v14', 'tag': '7f7c181'})
   changed: [invoker0] => (item={'prefix': 'openwhisk', 'name': 'action-nodejs-v14', 'tag': '7f7c181'})
   changed: [invoker0] => (item={'prefix': 'openwhisk', 'name': 'action-nodejs-v16', 'tag': 'nightly'})
   changed: [invoker1] => (item={'prefix': 'openwhisk', 'name': 'action-nodejs-v16', 'tag': 'nightly'})
   changed: [invoker0] => (item={'prefix': 'openwhisk', 'name': 'action-python-v3.7', 'tag': 'nightly'})
   changed: [invoker1] => (item={'prefix': 'openwhisk', 'name': 'action-python-v3.7', 'tag': 'nightly'})
   changed: [invoker0] => (item={'prefix': 'openwhisk', 'name': 'action-swift-v5.1', 'tag': 'nightly'})
   ```
   However, it gives me the following error now:
   ```sh
   $ wsk -i action invoke parallel -P parallel_params.json --result
   {
       "error": "Internal error: DEL can't be processed. The connection is already closed."
   }
   ```
   Logs:
   ```sh
   Activation: 'parallel' (4576b5566aac4a47b6b5566aacaa47e9)
   [
       "2023-02-16T19:52:57.808228566Z stdout: Entering composition",
       "2023-02-16T19:52:57.808314957Z stdout: barrierId: 514a3457-15e1-494d-a108-6eabe88c20d2, spawning: 1",
       "2023-02-16T19:52:57.809953984Z stderr: AbortError: LPUSH can't be processed. The connection is already closed.",
       "2023-02-16T19:52:57.809979327Z stderr:     at handle_offline_command (/node_modules/redis/index.js:851:15)",
       "2023-02-16T19:52:57.809988773Z stderr:     at RedisClient.internal_send_command (/node_modules/redis/index.js:885:9)",
       "2023-02-16T19:52:57.809996803Z stderr:     at RedisClient.lpush (/node_modules/redis/lib/commands.js:58:25)",
       "2023-02-16T19:52:57.810004616Z stderr:     at eval (eval at initializeActionHandler (/nodejsAction/runner.js:56:23), <anonymous>:22:12)",
       "2023-02-16T19:52:57.810012999Z stderr:     at new Promise (<anonymous>)",
       "2023-02-16T19:52:57.810020612Z stderr:     at RedisClient.t.<computed> [as lpushAsync] (eval at initializeActionHandler (/nodejsAction/runner.js:56:23), <anonymous>:21:86)",
       "2023-02-16T19:52:57.810028855Z stderr:     at m (eval at initializeActionHandler (/nodejsAction/runner.js:56:23), <anonymous>:30:39)",
       "2023-02-16T19:52:57.810036515Z stderr:     at Object.parallel (eval at initializeActionHandler (/nodejsAction/runner.js:56:23), <anonymous>:75:105)",
       "2023-02-16T19:52:57.81004431Z  stderr:     at $ (eval at initializeActionHandler (/nodejsAction/runner.js:56:23), <anonymous>:94:78)",
       "2023-02-16T19:52:57.810052458Z stderr:     at eval (eval at initializeActionHandler (/nodejsAction/runner.js:56:23), <anonymous>:99:59) {",
       "2023-02-16T19:52:57.810060251Z stderr:   command: 'LPUSH',",
       "2023-02-16T19:52:57.810067251Z stderr:   code: 'NR_CLOSED',",
       "2023-02-16T19:52:57.810074299Z stderr:   args: [ 'composer/fork/514a3457-15e1-494d-a108-6eabe88c20d2', 42 ]",
       "2023-02-16T19:52:57.810081747Z stderr: }"
   ]
   ```
   
   Do you know by any chance how to resolve it?
   
   
   
   


-- 
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: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [openwhisk-composer] GitHubDiom commented on issue #85: Cannot find module 'redis-commands'

Posted by "GitHubDiom (via GitHub)" <gi...@apache.org>.
GitHubDiom commented on issue #85:
URL: https://github.com/apache/openwhisk-composer/issues/85#issuecomment-1430584384

   yeah, changing nodejs image version (7f7c181) solved this issue
   `{
                   "kind": "nodejs:14",
                   "default": true,
                   "image": {
                       "prefix": "openwhisk",
                       "name": "action-nodejs-v14",
                       "tag": "7f7c181"
                   },
   ...
   }
   `


-- 
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: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Cannot find module 'redis-commands' [openwhisk-composer]

Posted by "Abhishekghosh1998 (via GitHub)" <gi...@apache.org>.
Abhishekghosh1998 commented on issue #85:
URL: https://github.com/apache/openwhisk-composer/issues/85#issuecomment-1775136795

   @HongyuHe were you able to fix this?


-- 
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: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org