Score:0

Not able to access the ejabberd server even in ejabberdctl if ejabberdnode name is changed in GCP deployment using environment variable

bi flag

As a first step in using ejabberd cluster in GCP, I tried to change the node name using the environment variable "ERLANG_NODE_ARG=ejabberd@main" as mentioned in the readme file.

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. enter image description here

I want to create an ejabberd cluster. Below is my deployment file

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: "register admin localhost asd"
          ports:
            - containerPort: 5222
            - containerPort: 5269
            - containerPort: 5280
            - containerPort: 5443

I am trying to access the above deployment by defining the service. I am able to access the service if I remove the environment variable added to change the nodename, but it fails when I include the variable in the YAML file.

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 the local machine. I couldn't find why this fails in GCP. Can you help me identify the cause for this issue and suggest the guidelines regarding the ejabberd deployment in the GCP cluster?

Score:0
bi flag

The ejabberd node naming format seems to be the issue. I followed the suggestions provided in the GitHub query and used the name in the format name@(host_name/machine_name/contiainer_name) and it worked. I am able to access the ejabberd service with the provided node name.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.