# Cluster goes down with 1 node offline

**URL:** <https://forums.percona.com/t/cluster-goes-down-with-1-node-offline/5521>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [April 3, 2017, 8:18am UTC](https://forums.percona.com/t/cluster-goes-down-with-1-node-offline/5521 "2017-04-03T08:18:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dree](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@Dree](https://forums.percona.com/u/Dree)\
**Post date:** [April 3, 2017, 8:18am UTC](https://forums.percona.com/t/cluster-goes-down-with-1-node-offline/5521/1 "2017-04-03T08:18:50Z")

</div>

I was testing XtraDB for our new database-setup and I’m running into trouble after testing a fail-over scenario.  
Right now I have 2 nodes in this cluster, both working and syncing fine.  
When I shut the network down on 1 of the nodes, the other node keeps reconnecting and the database-server is hanging:

At this time I can not log in to the node that is online, it’s waiting for the other side to come back online, it seems:

# mysql -uroot -pxxxxxxx database\_name

mysql: [Warning] Using a password on the command line interface can be insecure.  
Reading table information for completion of table and column names  
You can turn off this feature to get a quicker startup with -A

Is this expecting behavior for a 2-node cluster perhaps?

The plan was to have 1 server in the datacenter and the other node locally at the office, but right now this seems a bad idea when both go offline like this.

---

<div class="post-metadata">

**Author:** ![vadimtk](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadimtk/32/9528_2.png) [@vadimtk](https://forums.percona.com/u/vadimtk)\
**Post date:** [April 3, 2017, 5:40pm UTC](https://forums.percona.com/t/cluster-goes-down-with-1-node-offline/5521/2 "2017-04-03T17:40:30Z")

</div>

The clean way to shutdown the node is to execute “mysqladmin shutdown” on that node.  
If you just put network down, the working node can’t figure out what happened and to prevent the split-brain it disables itself.

---

<div class="post-metadata">

**Author:** ![Dree](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@Dree](https://forums.percona.com/u/Dree)\
**Post date:** [April 4, 2017, 1:24am UTC](https://forums.percona.com/t/cluster-goes-down-with-1-node-offline/5521/3 "2017-04-04T01:24:47Z")

</div>

Ok, but what if the server crashes?  
Or is the only way to fix this, use more than 2 servers?

---

<div class="post-metadata">

**Author:** ![vadimtk](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadimtk/32/9528_2.png) [@vadimtk](https://forums.percona.com/u/vadimtk)\
**Post date:** [April 4, 2017, 6:56pm UTC](https://forums.percona.com/t/cluster-goes-down-with-1-node-offline/5521/4 "2017-04-04T18:56:58Z")

</div>

Server crash is also different from the network timeout, so it should be handled properly.  
But in general the typical cluster recommendation is to have 3 or more servers.
