<p>As a first step in using ejabberd cluster in GCP, I tried to change the node name using the environment variable &quot;ERLANG_NODE_ARG=ejabberd@main&quot; as mentioned in the <a href="https://github.com/processone/docker-ejabberd/blob/master/ecs/README.md#clustering-example" rel="nofollow noreferrer">readme file</a>.</p>
<p>But I am not able to access the ejabberd server in the service. I tried to check the status using ejabberdctl, the start command returns node already running message while the status command return node down message.
<a href="https://i.stack.imgur.com/MaED6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MaED6.png" alt="enter image description here" /></a></p>
<p>I want to create an ejabberd cluster. Below is my deployment file</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: main
spec:
  replicas: 1
  selector:
    matchLabels:
      app: main
  template:
    metadata:
      labels:
        app: main
    spec:
      containers:
        - name: main
          image: ejabberd/ecs
          env:
            - name: ERLANG_NODE_ARG
              value: ejabberd@main
          #   - name: ERLANG_COOKIE
          #     value: dummycookie123
            # - name: CTL_ON_CREATE
            #   value: &quot;register admin localhost asd&quot;
          ports:
            - containerPort: 5222
            - containerPort: 5269
            - containerPort: 5280
            - containerPort: 5443
</code></pre>
<p>I am trying to access the above deployment by defining the service. I am able to access the service if I remove the environment added to change the nodename, but it fails when I include the variable in the yaml file.</p>
<p>I checked the ejabberd.log file and error.log file inside the container using cloudshell, there is no entry in error.log and all comments in ejabberd.log matches the log of the ejabberd tested in local machine. I couldn't find why this file in GCP. Can you help me identifying the cause for this issue and also suggest the guideliness regarding the ejabberd deployment in GCP cluster.</p>

Navin Vinayagam
<p>The ejabberd node naming format seems to be the issue. I followed the suggestions provided in the <a href="https://github.com/processone/docker-ejabberd/issues/101#issuecomment-1623854745" rel="nofollow noreferrer">GitHub query</a> and used the name in the format <em><strong>name@(host_name/machine_name/contiainer_name)</strong></em> and it worked. I am able to access the ejabberd service with the provided node name.</p>
