bitwalker / bitwalker/distillery

Cannot connect to running app

Open
#561 25 comments 0 reactions 0 assignees View on GitHub
bug:has-workaround deployment:scripts os:bsd
Dominant language
Elixir
Stars
3k
Forks
398
PR merge metrics
No merged PRs in 30d

Description

### Steps to reproduce

- Build a release with `mix release`
- Start app with `./bin/myapp start`
- Issue any RPC command like `./bin/myapp remote_console`

### Logs

Error when trying to connect to running release:

```
** (exit) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
(stdlib) gen.erl:261: :gen.do_for_proc/2
(stdlib) gen_event.erl:197: :gen_event.rpc/2
(artificery) lib/console.ex:270: Artificery.Console.init/0
(distillery) lib/entry.ex:42: Mix.Releases.Runtime.Control.main/1
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
(elixir) lib/code.ex:232: Code.eval_string/3
Node cardio_data_ops@127.0.0.1 is not running!
```

My `vm.args`

```
## Name of the node
-name ${NODE_NAME}

## Cookie for distributed erlang
-setcookie ${COOKIE}

-smp auto

```

### Description of issue

To ensure I did not mess up node name and cookie I did the following:

- Open a terminal, export `NODE_NAME, COOKIE and REPLACE_OS_VARS` .
- Issue `./bin/myapp start`
- The app is started and works as expected
- Issue `./bin/myapp remote_console
- The above error shows up
- ` iex --remsh $NODE_NAME --cookie $COOKIE --name "console@127.0.0.1"` works as expected and connect to the running app.

The issue was not present with 1.X and it appeared with 2.0.10. With the same app, I have the issue only on the production server (elixir 1.7.3, erlang 19.3.6.7, OS FreeBSD 11.2). On my linux dev machine when building with prod environment I don't have the issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.