Cluster with public IP address

hello:
Is it possible to config the node with public ip address, I have three node, for some reason, they cant reach each other in the internal network but public ip, Each node has only the local network interface with private ip.If its possible,how to config it.
thx a lot!

Hello @xiaolllll, yes, set wsrep_cluster_address and wsrep_node_address to the public IP. If you are having issues with internal IPs, check all proper port (3306, 4444, 4567, 4568) are open between all nodes.

1 Like

I have configed all nodes and gcomm ip to public address, but when join the second node, I got some error in log, showing below

2024-05-15T23:35:03.857096Z 1 [Note] [MY-000000] [Galera] State gap can’t be serviced using IST. Switching to SST
2024-05-15T23:35:03.857113Z 1 [Warning] [MY-000000] [Galera] Failed to prepare for incremental state transfer: Failed to open IST listener at ssl://175.24.131.72:4568’, asio error ‘Failed to listen: bind: Cannot assign requested address: 99 (Cannot assign requested address)
at /mnt/jenkins/workspace/pxc80-autobuild-RELEASE/test/percona-xtradb-cluster-8.0.36-28/percona-xtradb-cluster-galera/galerautils/src/gu_asio_stream_react.cpp:listen():866’: 99 (Cannot assign requested address)
at /mnt/jenkins/workspace/pxc80-autobuild-RELEASE/test/percona-xtradb-cluster-8.0.36-28/percona-xtradb-cluster-galera/galera/src/ist.cpp:prepare():349. IST will be unavailable.
2024-05-15T23:35:03.861685Z 0 [Note] [MY-000000] [Galera] Member 1.0 (VM-4-5-debian) requested state transfer from ‘any’. Selected 0.0 (VM-4-13-debian)(SYNCED) as donor.
2024-05-15T23:35:03.861727Z 0 [Note] [MY-000000] [Galera] Shifting PRIMARY → JOINER (TO: 12)
2024-05-15T23:35:03.861785Z 1 [Note] [MY-000000] [Galera] Requesting state transfer: success, donor: 0
2024-05-15T23:35:03.861822Z 1 [Note] [MY-000000] [Galera] Resetting GCache seqno map due to different histories.
2024-05-15T23:35:03.861836Z 1 [Note] [MY-000000] [Galera] GCache history reset: 3ac2c744-0d4b-11ef-b407-87b2c2b0c215:0 → 3ac2c744-0d4b-11ef-b407-87b2c2b0c215:12
2024-05-15T23:35:03.870462Z 0 [Warning] [MY-000000] [Galera] 0.0 (VM-4-13-debian): State transfer to 1.0 (VM-4-5-debian) failed: -42 (No message of desired type)
2024-05-15T23:35:03.870504Z 0 [ERROR] [MY-000000] [Galera] /mnt/jenkins/workspace/pxc80-autobuild-RELEASE/test/percona-xtradb-cluster-8.0.36-28/percona-xtradb-cluster-galera/gcs/src/gcs_group.cpp:gcs_group_handle_join_msg():1285: Will never receive state. Need to abort.
2024-05-15T23:35:03.870516Z 0 [Note] [MY-000000] [Galera] gcomm: terminating thread

My host has only local private address, the public ip is on the network devices.

Any other info needed pls tell me.

Then it is not possible to bind the node to use the public IP. You must use the actual IP of the network interface on the server.

1 Like