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

rpcterms analog. #856

Closed
loguntsov opened this issue Mar 1, 2021 · 5 comments
Closed

rpcterms analog. #856

loguntsov opened this issue Mar 1, 2021 · 5 comments

Comments

@loguntsov
Copy link

Hello.

I found rpcterms was deleted.
I need call module:function from remote node with showing of STDOUT (means everything what shows by io:format in remote node).
I know how i can do it with simple erl calling:

erl -sname console -setcookie "$cookie" -noshell -hidden -eval "GroupLeader = rpc:call($nodename, erlang, group_leader, []), rpc:call($nodename, erlang, group_leader, [ GroupLeader, erlang:group_leader() ]), Status = rpc:call($nodename,rc_cli,run,[<<\"$params\">>]), io:format(\"Status: ~p~n\", [ Status ]), init:stop(Status)."

but i wanted find relx-way to do same thing and more easy way.

rpc command doesn't shows anything from remote node.

Could you point me for some way ?
Thank you.

@ferd
Copy link
Collaborator

ferd commented Mar 1, 2021

You can set USE_NODETOOL=true to bring back the old behaviour until erl_call can be found to have a workaround for the output not showing.

@loguntsov
Copy link
Author

Hello, @ferd

If you means to use like this:

USE_NODETOOL=true ./bin/mzbench_api rpc mzb_api_server config_info

it is not working for me. May be it is related of #853 ?
I have Erlang 23.

@ferd
Copy link
Collaborator

ferd commented Mar 1, 2021

I'm referring to this feature: #835 which is tested and should work if you have a recent enough rebar3 version.

@loguntsov
Copy link
Author

Thank you. It's working. What is best way to build project by rebar3 without including rebar3 into repository ?

@ferd
Copy link
Collaborator

ferd commented Mar 1, 2021

I just install it on my dev machine and call it from wherever

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

2 participants