Skip to Content

Could not connect to remote node database, primary server down in cluster

How to solve "Could not connect to remote node database" Primary server is down?


Overview: This article provides troubleshooting steps to resolve the "Could not connect to remote node database" error while configuring the cluster by verifying port accessibility, SELinux settings, and reviewing application logs.


Step 1: Run the following command to check if the MySQL ports are open in the firewall on both the primary and secondary servers:

root@primary_server:~# sudo firewall-cmd --permanent --list-ports | grep 3306

root@secondary_server:~# sudo firewall-cmd --permanent --list-ports | grep 3306

Step 2: Ensure that you can log in to MySQL from the primary server to the secondary server, and vice versa. Replace the ezeelogin_databasename_username with the username specified in /usr/local/etc/ezlogin/ez.conf.

Primary to Secondary:

root@primary_server:~# mysql -h secondary_server_ip -u ezeelogin_databasename_username -p

Secondary to Primary:

root@secondary_server:~# mysql -h primary_server_ip -u ezeelogin_databasename_username -p

Step 3: Ensure that SELinux is not interfering.

root@gateway_servers:~# sestatus

SELinux status:      enabled

Step 3(A): If SELinux is enabled, disable it and reboot the server.

root@gateway_servers:~# vim /etc/sysconfig/selinux

SELINUX=disabled

Step 4: Check for the latest messages in the Ezeelogin error log file. Run the following command on the Ezeelogin gateway server to navigate to the log directory and tail the latest logs. :

root@primary_server:~# cd $(awk '/^system_folder/ {print $2}' /usr/local/etc/ezlogin/ez.conf)/application/logs/

root@primary_server:~# /var/www/ezlogin/application/logs# tail -f <the latest log file>


Related Articles:

Basic MySQL commands for troubleshooting database-related issues in Ezeelogin

Cluster Explained

Install slave / secondary node for high availability in the jump server