So, for some reason, on our production box, we started can no longer connect to the app on the back end. (The app is running fine, serving pages, etc.). We can log in to the server, and see that it’s running, e.g. ps -ef | grep iex
etc.
Normally, we just run a script that looks like this:
#!/bin/bash
#
# A simple wrapper to facilitate connecting to an elixir
# node that was started with `elixir-start`
#
# Usage:
# node-attach
#
# exit if any any command fails
set -e
# establish the name and cookie (if available)
name="console@$(hostname -I)"
cookie="${COOKIE:-nanobox}"
remote="${HOSTNAME//./-}@$(hostname -I)"
iex \
--name $name \
--cookie $cookie \
--remsh $remote
Normally, it works like a charm. For some reason, it stopped working.
You can also connect by hand, by starting an iex
session with the appropriate name & cookie, then doing a Node.connect (which works!).
But the problem is that when I do a Control-G, instead of switching sessions, it sends the character ^G
to iex.
Likewise, the up arrow sends a ^[[A
, tab sends an actual tab, etc.
The other odd thing is if I type erl
I just get
Eshell V9.1.5 (abort with ^G)
1>
Whereas on the box that’s working (and my local box) I get
Erlang/OTP 20 [erts-9.1.5] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [kernel-poll:false]
Eshell V9.1.5 (abort with ^G)
1>
I am deploying with nanobox, and am hoping they have some ideas, but just wanted to post here if anyone else had come across something like this before.
Thanks in advance!
ps also, bash
works fine, e.g tab for auto-complete, up/down arrow keys have history, etc. Only when I jump into IEx do the keys start behaving oddly.