# Node2 did not connect in node1

**URL:** <https://forums.percona.com/t/node2-did-not-connect-in-node1/22752>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [June 12, 2023, 11:52am UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752 "2023-06-12T11:52:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santhosh\_Pandi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/santhosh_pandi/32/11021_2.png) [@Santhosh\_Pandi](https://forums.percona.com/u/Santhosh_Pandi)\
**Post date:** [June 12, 2023, 11:52am UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/1 "2023-06-12T11:52:38Z")

</div>

asio error ‘Failed to listen: bind: Cannot assign requested address: 99 (Cannot assign requested address)  
at galerautils/src/gu\_asio\_stream\_react.cpp:listen():788’: 99 (Cannot assign requested address)  
at galera/src/ist.cpp:prepare():349. IST will be unavailable

any one help me

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [June 12, 2023, 7:01pm UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/2 "2023-06-12T19:01:13Z")

</div>

> [@Santhosh\_Pandi](#):
>
> Cannot assign requested address

Please provide your my.cnf. It looks like you have misconfigured your wsrep\_\* parameters and MySQL cannot bind to the interface/IP you have specified

---

<div class="post-metadata">

**Author:** ![Santhosh\_Pandi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/santhosh_pandi/32/11021_2.png) [@Santhosh\_Pandi](https://forums.percona.com/u/Santhosh_Pandi)\
**Post date:** [June 13, 2023, 4:44am UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/3 "2023-06-13T04:44:36Z")

</div>

it is my.cnf config

```auto
[mysqld]

datadir=/var/lib/mysql
user=mysql
log_error=/var/log/mysql/error.log
socket=/var/lib/mysql/mysql.sock
pid_file=/var/run/mysqld/mysqld.pid
# Path to Galera library
wsrep_provider=/usr/lib/libgalera_smm.so

# Cluster connection URL contains the IPs of node#1, node#2 and node#3
wsrep_cluster_address=gcomm://20.212.157.189,20.212.201.14,20.164.218.83

# In order for Galera to work correctly binlog format should be ROW
binlog_format=ROW
pxc_strict_mode=ENFORCING
# Using the MyISAM storage engine is not recommended
default_storage_engine=InnoDB

# This InnoDB autoincrement locking mode is a requirement for Galera
innodb_autoinc_lock_mode=2

# Node #1 address
wsrep_node_address=20.212.157.189
pxc-encrypt-cluster-traffic=OFF
# SST method
wsrep_sst_method=xtrabackup-v2

# Cluster name
wsrep_cluster_name=my_ubuntu_cluster

```

some error it throws node2 was ([Warning] [MY-000000] [Galera] Failed to prepare for incremental state transfer: Failed to open IST listener at tcp://20.212.201.14:4568’, asio error ‘Failed to listen: bind: Cannot assign requested address: 99 (Cannot assign requested address)  
at galerautils/src/gu\_asio\_stream\_react.cpp:listen():788’: 99 (Cannot assign requested address)  
at galera/src/ist.cpp:prepare():349. IST will be unavailable.  
) and again one error was failed: -42 (No message of desired type)  
2023-06-13T04:39:03.964583Z 0 [ERROR] [MY-000000] [Galera] gcs/src/gcs\_group.cpp:gcs\_group\_handle\_join\_msg():1216: Will never receive state. Need to abort.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [June 13, 2023, 1:23pm UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/4 "2023-06-13T13:23:14Z")

</div>

> [@Santhosh\_Pandi](#):
>
> wsrep\_node\_address=20.212.157.189

Ensure this is the correct IP for node1 (Use `ip a` to check local interfaces). Check the same setting on node2’s my.cnf and ensure the IP matches that of node2. Ensure there are no firewalls between these nodes. Ports 3306, 4444, 4567, 4568 must be allowed.

---

<div class="post-metadata">

**Author:** ![Santhosh\_Pandi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/santhosh_pandi/32/11021_2.png) [@Santhosh\_Pandi](https://forums.percona.com/u/Santhosh_Pandi)\
**Post date:** [June 13, 2023, 2:23pm UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/5 "2023-06-13T14:23:09Z")

</div>

Hi Mathew,

```
     Hope you doing well,

     we are using azure cloud server and we are using both private and public IP which IP should use for percona configuration.

        Above mentioned IP is public ip and above all ports are allowed by firewall.All three nodes are same in my.cnf .
        Is private ip want to use for configuration.?

```

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [June 13, 2023, 3:54pm UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/6 "2023-06-13T15:54:42Z")

</div>

> [@Santhosh\_Pandi](#):
>
> `we are using both private and public IP`

You should not be using public IPs without firewall. I can access your systems:

```auto
# ssh 20.212.157.189
The authenticity of host '20.212.157.189 (20.212.157.189)' can't be established.
...
Warning: Permanently added '20.212.157.189' (ED25519) to the list of known hosts.
root@20.212.157.189's password:

```

Remove your public IPs or create firewalls to restrict access to specific IPs.

For MySQL node address, you should be using private IPs.

---

<div class="post-metadata">

**Author:** ![Santhosh\_Pandi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/santhosh_pandi/32/11021_2.png) [@Santhosh\_Pandi](https://forums.percona.com/u/Santhosh_Pandi)\
**Post date:** [June 14, 2023, 5:23am UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/7 "2023-06-14T05:23:32Z")

</div>

Greetings,  
i have changed the private IP is wrep\_node\_address but i got sst errors

[ERROR] [MY-000000] [WSREP-SST] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* FATAL ERROR \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2023-06-14T04:58:06.779562Z 0 [ERROR] [MY-000000] [WSREP-SST] Possible timeout in receving first data from donor in gtid/keyring stage  
2023-06-14T04:58:06.779585Z 0 [ERROR] [MY-000000] [WSREP-SST] Line 1381  
2023-06-14T04:58:06.779602Z 0 [ERROR] [MY-000000] [WSREP-SST] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2023-06-14T04:58:06.779893Z 0 [ERROR] [MY-000000] [WSREP-SST] Cleanup after exit with status:32  
2023-06-14T04:58:06.796608Z 0 [ERROR] [MY-000000] [WSREP] Process completed with error: wsrep\_sst\_xtrabackup-v2 --role ‘joiner’ --address ‘10.15.0.4’ --datadir ‘/var/lib/mysql/’ --basedir ‘/usr/’ --plugindir ‘/usr/lib/mysql/plugin/’ --defaults-file ‘/etc/mysql/my.cnf’ --defaults-group-suffix ‘’ --parent ‘2140921’ --mysqld-version ‘8.0.32-24.2’ ‘’ : 32 (Broken pipe)  
2023-06-14T04:58:06.796696Z 0 [ERROR] [MY-000000] [WSREP] Failed to read uuid:seqno from joiner script.  
2023-06-14T04:58:06.796719Z 0 [ERROR] [MY-000000] [WSREP] SST script aborted with error 32 (Broken pipe)  
2023-06-14T04:58:06.796900Z 3 [Note] [MY-000000] [Galera] Processing SST received  
2023-06-14T04:58:06.796949Z 3 [Note] [MY-000000] [Galera] SST request was cancelled  
2023-06-14T04:58:06.796995Z 3 [ERROR] [MY-000000] [Galera] State transfer request failed unrecoverably: 32 (Broken pipe). Most likely it is due to inability to communicate with the cluster primary component. Restart required.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [June 14, 2023, 2:05pm UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/8 "2023-06-14T14:05:42Z")

</div>

> [@Santhosh\_Pandi](#):
>
> 2023-06-14T04:58:06.779562Z 0 [ERROR] [MY-000000] [WSREP-SST] Possible timeout in receving first data from donor in gtid/keyring stage

As I said above, “Ports 3306, 4444, 4567, 4568 must be allowed” Please test each port using `socat` or `nc` and verify connectivity to all nodes with all ports.

---

<div class="post-metadata">

**Author:** ![Santhosh\_Pandi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/santhosh_pandi/32/11021_2.png) [@Santhosh\_Pandi](https://forums.percona.com/u/Santhosh_Pandi)\
**Post date:** [June 15, 2023, 10:43am UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/9 "2023-06-15T10:43:42Z")

</div>

Thank you matthewb all if its ok replication succes but i have login in mysql it shows error ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [June 15, 2023, 1:33pm UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/10 "2023-06-15T13:33:17Z")

</div>

Try logging in via TCP/IP `mysql -h 127.0.0.1` If that works, then your socket default setting in my.cnf is not correct.

---

<div class="post-metadata">

**Author:** ![Santhosh\_Pandi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/santhosh_pandi/32/11021_2.png) [@Santhosh\_Pandi](https://forums.percona.com/u/Santhosh_Pandi)\
**Post date:** [June 16, 2023, 7:19am UTC](https://forums.percona.com/t/node2-did-not-connect-in-node1/22752/11 "2023-06-16T07:19:43Z")

</div>

yeah everything fine thank you
