Hi Ken Thanks for your advice. By the way, I am able to correct the issue by updating the NGINX configuration file.
listen 172.16.10.53:6379; with listen 0.0.0.0:6379 <http://172.16.10.53:6379/>; The setup in pacemaker/corosync looks good. Regards On Mon, Apr 25, 2022 at 11:59 PM Ken Gaillot <kgail...@redhat.com> wrote: > Hi, > > This would be better for the us...@clusterlabs.org list, where people > have experience with all sorts of setups. This list is just for > discussing code. > > Thanks! > > On Mon, 2022-04-25 at 13:23 +0530, Michel D wrote: > > I am running two nodes(172.16.10.52/172.16.10.53) NGINX load > > balancers. The load balancers are configured to proxy pass upstream > > Redis server using TCP port. > > > > stream { > > > > upstream redis_cache { > > server 172.16.10.242:6379 max_fails=3 > > fail_timeout=30s; > > server 172.16.10.48:6379 max_fails=3 > > fail_timeout=30s; > > server 172.16.10.49:6379 max_fails=3 > > fail_timeout=30s; > > } > > > > server { > > listen 172.16.10.53:6379; > > proxy_pass redis_cache; > > } > > } > > > > The above setting works fine for both the load balancers. I can > > access the upstream redis server using load balancers/redis-cli. > > > > # redis-cli -h 172.16.10.53 -p 6379 ---> Works fine > > > > Now I have set up a corosync/pacemaker cluster including load > > balancer 1(172.16.10.52) and load balancer 2(172.16.10.53) to access > > the upstream redis server using virtual IP(172.16.10.51) > > > > I can access the cluster using the virtual IP(http://172.16.10.51) > > serving NGINX default welcome page. > > > > However, I am unable to access the upstream redis server using Redis- > > cli/Virtual IP. > > I am getting a Connection refused error. > > > > # redis-cli -h 172.16.10.51 -p 6379 > > Could not connect to Redis at 172.16.10.51:6379: Connection refused > > Could not connect to Redis at 172.16.10.51:6379: Connection refused > > > > Steps used to create the cluster > > ************************************ > > > > # pcs cluster auth redis-lb1 redis-lb2 -u hacluster -p welcome -- > > force > > > > # pcs cluster setup --force --name pacemaker1 redis-lb1 redis-lb2 > > > > # pcs cluster start --all > > > > # pcs property set stonith-enabled=false > > # pcs property set no-quorum-policy=ignore > > # pcs status > > > > # pcs resource create virtual_ip ocf:heartbeat:IPaddr2 > > ip=172.16.10.51 cidr_netmask=32 op monitor interval=10s > > > > # pcs resource create nginx-lb ocf:heartbeat:nginx > > configfile=/etc/nginx/nginx.conf op monitor timeout="5s" > > interval="5s" > > > > # pcs constraint colocation add nginx-lb virtual_ip INFINITY > > > > # pcs constraint order virtual_ip then nginx-lb > > > > # pcs constraint location nginx-lb prefers redis-lb1=50 > > # pcs constraint location nginx-lb prefers redis-lb2=50 > > > > # pcs cluster stop --all > > > > # pcs cluster start --all > > > > ******************************** > > Shall i have to provide the port number of Redis configuration(6379) > > that was setup in load balancers while creating pcs resource creation > > steps ? > > > > Regards > > _______________________________________________ > > Manage your subscription: > > https://lists.clusterlabs.org/mailman/listinfo/developers > > > > ClusterLabs home: https://www.clusterlabs.org/ > -- > Ken Gaillot <kgail...@redhat.com> > > _______________________________________________ > Manage your subscription: > https://lists.clusterlabs.org/mailman/listinfo/developers > > ClusterLabs home: https://www.clusterlabs.org/ >
_______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/developers ClusterLabs home: https://www.clusterlabs.org/