ejabberd:有没有一种方法可以配置不同的“ cookie”比“ ejabberd”? [英] ejabberd: is there a way to configure a different "cookie" than "ejabberd"?

查看:69
本文介绍了ejabberd:有没有一种方法可以配置不同的“ cookie”比“ ejabberd”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个ejabberd模块。我要求该模块对同一LAN(名称)上的另一个节点执行RPC调用。据我了解,ejabberd配置它拥有 cookie,这当然与我用于其他节点的cookie有所不同。

I am building an ejabberd module. I require this module to perform RPC calls to another node on the same LAN (sname). From what I understand, ejabberd configures it owns "cookie" which, of course, will differ from the cookie I use for my other nodes.

有没有一种强制的方法ejabberd使用另一个cookie?

Is there a way to force ejabberd to use another cookie?

编辑:ejabberd在 ejabberd用户名下启动其守护进程。

ejabberd starts its daemon under the "ejabberd" username.

EDIT :即使使用适当的Cookie创建/home/ejabberd/.erlang.cookie(用户名:ejabberd,组:ejabberd),它仍然无法正常工作。

even when creating /home/ejabberd/.erlang.cookie (username: ejabberd, group: ejabberd) with an appropriate cookie it still does not work.

编辑:一个解决该问题的方法(不太好)是将(正确的权限)将预期的.erlang.cookie文件复制到/ var / lib / ejabberd

one way to go around the problem (which isn't so nice) is to copy (with the proper permissions) the intended .erlang.cookie file to /var/lib/ejabberd

推荐答案

ejabberdctl脚本设置主目录,以便cookie文件位于 /var/lib/ejabberd/.erlang.cookie 。 Erlang本身会检查文件的权限,因此它们必须正确。

The ejabberdctl script sets the home directory so that the cookie file lives at /var/lib/ejabberd/.erlang.cookie. Erlang itself checks the permissions of the file, so they must be correct.

您有一些选择来强制使用特定的cookie:

You have a few options to force the use of a particular cookie:


  • 更改文件的内容-ejabberd不会对其进行更改。

  • 更改ejabberdctl脚本以使其通过 -setcookie'SomeCookieValue'到erl。

  • 更改ejabberdctl以设置其他主目录。

  • Change the contents of the file - ejabberd won't alter it.
  • Change the ejabberdctl script so that it passes -setcookie 'SomeCookieValue' to erl.
  • Change ejabberdctl to set a different home directory.

如果cookie文件不存在,则将创建它,但如果存在cookie cookie,则不会更改它。需要使用公共cookie来构建ejabberd集群或通过erlang发行版与ejabberd集成。

The cookie file will be created if it doesn't exist, but won't be changed behind your back if it does exist. Using a common cookie is required to build ejabberd clusters or to integrate with ejabberd via erlang distribution.

这篇关于ejabberd:有没有一种方法可以配置不同的“ cookie”比“ ejabberd”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆