I have a remote Erlang node and local developer's PC. I want to start local node [email protected]
, start observer, call c:nl/1
and other debug actions. I wrote this:
#!/bin/sh
export ERL_EPMD_PORT=43690
PORT=`ssh -l user target -p 5022 "/usr/bin/epmd -names" | awk '$2 == "target-node" {print $5}'`
pkill -f ssh.*-fxN.*target
ssh -fxNL 43690:`hostname`:4369 target -p 5022 -l user
ssh -fxNL $PORT:`hostname`:$PORT target -p 5022 -l user
ssh -fxNR 9001:`hostname`:9001 target -p 5022 -l user
erl -name [email protected] -setcookie ABCDEFFJKGSK \
-kernel inet_dist_listen_min 9001 inet_dist_listen_max 9001 \
-eval "net_adm:ping('nodename@target')."
pkill -f ssh.*-fxN.*target
But when I run this script I get message like:
bind: Address already in use Bad local forwarding specification ':debian:' Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false]
Eshell V6.1 (abort with ^G) ([email protected])1>
How can I run observer on local machine and connect them to the remote node?