我想知道是否有人知道进入Mochiweb的方式就像ejabberd在运行/ sbin / ejabberdctl调试时所做的那样?
答案 0 :(得分:3)
-sname $NODE@$HOST
中的-name $NODE@$FULLHOST
来电参数中存在erl
(或start.sh
)使用以下代码创建文件debug.sh
:
#!/bin/bash
erl -sname debug_$NODE@$HOST -remsh $NODE@$HOST
请确保不要在脚本中混用sname
和name
,因为nodes with short names can not communicate with nodes with full names (and vice versa)。另外,请务必通过-setcookie
的{{1}}参数或erl
文件使用the same cookie on both nodes。
当然你必须用适当的值替换$ NODE,$ HOST和$ FULLHOST。