Skip to content
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

Can't use nodetool commands using the "run_erl" command after commit e5d458e #853

Open
beorn247 opened this issue Feb 15, 2021 · 12 comments

Comments

@beorn247
Copy link

Commit e5d458e stops relx from copying start_clean.boot to the top level bin directory and I (using OTP 19.3) can't get any nodetool commands via the "run_erl" command to work since escript can't find start_clean.boot.

Have I missed something or did the commit in question not consider older OTP releases?

@SebCav
Copy link

SebCav commented Apr 13, 2021

Workaround: set an overlay for copying start_clean.boot (/usr/lib/erlang/bin/start_clean.boot on my system) in {{output_dir}}/bin.

@tsloughter
Copy link
Member

Sorry I'm only seeing this now. The fix should be to have the script look for the boot file in the release directory. If that isn't possible for some reason (I haven't looked at the issue but I'd assume this would work fine) we can go back to copying that file to top level bin.

Also makes clear that the shelltests github workflow needs 19.3 added to the OTPs it runs against since those tests would have caught this issue.

@tsloughter
Copy link
Member

@loxybjorn can you give an example of what you are doing? I'm not sure how nodetool and run_erl can be used together? So now I'm confused as I went to dig into this.

@SebCav
Copy link

SebCav commented Apr 16, 2021

Probably he meant that nodetool is not able to communicate with nodes started via run_erl (it is the problem I found in #862)

@beorn247
Copy link
Author

beorn247 commented Apr 16, 2021

@loxybjorn can you give an example of what you are doing? I'm not sure how nodetool and run_erl can be used together? So now I'm confused as I went to dig into this.

I'm using rebar3 to generate a release and the resulting "application" script has at least a bunch of options which calls nodetool with the "ping" argument.

@tsloughter
Copy link
Member

@beorn247 does ping not work because the release can't start when using run_erl or is ping failing even when a node is able to be started?

@beorn247
Copy link
Author

beorn247 commented Jun 7, 2021

Well since erl can't find the "start_clean" boot file anything generated from the "extended_bin" and which tries to start erl with the start_clean boot file fails. I'm pretty sure it's e5d458e which causes this issue.

@tsloughter
Copy link
Member

I think escripts (nodetool) should be using no_dot_erlang.

What version of Erlang are you using?

@beorn247
Copy link
Author

beorn247 commented Jun 7, 2021

What version of Erlang are you using?

OTP 19.3

@tsloughter
Copy link
Member

Aaaah, it all makes sense now. And now I realize you put that in your original post! My bad. So yes, this is a change in OTP20 or 21. We have been moving to only supporting the versions of OTP that Ericsson supports, which at this point is only back to 22.

There may still be a solution, but I'd rather not put start_clean back in the root bin dir. The reason to remove it is that it is per-version and not general, the no_dot_erlang is a general boot script that only includes kernel and stdlib, the start_clean boot script includes specific versions of each app in the application, depending only on what release version was last unpacked and overwrote bin/start_clean.boot last.

@beorn247
Copy link
Author

beorn247 commented Jun 8, 2021

Yes a solution using no_dot_erlang seems better.

@tsloughter
Copy link
Member

I don't know that you can set a boot script for escript to use, that would be the only solution that uses no_dot_erlang aside from upgrading to a newer OTP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants