Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
Ŧ Groups Home
npm package: "cluster-master" fails on Windows (REPL). But why does it even include a REPL (which is not supported on all platforms)?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Fredrik O  
View profile  
 More options Oct 27 2012, 8:08 am
From: Fredrik O <evoo...@gmail.com>
Date: Sat, 27 Oct 2012 05:08:39 -0700 (PDT)
Local: Sat, Oct 27 2012 8:08 am
Subject: npm package: "cluster-master" fails on Windows (REPL). But why does it even include a REPL (which is not supported on all platforms)?

I am writing this post here because I donīt know anywhere else I should
write it. It is about the npm package: "cluster-master"
(https://npmjs.org/package/cluster-master).

I have precise notice that the package is not supported on windows. It
surprised me much. When I checked the source code and did some quick
testing I found out that it is the "setupRepl" function which is failing,
more specific when it tries to listen on a "string", e.g. a "unix domain
socket" I got error "listen EACCES". It fails because this feature is not
available on windows. This is not a new bug/issue:
https://github.com/joyent/node/issues/3827

So I wondering, why does the cluster-master package even create a Repl
sever on the first place? It should in my opinion be best handled by the
user, if it want it and thereafter how it want to implement it. It should
not require many lines of code, no matter how:

var clusterMaster = require('cluster-master'),
     _ = require('underscore');

var server = dnode({
     resize: _.bind(clusterMaster.resize, clusterMaster),
     restart: _.bind(clusterMaster.restart, clusterMaster),
     quit: _.bind(clusterMaster.quit, clusterMaster),
     quitHard: _.bind(clusterMaster.quitHard, clusterMaster)

});

server.listen(8723);

PS. I assume it is completely safe to remove the setupRepl function, it is
correct, isn't it?

Thanks in advance!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bert Belder  
View profile  
 More options Oct 28 2012, 2:11 pm
From: Bert Belder <bertbel...@gmail.com>
Date: Sun, 28 Oct 2012 11:11:48 -0700 (PDT)
Local: Sun, Oct 28 2012 2:11 pm
Subject: Re: npm package: "cluster-master" fails on Windows (REPL). But why does it even include a REPL (which is not supported on all platforms)?

I'm not the author of cluster-master, so I'll leave it to him/her to
explain his design decisions.

However I think that if you change the domain socket "path" to a valid
named pipe name, it'll just work. Try something like \\.\pipe\mypipename".
(Note that you have to escape the backslashes in JS, so that'd become
'\\\\.\\pipe\\mypipename').

- Bert


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fredrik O  
View profile  
 More options Oct 29 2012, 2:52 pm
From: Fredrik O <evoo...@gmail.com>
Date: Mon, 29 Oct 2012 11:52:22 -0700 (PDT)
Local: Mon, Oct 29 2012 2:52 pm
Subject: Re: npm package: "cluster-master" fails on Windows (REPL). But why does it even include a REPL (which is not supported on all platforms)?

Thanks for answer Bert!

I know, Isaac is :-) Good tip,  however I donīt want a REPL there anyway so
I have completely removed it, or to be exactly just wrote a return
statement as first statement in the setupRepl. Minimal effort required :-)

Den söndagen den 28:e oktober 2012 kl. 19:11:48 UTC+1 skrev Bert Belder:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »