-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Cluster fails with NODE_OPTIONS="--inspect"
#19026
Comments
I think amending the condition node/lib/internal/cluster/master.js Line 109 in 81d73fe
NODE_OPTIONS (if it exists) would fix this.
Would also need tests (which is the reason I haven't raised a quick PR). If no-one else picks this up I'll try to find some time next week. (If anyone does feel like picking this up, just raise a PR -- no need to ask permission first 😄 ). |
I have been working on this issue and have created a PR (#19165). This is my first PR and I have tried to make sure that I follow all the guide lines. Please let me know if I have missed something or if any changes are required. |
When using cluster and --inspect as cli argument it is correctly handled and each worker will use a different port, this was fixed by nodejs#13619. But when env var NODE_OPTIONS="--inspect" is set this logic doesn't apply and the workers will fail as they try to attach to the same port. Fixes: nodejs#19026
…k with NODE_OPTIONS="--inspect" When using cluster and --inspect as cli argument it is correctly handled and each worker will use a different port, this was fixed by nodejs#13619. But when env var NODE_OPTIONS="--inspect" is set this logic doesn't apply and the workers will fail as they try to attach to the same port. Fixes: nodejs#19026
…or-node_options Changed multi-line template string in test-inspect-support-for-node_options as per feedback from @jasnell. PR nodejs#19165 Fixes : nodejs#19026
…ptions Removed numCpus and hardcoded to spawn multiple workers in test-inspect-support-for-node_options. PR nodejs#19165 Fixes : nodejs#19026
…rt-for-node_options Using common.mustCall to wrap callback and added assert to replace if-fail in test-inspect-support-for-node_options. PR nodejs#19165 Fixes : nodejs#19026
const numWorkers added to specify number of workers spawned in test-inspect-support-for-node_options. PR nodejs#19165 Fixes : nodejs#19026
When using cluster and --inspect as cli argument it is correctly handled and each worker will use a different port, this was fixed by #13619. But when env var NODE_OPTIONS="--inspect" is set this logic doesn't apply and the workers will fail as they try to attach to the same port. Fixes: #19026 PR-URL: #19165 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
When using cluster and
--inspect
as cli argument it is correctly handled and each worker will use a different port, this was fixed recently by #13619But when env var
NODE_OPTIONS="--inspect"
is set this logic doesn't apply and the workers will fail as they try to attach to the same portWorking:
Failed:
The text was updated successfully, but these errors were encountered: