Reputation: 17564
I have a machine in production running an elixir application (no access to iex, only to erl) and I am tasked with running an analysis on why we are consuming so much CPU. The idea here would be to launch observer, check the processes tab and see the processes with the most reductions.
To connect I am following a tutorial from a blog:
Their instructions are as follows:
ssh user@public_ip "epmd -names"
to get the name of the app and the port usedssh -L 4369:user@public_ip:4369 -L 42877:user@public_ip:42877 user@public_ip
(4369 is the epmd port by default, 42877 is the port of the app)erl -name "user@app_name" -setcookie "mah_cookie" -hidden -run observer
And now in theory I should be able to use observer on the machine. Instead however I am greeted with the following error:
Protocol ‘inet_tcp’: register/listen error: epmd_close
So, after scouring the dark side of internet, I decided to use sudo journalctl -f
to check all the logs of the machine and I found this:
channel 3: open failed: administratively prohibited: open failed
my_app_name sshd[8917]: error: connect_to [email protected]: unknown host (Name or service not known)
/scripts/watchdog.sh")
my_app_name CRON[9985]: pam_unix(cron:session): session closed for user flame
Where:
-name
: my_app_nameso it tells me, unknown host ?? I am confused since 99.999.99.999 is the public IP of the machine itself!
Upvotes: 4
Views: 1989
Reputation: 17564
After 3 days of non-stop searching, I finally found something that works. To summarize I am putting it here everything I did.
All steps in local machine:
> ssh remote-user@remote-ip "epmd -names"
epmd: up and running on port 4369 with data:
name super_duper_app at port 43175
ssh remote-user@remote-ip -L4369:localhost:4369 -L43175:localhost:43175
iex --name [email protected] --cookie super_duper_cookie
Node.connect :"[email protected]"
> true
:observer.start
With observer started, select the machine from the Nodes menu.
If you have tried this and it didn't work there are a few things you can check for:
Upvotes: 4