0

我用谷歌搜索了三个小时,但无济于事。

我有一个没有使用 apt 安装的 ejabberd 安装。它是从源代码安装的,其中没有名为 ejabberd 的程序。启动和停止,一切都通过 ejabberdctl。

它完美地运行了一个月,突然有一天它因臭名昭著而停止了

kernel pid terminated error

任何时候我做

sudo ejabberdctl start --node ejabberd@MasterService

生成了一个 erl_crash 文件,当我尝试时

ejabberdctl

我明白了

Failed to connect to RPC at node ejabberd@MasterService

现在我尝试了什么

  1. 尝试杀死 ejabberd、beam、epmd 的所有正在运行的进程并重新开始 - 不起作用
  2. 检查 /etc/hosts 和主机名,一切都很好。主机名在带有 IP 的 hosts 文件中提供
  3. 检查 ejabberdctl.conf 文件以确保主机名确实正确且节点名正确
  4. 正在创建已检查的 .erlange.cookie 文件,其中包含内容

在所有网络中,搜索都以一种或另一种方式引导我找到上述任何一种。

我无处可去,也不知道还能去哪里看。任何帮助将非常感激。

4

1 回答 1

1

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.

于 2013-09-05T16:15:16.937 回答