1

I have a rebar3 project. In this project, the supervisor should spawn a bunch of Erlang nodes across multiple machines. I found that the nodes were never getting brought up because of an error in the log:

sh: no such file or directory h/mberns01/..../prod

Where only the leading slash of the path is missing and the rest of the command is correct.

Where in this project is this command generated and why might it be missing the leading slash? I'm not even sure what other information I can provide here to be helpful -- let me know.

Cheers.

EDIT: So it looks like init:get_argument(progname) returns the wrong program (no leading /). Not sure why...

tekknolagi
  • 10,663
  • 24
  • 75
  • 119

2 Answers2

1

It appears as though the problem can be sidestepped by using slave:start/5, which allows the user to specify what Prog they want to run on the remote host:

spawn(slave, start, [Host, 'node', [], self(), "erl"])

But it does not answer the question of why there is a missing /.

tekknolagi
  • 10,663
  • 24
  • 75
  • 119
0

init:get_argument(progname) is supposed to return {ok,[["name"]]} not a directory, so no leading /

Also, out of curiosity, how are you spawning new nodes? Are you using slave, pool or something else? If slave, what arguments are you passing it?

Roman Rabinovich
  • 868
  • 6
  • 13