moleculer
moleculer copied to clipboard
Detected a potential I/O issue on moleculer
Prerequisites
Please answer the following questions for yourself before submitting an issue.
- [x] I am running the latest version
- [x] I checked the documentation and found no answer
- [x] I checked to make sure that this issue has not already been filed
- [x] I'm reporting the issue to the correct repository
Current Behavior
- Try to use https://clinicjs.org/ to inspect the
moleculer-demo
project (bootstrap bymoleculer init project moleculer-demo
). I have uploaded result to easy investigation if needed. https://upload.clinicjs.org/public/c8e39d5cdecc9e1df54d055dc3768122f384d6351a27cd149fc49e3d712bee26/92878.clinic-doctor.html
Detected a potential I/O issue
- CPU Usage
-Memory Usage
Expected Behavior
- Should have no I/O issue.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- Check out the source code at https://codesandbox.io/s/rtxzs
- Run
yarn clinic:doctor
ornpm run clinic:doctor
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
- Moleculer version: v0.14.7
- NodeJS version: v10.20.1
- Operating System: Mac OSX
Hello @icebob I added the reproduce
steps yesterday. Am I missing anything? Thanks.
No, thanks, I saw, just I should reproduce it in my environment, as well. So this label is for me :)
I can't reproduce because I've got error from clinic:
process exited with exit code 1
- Analysing dataError: No files matching the pattern found
at notFound (d:\Work\tmp\mol-clinic\node_modules\@nearform\node-trace-log-join\index.js:66:15)
at combine (d:\Work\tmp\mol-clinic\node_modules\@nearform\node-trace-log-join\index.js:25:34)
at d:\Work\tmp\mol-clinic\node_modules\@nearform\node-trace-log-join\index.js:21:5
at FSReqCallback.oncomplete (fs.js:146:23)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clinic:doctor: `clinic doctor --on-port 'npx autocannon -R 30 localhost:3000/api/greeter/hello' -- node node_modules/moleculer/bin/moleculer-runner.js --repl --hot services/**/*.service.js`
npm ERR! Exit status 1
npm ERR!
Thanks. Could you try to reproduce on again with this repo? https://github.com/jellydn/moleculer-demo I just tried and reproduced the issue.
@jellydn
D:\Projects\moleculer-demo>npm run clinic:doctor
[email protected] clinic:doctor D:\Projects\moleculer-demo
npx clinic doctor --on-port 'npx autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/*.service.js
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clinic:doctor: `npx clinic doctor --on-port 'npx autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/*.service.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] clinic:doctor script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\..\AppData\Roaming\npm-cache\_logs\2020-06-04T08_49_58_539Z-debug.log
debug.log:
13 verbose stack Error: [email protected] clinic:doctor: `npx clinic doctor --on-port 'npx autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/*.service.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
Thanks @IstenesImre @icebob I found the root cause. I have updated my reproduce repo https://github.com/jellydn/moleculer-demo Could you try again? Thanks.
@jellydn
git clone https://github.com/jellydn/moleculer-demo && cd moleculer-demo && npm i && npm run clinic:doctor
Output:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clinic:doctor: `npx clinic doctor --on-port 'npx autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/**/*.service.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] clinic:doctor script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\....\AppData\Roaming\npm-cache\_logs\2020-06-08T07_06_17_966Z-debug.log
Debug.log:
13 verbose stack Error: [email protected] clinic:doctor: `npx clinic doctor --on-port 'npx autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/**/*.service.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
Scripts:
"scripts": {
"dev": "moleculer-runner --repl --hot services/**/*.service.js",
"clinic:doctor": "npx clinic doctor --on-port 'npx autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/**/*.service.js",
...
npm run dev = starts normally
npm run clinic:doctor = exit 1
@IstenesImre Sorry, could you try again? I just removed npx
from the script command. Thanks.
git clone https://github.com/jellydn/moleculer-demo && cd moleculer-demo && npm i && npm run clinic:doctor
@jellydn Same:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clinic:doctor: `clinic doctor --on-port 'npx autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/**/*.service.js`
npm ERR! Exit status 1
1 silly lifecycle [email protected]~clinic:doctor: Returned: code: 1 signal: null
12 info lifecycle [email protected]~clinic:doctor: Failed to exec clinic:doctor script
13 verbose stack Error: [email protected] clinic:doctor: `clinic doctor --on-port 'npx autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/**/*.service.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
Sorry, I missed removing npx
on the command. Could you try again? 🙏 Thanks. @IstenesImre
git clone https://github.com/jellydn/moleculer-demo && cd moleculer-demo && npm i && npm run clinic:doctor
@jellydn
> clinic doctor --on-port 'autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/**/*.service.js
events.js:287
throw er; // Unhandled 'error' event
^
Error: spawn moleculer-runner ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn moleculer-runner',
path: 'moleculer-runner',
spawnargs: [ '--repl', '--hot', 'services/**/*.service.js' ]
}
3 verbose stack Error: [email protected] clinic:doctor: `clinic doctor --on-port 'autocannon -R 30 localhost:3000/api/greeter/hello' -- moleculer-runner --repl --hot services/**/*.service.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
I guess you ran into this error because you're working on Windows. Here is my record. https://asciinema.org/a/W3OeM0S8yXWBojF0r2Hqb3yXu
Let me find a Windows PC and to reproduce the error. Thanks.
On CentOS works fine! results (doctor+bubbleproof): clinic.zip
Yes, from your zip file @IstenesImre You will see the issue which I am talking about
Could you tell me, in this moleculer-demo example what we see? Thanks :)
No problem. Pretty much is on the their document https://clinicjs.org/documentation/doctor/06-fixing-io-problem/ if you want to investigate.