Discussions

Ask a Question
ANSWERED

~/.erlang not loaded by rebar3 on startup

As written in the title, it appears that ~/.erlang is not executed when starting an erlang shell with rebar3 . Is is possible to make rebar3 read the ~/.erlang file on startup? If not, is there another way to globally define a file of erlang statements that will be executed automatically when starting an erlang shell through rebar3? Thanks!

Question Title

<del>Deleted text</del>

Question Title

Ask a Question. Markdown is allowed.

Node connection attempts

Hi, I recently upgraded to Erlang 23.0 and updated the version of rebar3 I was using (leading to "rebar 3.14.0-rc1+build.4633.refb5d107c2 on Erlang/OTP 23 Erts 11.0"), and at least one of these changes, together with what I imagine are newer relx conventions, led (if I understood well) to the 'start' option of an (OTP) release not to exist anymore, being replaced by either 'foreground' or 'daemon'. I preferred 'daemon', then noticed afterwards, in the VM logs, connection attempts to the VM happening each second, like: =ERROR REPORT==== 20-May-2020::21:58:22.484965 === ** Connection attempt from node '[email protected]' rejected. Invalid challenge reply. ** The failure occurs because my release updates its cookie when starting up. What I cannot explain is whence such connection attempts come (some kind of watchdog?), and what is their purpose; I think 'heart' relies on longer periods (and is probably not enabled), and anyway I do not think this was happening before these version updates. So any hint appreciated, as it seems that it will attempt to connect once per second till the end of time. Thanks in advance, Best regards, Olivier.

All the documentation is broken

ANSWERED

The documentation under commands has disappeared

I think something has gone wrong with an edit. The content of https://www.rebar3.org/docs/commands is gone.

Release specific sys.config and vm.args

Hello, I have an umbrella project with multiple releases specified in `relx` config. Is there any ways to specify release specific `sys.config` and `vm.args` ? Something like for release A use `sys.config` located at `apps/projA/config/sys.config` and for Release B use `sys.config` located at `apps/projB/config/sys.config`. /prakash

Apply a patch via Shell Hooks

Hello All, I'm trying to apply a patch to rebar.config of `riak-erlang-client` so that it will compile on OTP 21. I have created a `.patch` file located at Project root dir and following Shell hooks I have defined in project's `rebar.config` ``` {pre_hooks, [ {"(linux|darwin)", compile, "git apply --directory='_build/default/lib/riakc/' ./riakc_erl21.diff"} ] ``` It is not working. Does it doable with Shell Hooks? /prakash

How to include Additional directories of Dependencies into Release

Hello Team, I have two projects, Let say Proj-A and Proj-B. * Proj-B contains additional directories 'configs', 'templates'. These config files are being used in Proj-A. Overlays in Proj-B's rebar.config are defined to include these additional directories into release tar. Here are the snippets of Proj-B's rebar.config {profiles,[ {prod, [ {erl_opts, [no_debug_info]}, {relx, [{dev_mode, false}]}, {include_src, false}, {overlay, [ {copy, "configs", "configs"}, {copy, "templates", "templates"} ]} ] } ]}. while generating tar of Proj-B using 'rebar3 as prod tar' additional directories are being copied and included in release tar. But while generating release tar of Proj-A. Proj-B's additional directories are not getting copied into release. Are there any ways to achieve this? Am I missing anything in configs? Thanks, Prakash

Crash when using distributed Erlang with a prod release

Hello, I am trying to let an Erlang node communicate with an Elixir node. Communication works well with a release in dev mode as well as when doing manual testing. But when I make a prod release (rebar3 as prod release) which I start with `_build/prod/rel/myapp/bin/myapp console`, it sends one successful message to the remote Elixir process, hangs a few seconds and then crashes the whole VM. Part of the error message I get in the logs is : `label=&#123;error_logger,error_msg&#125; format="Fatal: ~p was not allowed to send &#123;nodeup, ~p&#125; to kernel when ~s~n" args="[<0.584.0>,'[email protected]',\"initiating connection\"]"`. I have changed the name for confidentiality. And then some more : `&#123;error_info,&#123;exit,&#123;bad_return_value,&#123;'EXIT',&#123;undef,[&#123;erts_internal,abort_pending_connection,[...],...&#125;,&#123;net_kernel,pending_nodedown,...&#125;,&#123;...`. My `config/vm.args` contains the name and cookie. My `rebar.config`is: &#123;relx, [ &#123;release, &#123;myapp, "1.4"&#125;, [myapp, sasl]&#125;, &#123;sys_config, "./config/sys.config"&#125;, &#123;vm_args, "./config/vm.args"&#125;, &#123;dev_mode, true&#125;, &#123;include_erts, false&#125;, &#123;extended_start_script, true&#125; ] &#125;. &#123;profiles, [ &#123;prod, [ &#123;relx, [ &#123;dev_mode, false&#125;, &#123;include_erts, true&#125;, &#123;include_src, false&#125; % &#123;include_erts, false&#125;, % &#123;system_libs, false&#125;, ]&#125; ]&#125; ]&#125;. At `https://github.com/erlang/otp/blob/master/lib/kernel/src/dist_util.erl`, in function `mark_nodeup` we can see the error message produced but that didn't help me solve the problem. Do you have an idea of how I have to configure the prod release to make it work ? Version : rebar 3.13.0+build.4520.reff957b5a8 on Erlang/OTP 22 Erts 10.6. TIA PS : Sorry for the spurious HTML character references disseminated inside the code.