Project

General

Profile

Change hostname of tigase server

Prashanth Raghu
Added about 4 years ago

Hi,

I am trying to perform load balancing of tigase nodes on ec2 using haproxy as the front end.

When I am trying to cluster the nodes, the nodes are picking up the internal Private DNS like: ip-172-31-29-*.us-west-2.compute.internal as the hostname for the cluster instead of the public hostname.

I tried changing the hostname of the machine to the public dns of the ec2 machine but tigase still picks up the internal private DNS as the clustering hostname.

I tried to edit the following properties:

cl-comp/component-id[S]

cl-comp/def-hostname[S]

but there is no change in the hostname entries in the cluster_nodes table.

Can you please help such that I can make all components pick up the public dns of the machine as the component id's.

Thanks in advance,

Prashanth


Replies (7)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Currently it's not possible to enforce those entries from the configuration. However - you should be able to enforce the system configuration on ec2.

Added by Prashanth Raghu about 4 years ago

Hi Wojciech,

Thanks for the reply I have now edited my linux machines to pick up the appropriate hostnames. I have configured nginx to load balance connections to these nodes to avoid supporting see-other-host. But I still do not see nodes communicating across the cluster.

Do you think configuring nginx creates the issue ?

I have just enabled clustering using --cluster-mode=true

I also verified that the hostnames can connect to each other on port 5277 using telnet. I also did not observe any errors in the tigase log.

I also observed the following error in the tigase-console.log:

"WARNING: Incorrect ClusterRepoItem, skipping connection attempt: ec2-54-149-171-186.us-west-2.compute.amazonaws.com:bbf923e9699417291177d1f621383b0606ad937637273b2cb31ebd2ace1271aa:5277:0:0.0:0.0"

P.S that ec2-54-149-171-186.us-west-2.compute.amazonaws.com is the hostname of the same machine.

Regards,

Prashanth

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Prashanth Raghu wrote:

I also observed the following error in the tigase-console.log:

"WARNING: Incorrect ClusterRepoItem, skipping connection attempt: ec2-54-149-171-186.us-west-2.compute.amazonaws.com:bbf923e9699417291177d1f621383b0606ad937637273b2cb31ebd2ace1271aa:5277:0:0.0:0.0"

P.S that ec2-54-149-171-186.us-west-2.compute.amazonaws.com is the hostname of the same machine.

This is correct - instance will ignore it's own RepoItem to avoid issues with connecting to itself. Can you verify that you have populated cluster_nodes table in the database with correct items/hostnames that match hostnames of the machines (and those also match names resolved by tigase, i.e. components are identified like e.g. @sess-man@ec2-54-149-171-186.us-west-2.compute.amazonaws.com@, etc.)?

Added by Prashanth Raghu about 4 years ago

Hi Wojciech,

Yes I confirm that the hostnames in the table are populated correctly.

Regards,

Prashanth

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Prashanth Raghu wrote:

Yes I confirm that the hostnames in the table are populated correctly.

Can you share those entries?

Are the time in the the table correct? Are there any other entries in the logs regarding cluster connection? Are there any socket connections open between the nodes?

Added by praveen poojary about 4 years ago

Hi Wojciech,

Sorry for the delayed response.

There are no errors which I could find related to clusters.

I have attached the entries of the table in the picture below.

Regards,

Prashanth

Added by Wojciech Kapcia TigaseTeam about 4 years ago

Is the entry of the other node loaded correctly from the repository? What does the log say when there is a connection attempt made?

    (1-7/7)