[ejabberd] eJabberd Clustering

mamat hensem hensem at gmail.com
Fri Dec 5 10:11:16 MSK 2014


Finally!

This is for future reference for everybody.

1. Both server is running fine

2. copy over /root/.erlang.cookie
this can be check at ejabberdctl live/debug using erlang:get_cookie(). make
sure cookie in both server is the same

3. Allow all port except 4369 in firewall. Apparently epmd will use any port

4. at second server, ejabberdctl live/debug

FirstNode = 'ejabberd at yourfirstnode',
mnesia:stop(),
mnesia:delete_schema([node()]),
mnesia:start(),
mnesia:change_config(extra_db_nodes, [FirstNode]),
mnesia:change_table_copy_type(schema, node(), disc_copies).

5. get a beer!

my mistake here is I have no idea nodes are talking with each other using
this "epmd" and we need to make sure this epmd thingy can be connected from
outside, and this epmd thingy just use any port it wants to. kind of sucks
isn't it? if later i find out how to make this thing use a fixed port, i'll
update here.

ejabberd binary installer cluster clustering running db nodes stopped db
nodes clustering setup cookie erlang.cookie [ejabberd at first, ejabberd at second]





On Fri, Dec 5, 2014 at 11:28 AM, mamat hensem <hensem at gmail.com> wrote:

> From here:
> http://lists.jabber.ru/pipermail/ejabberd/2007-October/003186.html
>
> If it keep opening random port, do I have to disable firewall? I don't
> think it's a good idea to disable firewall.
>
> On Fri, Dec 5, 2014 at 11:20 AM, mamat hensem <hensem at gmail.com> wrote:
>
>> For successful ping, it will return pong
>>
>> So I disabled my firewall and it return pong
>>
>> Apparently , it's connection issue. Which port should I open? Currently I
>> open these port only: 5222, 5280, 5269 and 4369.
>>
>> Thanks.
>>
>> On Fri, Dec 5, 2014 at 10:01 AM, hensem <hensem at gmail.com> wrote:
>>
>>> I sent another message before with screen capture but the message is too
>>> large.
>>>
>>> Here is how ping:
>>>
>>> from node damai to node kerinchi:
>>>
>>> (ejabberd at damai)3> net_adm:ping(kerinchi).
>>> pang
>>> (ejabberd at damai)4>
>>>
>>>
>>>
>>> from node kerinchi to node damai:
>>>
>>> (ejabberd at kerinchi)2> net_adm:ping(damai).
>>> pang
>>> (ejabberd at kerinchi)3>
>>>
>>>
>>> Thanks for your help.
>>>
>>>
>>> On Thu, Dec 4, 2014 at 7:20 PM, Gadi Srebnik [via Jabber] <[hidden
>>> email] <http:///user/SendEmail.jtp?type=node&node=34127&i=0>> wrote:
>>>
>>>> http://www.erlang.org/doc/man/net_adm.html
>>>>
>>>> What are you node names and how do you try to ping it?
>>>>
>>>> On Thu, Dec 4, 2014 at 1:03 PM, mamat hensem <[hidden email]
>>>> <http:///user/SendEmail.jtp?type=node&node=34119&i=0>> wrote:
>>>>
>>>>> 1. Check epmd is running with ps on both servers
>>>>> CHECKED
>>>>>
>>>>> 2. Check port 4369 TCP is listened by it
>>>>> CHECKED. firewall is open. telnet said connected
>>>>>
>>>>> 3. Check telnet/nc from one node to another for port 4369
>>>>> CHECKED
>>>>>
>>>>> 4. Run epmd -names to check that ejabberd is registered as node at
>>>>> that server
>>>>> server 1:
>>>>> epmd: up and running on port 4369 with data:
>>>>> name ejabberd at port 60203
>>>>>
>>>>> server 2:
>>>>> epmd: up and running on port 4369 with data:
>>>>> name ejabberd at port 41466
>>>>>
>>>>>
>>>>> 5. Try to run plain erl nodes on both servers with defined cookies and
>>>>> check that net_adm:ping is working between them
>>>>> I got *pang* on both server. No idea pang is right one or not.
>>>>>
>>>>> So what now?
>>>>>
>>>>> On Thu, Dec 4, 2014 at 6:49 PM, Gadi Srebnik <[hidden email]
>>>>> <http:///user/SendEmail.jtp?type=node&node=34119&i=1>> wrote:
>>>>>
>>>>>> epmd
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> ejabberd mailing list
>>>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=34119&i=2>
>>>>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Gadi Srebnik
>>>> VP Communications
>>>>  m: <a href="tel:%2B972%2054%205929261" value="+972545929261"
>>>> target="_blank">+972 54 5929261
>>>>
>>>>
>>>> _______________________________________________
>>>> ejabberd mailing list
>>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=34119&i=3>
>>>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>>>
>>>>
>>>> ------------------------------
>>>>  If you reply to this email, your message will be added to the
>>>> discussion below:
>>>>
>>>> http://jabber.996255.n3.nabble.com/eJabberd-Clustering-tp24496p34119.html
>>>>  To unsubscribe from eJabberd Clustering, click here.
>>>> NAML
>>>> <http://jabber.996255.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>
>>>
>>>
>>> ------------------------------
>>> View this message in context: Re: eJabberd Clustering
>>> <http://jabber.996255.n3.nabble.com/eJabberd-Clustering-tp24496p34127.html>
>>> Sent from the ejabberd mailing list archive
>>> <http://jabber.996255.n3.nabble.com/ejabberd-f23209.html> at Nabble.com.
>>>
>>> _______________________________________________
>>> ejabberd mailing list
>>> ejabberd at jabber.ru
>>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20141205/060c6f48/attachment.html>


More information about the ejabberd mailing list