If a module has crashed, and you try to start it again from the Erlang shell with:
mod_foo:start("example.com", []).
and you get the result:
{error, already_present}
the module is trying to register its child specification with the process supervisor, but it has already been registered, and it didn't succeed in unregistering it when it crashed. This could actually make things simpler; you could ask the supervisor to restart the module for you:
supervisor:restart_child(ejabberd_sup, gen_mod:get_module_proc("example.com", ejabberd_mod_foo)).
On the other hand, you can delete the child specification:
supervisor:delete_child(ejabberd_sup, gen_mod:get_module_proc("example.com", ejabberd_mod_foo)).
and then restart the module however you want.



Recent comments
2 hours 35 min ago
2 hours 36 min ago
7 hours 24 min ago
3 days 50 min ago
5 days 6 hours ago
6 days 55 min ago
6 days 1 hour ago
6 days 13 hours ago
1 week 47 min ago
1 week 1 day ago