processone / processone/docker-ejabberd

Clustering nodes that are on different servers

Open
#116 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
101
Forks
77
PR merge metrics
No merged PRs in 30d

Description

I'm using this docker image and trying to cluster 2 nodes that are on different servers, therefore 2 different public IPs.
Just for testing, I successfully clustered 2 docker containers that are on the same machine.

However, when I try to define a FQDN in ERLANG_NODE_ARG, I get an error that I don't know how to overcome.

This container starts without errors (I'm skipping unrelated lines):

services:
  ej1container:
    hostname: ej1container          # containername works here too
    environment:
      - ERLANG_NODE_ARG=ej1@ej1container

This setup gives me an error

services:
  ej1container:
    hostname: ej1container          # containername works here too
    environment:
      - ERLANG_NODE_ARG=ej1@subdomain.domain.com

It looks like the container starts normally but when I do

docker exec ej1container ejabberdctl status

I get

Failed RPC connection to the node 'ej1@subdomain.domain.com': nodedown

I already pointed the A record of subdomain.domain.com to the public IP of the VPS where this is running.

There was a similar issue https://github.com/processone/docker-ejabberd/issues/106 but I don't see how the FQDN was integrated and what the solution was.

Any help would be much appreciated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting how the Docker image handles ERLANG_NODE_ARG and how the ejabberdctl status entry point connects to the node. Reproduce the Docker Compose configurations with ej1@ej1container and ej1@subdomain.domain.com, then trace the cross-server Erlang networking setup. Done means the FQDN-based nodes cluster successfully and ejabberdctl status returns normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, erlang
Domain
infrastructure, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.