`ejabberdctl start` results in “kernel pid terminated” error — what do I do?

微笑、不失礼 提交于 2019-12-02 11:28:38

You'll have to analyze the crash dump to try to guess why it failed.

To carry out this task, Erlang has a special webtool (called, uh, webtool) from which a special application — Crash Dump Viewer — might be used to load a dump and inspect the stack traces of the Erlang processes at the time of the crash.

You have to

  1. Install the necessary packages:

    # apt-get install erlang-webtool erlang-observer
    
  2. Start an Erlang interpreter:

    $ erl
    

    (Further actions are taken there.)

  3. Run the webtool. In a simplest case, it will listen on the local host:

    webtool:start().
    

    (Notice the period.) It will print back an URL to navigate in your browser to reach the running tool.

    If this happens on a server, and you'd rather like to have the webtool listen on some non-local-host interface, the call encantation would be trickier:

    webtool:start(standard_path, [{port, 8888}, {bind_address, {0, 0, 0, 0}}, {server_name, "server.example.com"}]).
    

    The {0, 0, 0, 0} IP spec will make it listen everywhere, and you might as well specify some more sensible octets, like {192, 168, 0, 1}. The server_name clause might use arbitrary name — this is what will be printed in the generated URL, the server's hostname.

  4. Now connect to the tool with your browser, navigate to the "Start tools" menu entry, start crash dump viewer and make a link to it appear in the tool's top menu. Proceed there and find a link to load the crash dump.

  5. After loading a crash dump try to mess around with the tool's interface to look at the stack traces of the active Erlang processes. At least one of them should contain something fishy, which should include an error message — that's what you're looking after to refine your question (or ask another at the ejabberd mailing list).

  6. To quit the tool, run

    webtool:stop().
    

    in the running Erlang interpreter. And then quit it either by running

    q().
    

    and waiting a bit or pressing Ctrl-g and then entering the letter q followed by pressing the Return key.

The relevant links are: the crash dump viewer manual and the webtool manual.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!