remote_console with libcluster + docker + AWS Elastic Beanstalk


I just deployed my first app Phoenix with distillery on Docker + AWS Elastic Beanstalk.
I use libcluster_ec2 to discover other nodes (ec2 instances).

After days of tests and config I achieved it! But… I lose a feature… remote_console…

In my vm.args file, I need to do this have my cluster ready to work and it works.

-name <%= release_name %>@${HOSTNAME_IP}

And when I in ssh in my container, when I run

bin/my_app remote_console

I have the following error:
Node is not running!

But my app is correctly running...

When I change the vm.args

-name <%= release_name %>@

I can connect to the remote_console but my node cluster doesn't work.

I also tried to connect like this:

On my laptop
ssh -L 4369:localhost:4369 -L 4370:localhost:4370 ec2-user@x.x.x.x

iex --name debug@ --cookie 'my_cookie_var'
iex --name mylocalmachine@ --cookie 'my_cookie_var' --remsh my_app@

Without success..

Distillery v2.0.14
libcluster 3.1
libcluster_ec2 0.5