How to tell epmd to release a name rigsitered but not valid any more?
Seven Du
dujinfang@REDACTED
Fri May 7 04:31:32 CEST 2010
Was there anyone but me has this problem? I have met quite a few times.
$ which erl
/usr/local/bin/erl
$ erl -v
Erlang R13B02 (erts-5.7.3) [source] [smp:4:4] [rq:4] [async-threads:0]
[hipe] [kernel-poll:false]
Eshell V5.7.3 (abort with ^G)
$ which epmd
/usr/local/bin/epmd
$ epmd -names
epmd: up and running on port 4369 with data:
name freeswitch at port 8031
name mos at port 61573
name queue at port 58107
name queue1 at port 16557
name voiceEvents at port 57340
For some reason I stoped queue, and it can never start claiming name
already there, so I started the same application with another name
queue1. As you can see queue1 (16557) is there but queue(58107) isn't.
In my understanding, it should release the port if the socket broken.
Or at least there's a way to release the port without killing the
whole epmd to avoid affect other applications running on the same
server.
I haven't read the source code, however, I would like to make a patch
if it is confirmed a bug and no one else would like to fix.
Thanks.
app@REDACTED:~/erlang_apps/queue$ netstat -an|grep 16557
tcp 0 0 0.0.0.0:16557 0.0.0.0:* LISTEN
$ netstat -an|grep 58107
$
$ netstat -an|grep 8031
tcp 0 0 10.20.208.8:8031 0.0.0.0:* LISTEN
tcp 0 0 10.20.208.8:8031 10.20.208.8:8984 ESTABLISHED
tcp 0 0 10.20.208.8:32465 10.20.208.8:8031 ESTABLISHED
tcp 0 0 10.20.208.8:8984 10.20.208.8:8031 ESTABLISHED
tcp 0 0 10.20.208.8:8031 10.20.208.8:32465 ESTABLISHED
tcp 0 0 10.20.208.8:8031 10.20.208.8:30683 ESTABLISHED
tcp 0 0 10.20.208.8:30683 10.20.208.8:8031 ESTABLISHED
$ netstat -an|grep 4369
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:4369 127.0.0.1:23526 ESTABLISHED
tcp 0 0 127.0.0.1:4369 127.0.0.1:57900 ESTABLISHED
tcp 0 0 127.0.0.1:4369 127.0.0.1:21512 TIME_WAIT
tcp 0 0 127.0.0.1:30721 127.0.0.1:4369 ESTABLISHED
tcp 0 0 127.0.0.1:23526 127.0.0.1:4369 ESTABLISHED
tcp 0 0 127.0.0.1:4369 127.0.0.1:5976 ESTABLISHED
tcp 0 0 127.0.0.1:4369 127.0.0.1:30721 ESTABLISHED
tcp 0 0 127.0.0.1:4369 127.0.0.1:42265 ESTABLISHED
tcp 0 0 127.0.0.1:42265 127.0.0.1:4369 ESTABLISHED
tcp 0 0 127.0.0.1:57900 127.0.0.1:4369 ESTABLISHED
tcp 0 0 127.0.0.1:4369 127.0.0.1:21535 TIME_WAIT
tcp 0 0 127.0.0.1:23947 127.0.0.1:4369 ESTABLISHED
2010/3/4 Seven Du <dujinfang@REDACTED>:
> Hi,
>
> It is noticed that sometime when an erlang app crashes the empd daemon
> still hold the node name, then the crashed app cannot restart with the
> same name. Though kill epmd solves this problem, it is not a good
> practice when many erlang apps runs on the same server.
>
> epmd seems only has epmd -names to list all registered nodes, is there
> a way to unregister a name from epmd?
>
> Thanks.
>
--
Blog: http://www.dujinfang.com
Proj: http://www.freeswitch.org.cn
More information about the erlang-questions
mailing list