FileMaker Server 26.1 Automatic Switchover on Windows, Ubuntu and AWS: Lessons From Two Test Pairs

FileMaker Server 26.1 can switch over to its standby server without anyone clicking a button. In my overview of FileMaker Server 26.1 I described what that is and how it works. This post is about what it takes to make it work, and what you are left with after it has done its job.

Most of what follows comes from two test pairs that I built for it on AWS. The first is two Windows Server 2022 machines hosting 36 files, about 15 GB in total. On Windows, automatic switchover needs a third Windows machine as well, the witness: it breaks the tie when the two FileMaker Server machines lose sight of each other. More on that in the Windows section further down. The second is two Ubuntu 24.04 machines hosting one file of 442 MB.

Before we get into the details of how it works exactly, let’s clear up the terminology.

A standby pair is two FileMaker Server machines: the Primary that hosts your files and the Standby that receives a copy of those files and is kept current at a set interval. Until now, promoting the Standby was a manual decision. Somebody had to notice that the Primary was in trouble, sign in to the Admin Console, click Switchover, and then point the users at the other machine.

In 26.1 you can let FileMaker Server make that call. There are two triggers under Connectors > Standby Server > Automatic Switchover. Both are off by default, and you enable them separately:

  • When Database Server Quits: the machine is still up, but the database server process has quit unexpectedly.
  • When Primary Server Is Unreachable: the Standby can no longer make a network connection to the Primary.
Automatic Switchover part of the Standby Server page
The Automatic Switchover part of the Standby Server page in the Admin Console, with both triggers on

They look like two flavors of the same feature, but under the hood they are two separate mechanisms, and they behave differently enough that it pays to understand both. FileMaker Server handles “When Database Server Quits” by itself. For “When Primary Server Is Unreachable” it relies on the failover tooling of the operating system: keepalived on Ubuntu, ucarp on macOS and a failover cluster on Windows.

Chart showing how each of the two triggers starts a switchover
How each of the two triggers starts a switchover, on Ubuntu and macOS and on Windows

But first, the one thing to know above everything else in this post. To put it bluntly: the switchover is automatic, putting the pair back together is not. After any switchover, automatic or manual, you have one machine hosting your files and no Standby, and it stays that way until somebody connects the two machines again by hand. So automatic switchover gets you through one failure, not two in a row. What that by hand involves is in “After the switchover” below.

The Virtual IP Address

Switching over is only half of the problem. Your users, your Data API integrations and your OData clients all connect to a host name, and that host name points at the machine that just died.

26.1 introduces a new setting for this: the Virtual IP Address. It is one extra, unused IP address on the same subnet as the two machines, and it belongs to the pair and not to either machine. Whichever machine is the Primary holds that address as a second address on its network card. On switchover, manual or automatic, the address moves to the new Primary.

Virturl IP address before and after a switchover
The Virtual IP Address before and after a switchover

In the picture, the pair uses 10.0.0.50 as its Virtual IP Address. Before the switchover that address lives on the Primary, next to the Primary’s own 10.0.0.11. After the switchover it lives on the other machine.

The thing to do then is to point the DNS name that your users connect to at the Virtual IP Address and not at either machine. Nothing in the client configuration changes after a switchover, because the address they use never changes. It just lives somewhere else.

Where you enter the Virtual IP Address in the Admin Console depends on the platform. On Ubuntu it is a single field on the Primary’s Standby Server page, under Automatic Switchover, where you type the address and save it:

Standby Server page on an Ubuntu Primary
The Standby Server page on an Ubuntu Primary, with both triggers on and the Virtual IP Address field open

On Windows the same row shows a Create Cluster link instead, because there the address belongs to the cluster, and you give it to FileMaker Server in the Create Cluster dialog. More about that further down. Once the cluster exists, the row shows the address as Running, and a Failover Cluster row appears under it:

Standby Server page on a Windows Primary
The Standby Server page on a Windows Primary, with the Virtual IP Address and the Failover Cluster both running

When the Database Server quits

This trigger does not depend on keepalived, ucarp or the Windows cluster, so it works the same way on all three platforms, and it does not need a Virtual IP Address. The helper process on the Primary (fmshelper, the same process that restarts a component when it dies) checks every 15 seconds or so whether the Database Server process still exists. If it does not, the helper sends a request to the Standby over port 443 and asks it to take over.

So the Standby starts its promotion within about 15 seconds of the crash. If the request fails, the helper tries again at the next check, a handful of times.

A few things to know about this trigger:

  • It only checks whether the process exists. A Database Server that is running but hung does not trigger it.
  • Stopping or restarting the Database Server from the Admin Console, the Admin API or the command line does not trigger it. An orderly shutdown announces itself, and the helper knows the difference.
  • It works without a Virtual IP Address. The Virtual IP Address is set up as part of the other trigger, “When Primary Server Is Unreachable”. If you only enable this one, the Standby becomes the Primary under its own address, and it is up to you to point the users there, or to do a manual DNS switchover (repointing the DNS host name to the active IP address).

So in practice: enable both triggers and set a Virtual IP Address. Then a crashed Database Server is caught within about 15 seconds, and the address follows the switchover.

On my Ubuntu pair that is exactly what happened. I killed the Database Server on the Primary with both triggers on. The keepalived configuration that FileMaker Server writes has its own health check that looks for the Database Server every 5 seconds. When two of those checks in a row did not find it running, keepalived on the Primary gave up the address, and the Standby took it 9 seconds after the crash. The files were open on the new Primary after 15 seconds. Up to 10 of those seconds are the two health checks, so where the crash falls in that 5-second cycle moves the total by a few seconds.

The old Primary’s Database Server stays down afterwards. Nothing starts it again, and the pair has no Standby until you start it and connect that machine again.

When the Primary is unreachable

When the Primary is powered off or has lost its network, nothing on it can tell the Standby to take over. So the Standby has to notice the failure and decide by itself, and for that FileMaker Server relies on the high-availability tooling of the operating system: keepalived on Ubuntu, ucarp on macOS and a Windows Server Failover Cluster on Windows. FileMaker Server configures the tool for you and adds its own health checks on top.

How that works is different on Windows, so let’s take Ubuntu and macOS first.

On Ubuntu and macOS, the two machines send each other a small “I am here and I have the address” announcement about every 5 seconds. When the announcements from the Primary stop, the Standby claims the Virtual IP Address. (The protocols behind this are VRRP and CARP. They exist to let two machines share one IP address, and routers and firewalls have used them for that purpose for decades.)

Claiming the address is not the switchover though, only the start of it. This is the sequence on Ubuntu:

  1. The Standby waits for about 20 seconds of silence before it concludes that the Primary is gone and claims the Virtual IP Address. One missed announcement is not enough.
  2. It then waits about another 20 seconds and checks whether it still holds the address. If the Primary has come back in the meantime, the switchover is called off.
  3. It tries to reach the old Primary directly over port 443. If the old Primary answers as a healthy FileMaker Server, the switchover is called off and the address is handed back.
  4. Only then does the Standby promote itself. That is the same promotion that the Switchover button in the Admin Console performs.

That puts the start of the promotion somewhere between 30 and 45 seconds after the failure. macOS follows the same steps and lands in the same realm.

Opening the files comes after that. The Standby first unpacks the configuration it received from the Primary, and on its first switchover it copies the databases into the hosting folders. How long that takes depends on the size of your solution.

On Ubuntu and macOS, keepalived and ucarp also notice when the Database Server crashes, because every 5 seconds or so they check whether its process is still running. So with both triggers on, a crash sets off both mechanisms. Normally the helper process of “When Database Server Quits” is the first to ask the Standby to take over.

On Windows, the cluster does the job that keepalived and ucarp do on the other platforms, and it does it in its own way:

  • The two FileMaker Server machines are nodes in a Windows cluster, and the cluster decides whether a node is down. It does not rely on the opinion of one machine but needs a majority, and that is why there is a third machine, the witness. The Primary is down when the Standby and the witness both agree that it is.
  • When the cluster reports that the Primary node is down, the Standby promotes itself right away. There is no extra wait and no check of the old Primary over port 443. The cluster’s majority is taken as proof.
  • The cluster moves the Virtual IP Address to the new Primary.
  • The cluster only watches the machine, not FileMaker Server. A crashed Database Server on a machine that is otherwise fine is not caught by this trigger on Windows. For that you need “When Database Server Quits”.

How fast that is depends on how long the cluster takes to declare a node down. That timing is Microsoft’s and not something FileMaker Server sets.

One thing to be careful with, especially if you have managed Windows clusters before, for SQL Server or Hyper-V for instance. There, the usual routine before maintenance on a machine is to pause its node first, in Failover Cluster Manager, the Windows tool for managing a cluster. Do not do that out of habit here. To FileMaker Server, a paused Primary node is the same as a Primary that is down, so pausing it starts a switchover. And Cluster-Aware Updating, the Windows feature that installs updates on the nodes of a cluster one at a time, pauses each node before it updates it. How to prepare a Windows Primary for maintenance without a switchover is in “Planned maintenance” further down.

Setting up that cluster is more work than on the other platforms. More about that further down.

Back to Ubuntu and macOS for a moment. There, the waiting and the double-checking put the start of the promotion 30 to 45 seconds after the failure, and there is a good reason for every one of those seconds. The worst outcome for a standby pair is not downtime, but both machines believing that they are the Primary, with users connected to each and changing data in two copies of the same file. There is no way to merge those afterwards. The waiting and double-checking are there to prevent exactly that, and I will happily trade those seconds for it. On Windows, the witness is what keeps both FileMaker Server machines from becoming the Primary at the same time.

The old Primary coming back

The same care applies in the other direction. When the old Primary gets its network back, it notices that it no longer holds the Virtual IP Address. It then asks the other machine whether it now reports itself as the Primary, and only when that is confirmed does it disconnect its clients and close its files.

If the other machine does not confirm that it is now the Primary, the old Primary keeps hosting its files. That covers the case where the old Primary lost the Virtual IP Address because of a problem on its own side, and the Standby never took over. If the old Primary closed its files then, nobody would be hosting them.

The Admin Console on the old Primary then shows a banner, with a Reopen Databases button next to it, and its Dashboard shows that none of its files are open:

Switchover banner in the Admin Console of the old Primary
The switchover banner in the Admin Console of the old Primary, with the Reopen Databases button and no databases hosted

The banner does not tell you what may have happened before it showed up. A Primary that lost its network does not know that it has been replaced. As long as the outage lasts, its files stay open, and any client that can still reach that machine on its own address keeps working and keeps committing data. That data stays on the old Primary and is not merged into the new one.

This is one more reason to have everybody connect through the name that points at the Virtual IP Address and never through the address of a machine.

What happens to your clients

Automatic switchover shortens the outage, but it does not hide it.

  • FileMaker Pro and FileMaker Go users are disconnected and have to open the files again. The reconnect feature does not carry them over to the new Primary.
  • What they see depends on how the Primary went away. After a switchover from the Admin Console it is “File has been forcefully disconnected by the host. All affected windows will be closed.”, followed by an empty message from the administrator, and nothing more. After a crashed Database Server, the connection just drops, FileMaker Pro tries to reconnect, fails, and offers “This file could not be reconnected. Do you want to reopen it?” Yes leads to a login and then the file, now on the other machine. So the unplanned case is the friendlier one.
  • WebDirect users have to sign in again, and unsaved edits are gone. The sessions lived in memory on the old Primary.
  • Data API tokens issued by the old Primary are not valid on the new one. Your integration gets error 952 (HTTP 401) and has to log in again. If your code does not handle that yet, now is the time.
  • OData requests carry their credentials on every call, so they work again as soon as the files are open.
  • Schedules are copied to the Standby and start running there after the promotion. Nothing is caught up: a schedule whose time fell inside the outage is skipped until its next slot.
  • A schedule or a Perform Script on Server that was running on the old Primary is lost.
FileMaker Pro after a switcover from the Admin Console
FileMaker Pro after a switchover from the Admin Console: the file has been forcefully disconnected by the host
FileMaker Pro after a crashed Database Server
FileMaker Pro after a crashed Database Server: the file could not be reconnected, with the offer to reopen it

How much data are you willing to lose?

The Standby is only as current as the last redo log it received. Everything that was committed on the Primary after that is missing on the new Primary.

That is true for both triggers. Even when only the Database Server crashed and the machine itself is fine, the remaining logs are not sent across, and only a manual switchover with Sync Now does that.

So how long is that interval? It is 5 minutes by default, and you can set it anywhere between 1 and 99 minutes. It is one setting, shared with progressive backups, and in 26.1 you can finally change it in the Admin Console and through the Admin API where it used to be command line only.

So with the default, an automatic switchover can cost you up to 5 minutes of work. If that is too much, lower the interval. When the Database Server crashed but the machine survived, that work is still in the files on the old Primary, and you can go and get it by hand.

After the switchover

After a switchover you are running without a standby. This is the biggest gotcha of the whole feature, so plan for it.

The switchover is automatic, but putting the pair back together is not. Every switchover, automatic or manual, ends with the two machines disconnected, and nothing in FileMaker Server connects them again. Waiting does not help either: the sync interval only counts once the pair is connected. It takes an admin clicking Connect in the Admin Console, or a call to the Admin API.

What happenedDoes the pair come back by itself?What you do
A restart of either machine, no switchoverIt never left. The Primary sends again at the next intervalNothing
The Standby was unreachable for less than about a dozen intervals (an hour at the default)Yes. The Primary sends the backlog, oldest firstNothing
The Standby was unreachable for longer (event 1325)No. The Primary has turned its side offDisconnect, then Connect
Manual switchover, with Set Old Primary as Standby onNoConnect. The roles are already swapped
Manual switchover, with Set Old Primary as Standby offNoSet the old Primary’s role to Standby, then Connect
Automatic switchover, and the old Primary heard about itNoThe same as the manual switchover, with whatever Set Old Primary as Standby is set to
Automatic switchover while the old Primary was down or cut offNoSet the old Primary’s role to Standby, then Connect
You clicked DisconnectNoConnect
You clicked RemoveNoAdd to Primary, as for a new pair

If the old Primary still has the Primary role when you click Connect, the connect is refused: “Unable to connect. The server role of the other server is incorrect.” And the Admin Console does not let you change a machine’s role to Standby while a remote backup drive is connected on it, so disconnect the drive first.

The old Primary does not host anything after a switchover, but it does turn its own “When Primary Server Is Unreachable” setting off. Connect puts it back: the Primary hands its switchover settings to the Standby in the same step.

On Ubuntu you can see that on the machine itself. At the switchover, FileMaker Server removes the keepalived configuration from the old Primary, and keepalived stops there. It comes back, as the backup, the moment you connect that machine as the Standby again. On my pair that was 85 seconds later, because I connected it right away. Until then nothing would take the address over, and the Admin Console does not show any of it.

So treat every switchover, automatic or manual, as the start of a to-do list. This is mine, from the test pair:

  1. Find out why the Primary went down, and fix that first. Pairing again with a machine that is about to fail again does not buy you much.
  2. Copy anything you still need off the old Primary. When you add the old machine back as a Standby, the databases in its hosting folders are moved to a Removed_by_FMS folder and replaced with the new Primary’s. If the Database Server crashed but the machine survived, the work since the last sync is still in those files.
  3. Check the free space on the old Primary. It made a full backup at the moment of the switchover, and its progressive backup sets no longer share their data. It now has to receive the full set as the new Standby. See “How big the disks need to be” below.
  4. Run Set Up SSH on the new Primary. It works in one direction only, from the machine you run it on to the other one. When you built the pair, you ran it on the Primary, and there was no way to run it on the Standby as well. So the direction from the Standby to the Primary can only be set up the first time the Standby has become the Primary, which is now. You only have to do that once. After that, both directions are set up, also for every switchover after this one. Right after my switchover, the first attempt to reconnect logged “Cannot connect to standby server. SSH key configuration required.” If both machines trust the same key pair, use the same key type, user and key.
  5. Connect the two machines again, as in the table above, and wait for the first sync. Last Sync showing a time on the Primary’s console is the signal. Then ask the Standby whether it is ready (see “Monitoring”).
  6. If you use progressive backups, turn them back on, on the new Primary. The machine that becomes the Standby has its progressive backup turned off, because a Standby hosts nothing and the Admin Console refuses the Standby role while progressive backup is on. When that machine becomes the Primary again, its progressive backup stays off, and nothing turns it back on. The standby pair itself does not need progressive backups, so if you never used them, there is nothing to do here. But if you rely on them for your own point-in-time restores, you have none until you turn them back on. I could not find this in Claris’s help, which only mentions reconnecting a Remote Backup drive.
  7. Check that automatic switchover is on, on both machines. Connect should have copied the settings from the Primary to the Standby.

Switching back, once the pair is together again, is quick. On my pair, the old Primary closed its files and four seconds later the other machine had opened all 36. The pair was reconnected 23 seconds after that.

On my Windows pair on AWS, with the Virtual IP Address and an Elastic IP in place, a manual switchover took 14 to 17 seconds from the moment the old Primary started closing its files until port 5003 answered on the public address again. All files were open on the new Primary after 10 to 12 seconds; the rest was the address catching up. That does not include the time between your click and the first file closing, when Sync Now does its work.

On my Ubuntu pair the same thing took about 9 seconds, in both directions, counted from the moment the clients were forced off. The file was closed after under 2 seconds and open on the new Primary after 4, and keepalived had the address a second later. The rest was the address moving in EC2. Windows waits another 7 to 8 seconds after that move before it brings the address online, and Ubuntu does not. That was one file of 442 MB, though, so expect more with a real solution.

Planned maintenance

Automatic switchover has to tell a failure apart from a shutdown that you planned yourself. How well it does that depends on the platform, and on the order in which you do things.

The safe order, on every platform and with any combination of settings:

  • Shut down the Standby first, and then the Primary. With the Standby already off, nothing is left that could take over while the Primary stops.
  • Start the Primary first. Wait until its Database Server is running and the Admin Console answers, and with a Virtual IP Address, until the Primary holds that address. Only then start the Standby.

The other way around is exactly the situation the feature was built for. A Standby that starts while the Primary is still down sees no Primary. With “When Primary Server Is Unreachable” on, it promotes itself about 40 seconds after its Database Server is up on Ubuntu and macOS, unless the Primary answers on port 443 by then. On Windows it does that right away, as soon as the cluster reports the Primary’s node as down. When the Primary comes up afterwards, it finds the other machine claiming to be the Primary, closes its own files and shows the banner from earlier in this post. And you are in the “After the switchover” situation, for a restart you planned yourself.

With “When Database Server Quits” on, there is one more thing to check after every restart of the Primary: that its Database Server actually started. One that does not come up counts as one that quit, and the Standby takes over. That is the trigger doing its job, but it may not be what you expected after a routine reboot.

Restarting only the Primary

Here Windows and the other two platforms part ways.

On Ubuntu and macOS, an orderly stop of the Primary, including the one that an operating system shutdown does, first tells the Standby to stand down. The Standby pauses its side of the address arbitration and does not take over. When the Primary’s Database Server starts again, it tells the Standby to resume. So a restart for updates does not cause a switchover, as long as both messages arrive.

Two catches with that:

  • The stand-down instruction is not remembered. If FileMaker Server on the Standby restarts while the Primary is still down, the Standby is armed again and takes over about 40 seconds later. So leave the Standby alone while you work on the Primary.
  • The resume instruction is sent once. If it does not arrive, the Standby stays paused. The pair looks healthy, but “When Primary Server Is Unreachable” is not armed, and nothing in the Admin Console tells you. So after every restart of the Primary, check that keepalived (systemctl status keepalived on Ubuntu) or ucarp is running on both machines.

On Windows there is no such stand-down instruction. The Standby watches the Primary’s cluster node, and a shutdown or reboot of the Primary machine takes that node down. The Standby then promotes itself at once. So on Windows, rebooting the Primary for the monthly updates is a switchover. Stopping only the FileMaker Server service is not, because the cluster does not watch the service.

So before planned work on a Windows Primary, either do a manual switchover first, with “Set Old Primary as Standby” on, or turn “When Primary Server Is Unreachable” off and back on afterwards.

Do not leave the Standby down for too long

There is a time limit on the other side as well. While the Standby is down, the Primary keeps trying to send it the changes of every interval. After about a dozen failed intervals in a row it gives up, and turns its side of the standby connection off by itself. At the default interval of 5 minutes that is about an hour; at 1 minute, about a quarter of an hour. All you get is one line in the Event.log:

So bring the Standby back within the hour, or expect to disconnect and connect the two machines again.

Upgrading FileMaker Server on a pair

There is no way to upgrade a pair and keep it a pair. FileMaker Server gives you two ways to upgrade: the installer’s upgrade in place, which has a history of being finicky, or an uninstall and a fresh install. The uninstall takes the setup apart. On Windows, on the machine that owns the FileMaker Server role in the cluster, it deletes the cluster that FileMaker Server created; on the other one, that machine leaves the cluster. And the fresh install starts with no standby configuration at all: no pairing, no switchover triggers, no Standby folder, no Virtual IP Address, no cluster or witness.

So plan an upgrade as a rebuild:

  1. Turn both automatic switchover triggers off.
  2. Remove the Standby, and on Windows, Destroy Cluster.
  3. Upgrade both machines, the Standby first.
  4. Pair them again, and on Windows, Create Cluster (it gets a new name), Configure Cluster and check the witness.
  5. Run your switchover tests again.

Why the Standby first? When you pair the machines again, the Primary compares the Standby’s version with its own, build number included, and it refuses a Standby on an older build. The Standby’s Event.log then shows event 1300, “Failed to add the standby server to the primary server”, with reason 25013. A Standby on the same build or a newer one is accepted. So when you upgrade a pair, upgrade the Standby first. If something gets in the way of upgrading the Primary after that, the two machines can still be paired again. The other way around, a Primary on the new build with a Standby on the old one, they cannot. Only Add to Primary checks the build; Connect does not.

Firewall

Let’s take macOS and Ubuntu first.

Chart showing what to allow between a standby pair on macOS or Ubuntu
What to allow between a standby pair on macOS or Ubuntu

Between the two machines you need:

  • TCP 22 (or the SSH port you configured) in both directions. The full copies of your files go from the Primary to the Standby over SSH, and so do the plug-ins and system scripts. After a switchover the roles are reversed.
  • TCP 443 in both directions. The changes of every interval do NOT go over SSH but over HTTPS, and so does the server configuration. Each machine also uses 443 to ask the other for its role and its health, and the “Database Server quits” request travels over it. So a blocked 443 stops the sync, even when SSH works and the SSH test in the Admin Console passes.
  • On Ubuntu with a Virtual IP Address: IP protocol 112 between the two machines.

That last one needs some explanation, because it is not a port.

We are used to firewall rules that name a port: 443, 5003, 22. Port numbers are something that two specific protocols use, TCP and UDP. Nearly everything FileMaker Server does travels over TCP, so nearly every rule you have ever written for it has a port number in it.

But TCP and UDP are not the only protocols that travel over a network. There are others that sit next to them, and those have no ports at all. You already know one: ping. Ping uses a protocol named ICMP. You have never opened “the ping port” on a firewall, because there is none. You allow ICMP as a whole, or you do not.

The announcements that keepalived sends are like that. They use a protocol named VRRP, which sits next to TCP, UDP and ICMP. Each of those protocols has a number so that network equipment can tell them apart: ICMP is 1, TCP is 6, UDP is 17, and VRRP is 112. The machines know where to send the announcements because they have each other’s IP address, and they do not need a port number on top of that.

So this is how it looks in practice:

  • In your firewall rule, you do not pick TCP or UDP and then enter a port. You pick the protocol itself. Depending on your firewall it is listed as VRRP, as “protocol 112”, or under “custom protocol” or “other”.
  • Limit the rule to the two machines: from the IP address of one to the IP address of the other, in both directions.
  • A rule that allows “all TCP and UDP ports” between the two machines does NOT cover it.

And if the announcements are blocked, each machine stops hearing the other one, and each concludes that it should hold the Virtual IP Address. That is not a state you want to be in, so test this before you rely on it.

On Windows there is no protocol 112. The cluster brings its own list, and that list is Microsoft’s and not FileMaker Server’s.

Chart showing what to allow between a standby pair and its witness on Windows
What to allow between a standby pair and its witness on Windows

Between the two FileMaker Server machines, in both directions, on top of SSH and 443:

  • UDP 3343 and TCP 3343. This is the heartbeat of the cluster, how each machine knows that the other one is alive.
  • RPC: TCP 135 plus the dynamic range, TCP 49152 to 65535. The cluster uses it to manage itself.
  • SMB on TCP 445 and ping. Microsoft documents these for building the cluster, not for running it.

From each of the two FileMaker Server machines to the witness: SMB on TCP 445. Outbound only. The witness never connects back to them.

Note that FileMaker Server does not open any of this in the Windows Firewall for you. Installing the Failover Clustering feature adds a group of firewall rules named “Failover Clusters”, and you should look at how wide those are.

And while you are in the Windows Firewall, check the ports for your clients too, on both machines. On a machine that I installed fresh, the only rule was the one for 443 that IIS brings along. There was nothing for 5003. After a switchover to that machine, 443 answered but FileMaker Pro could not connect, until I added a rule:

New-NetFirewallRule -DisplayName 'FileMaker Server' -Direction Inbound -Protocol TCP -LocalPort 80,443,5003 -Action Allow

The AWS security group allowed 5003 all along, and the old Primary had a rule I had made by hand long ago. Only a client that connects after a switchover shows you this.

Keep port 445 on a short leash

SMB is not a port to leave open casually. It is one of the most attacked services on any Windows machine. So if the witness means that you open 445 somewhere, open it only for these machines:

  • On the witness, allow inbound 445 from the IP addresses of the two FileMaker Server machines only. That is why the witness should be a small machine that does nothing else: with that rule in place, nobody else can use file sharing on it.
  • On the two FileMaker Server machines, nothing needs to come in on 445, except possibly from the other machine while the cluster is built.
  • On your network firewall: 445 from the two FileMaker Server machines to the witness, and nowhere else. Never from or to the internet.
  • The Virtual IP Address is for your users. Only the ports that clients need should be open to it, and certainly not 445, 135 or 3343.
  • On the shared folder, give access to the one account that the cluster uses and remove everybody else.

Windows is a bigger project

On macOS and Ubuntu you need two machines and one spare IP address.

On Windows you need three machines on the same subnet: the Primary, the Standby, and a third machine that Microsoft calls a file share witness.

The name is confusing. None of your FileMaker files are shared, and none of them ever go to that machine. The witness is nothing more than an empty shared folder, something like C:\witness, that both FileMaker Server machines can reach over the network. It is shared with regular Windows file sharing (SMB, on port 445). Microsoft asks for very little: the folder is used for this one cluster only, there is nothing else in it, and there are 5 MB of free space.

What is it for? A cluster only acts when a majority agrees. With two machines that is a problem: when they lose sight of each other, each one sees one vote out of two, and neither can tell whether the other one died or just the cable between them. The shared folder is the third vote. Windows keeps a small log file of its own in it (it is named witness.log, and it holds bookkeeping about the cluster that has nothing to do with FileMaker), and the machine that can still reach that folder has two votes out of three and gets to carry on. The machine that cannot reach it knows that it is the one that is cut off.

So the witness does not run FileMaker Server, and it should not. It can be a much smaller machine, and any Windows machine that is always on will do. But it should not be one of the two FileMaker Server machines, and it should not be down when you need it.

It does not need a desktop either. Windows Server Core, the edition without one, is all the witness needs, and I would pick it: a machine whose only job is to share one folder should have as little else on it as possible, so there is less to patch and less to attack. Decide this when you build the machine, because you cannot add the desktop to a Server Core installation later.

As for the machines themselves: they can be in an Active Directory domain or in a workgroup. In a workgroup, the same local administrator account has to exist on all of them.

You also need two spare IP addresses: one for the Virtual IP Address, and one for the cluster’s own administration (the Cluster Access Point) that your clients never use.

And you need the Failover Clustering feature of Windows. FileMaker Server will not install it for you, and it has to be installed on BOTH machines: the Primary and the Standby. Not just on the Primary where you click Create Cluster. This is the command, in PowerShell as an administrator:

Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools

Plan for this one, because the machine has to be restarted afterwards. Windows tells you that only once the installation is done:

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    Yes            SuccessRest... {Failover Clustering, Remote Server Admini...
WARNING: You must restart this server to finish the installation process.

So on a Primary that is in production, install the feature in a maintenance window, the same way you would plan a FileMaker Server update. The Standby has no users connected to it, so there it is less of an issue.

After that, the Admin Console does the cluster in two steps, both on the Standby Server page. On Windows, the Virtual IP Address row has a Create Cluster link where macOS and Ubuntu have Change. Once the cluster exists, that row shows the address as Running, and a new Failover Cluster row appears with a Configure Cluster link. Removing the Standby leaves the cluster in place, and only Destroy Cluster deletes it.

Create Failover Cluster dialog
The Create Failover Cluster dialog in the Admin Console on Windows, with the Virtual IP Address and the Cluster Access Point Address

Give it time. The dialog itself warns that creating the cluster can take several minutes, so do not assume that it has hung.

Configure Cluster

This is the part that tripped me up, because it does not feel like a two-step setup. Create Cluster builds a cluster with one node in it: the Primary. So right after it, the Failover Cluster row shows a warning:

Standby Server page on a Windows Primary right after Create Cluster
The Standby Server page on a Windows Primary right after Create Cluster, with “Warning: Standby server unreachable” on the Failover Cluster row

That looks like something went wrong, but it is expected. It is your cue for the second step. Pairing the Standby does not add it to the cluster either. Only Configure Cluster does, the link next to the warning, when you save the “Windows Account for Cluster Setup”.

Configure Failover Cluster dialog
The Configure Failover Cluster dialog, opened from the Configure Cluster link, with the Windows Account for Cluster Setup still to save

Each part of that dialog is saved on its own, and a part that is done collapses to its value with a Change link next to it.

Watch the witness path, though. The dialog always shows \\fileserver.example.com\fms-witness there, with a Change link, so it looks as if the witness is already taken care of. It is not. That is a default, and not your share. Click Change and enter your own.

Once the Standby has joined the cluster, the dialog says so (“The standby has already been added to the cluster, so no Windows account is needed.”), and that account field is gone. What is left is the path and the account for the witness:

Configure Failover Cluster dialog after the Standby has joined
The Configure Failover Cluster dialog after the Standby has joined, with the witness path and the Windows Account for File Share Witness open for editing

Note the row behind the dialog: with the Standby in the cluster and the default witness path still in place, the warning changes to “Warning: File share witness unreachable”.

The cluster name, FMS- followed by six characters, is generated for you. That is the name that goes in the hosts file further down.

Configure Cluster asks for two different accounts, and they are easy to mix up:

  • The Windows Account for Cluster Setup depends on whether your machines are in a domain. In a domain, enter a domain account that is an administrator on both FileMaker Server machines, with the domain in front of it, as the placeholder in the field suggests: DOMAIN\user, or user@domain. Outside a domain, the account has to exist on both FileMaker Server machines, with the same password, and you enter it without a machine name, even though the placeholder says domain\user. FileMaker Server takes a bare name to mean a local account that exists on both machines.
  • The Windows Account for File Share Witness is the account that can reach the shared folder on the witness. Outside a domain it exists only on the witness machine, and you enter it with that machine’s name in front of it: WITNESSHOST\account, as in the screenshot above. In a domain, a domain account with access to the share goes in the same way, as DOMAIN\user.

The cluster itself is Microsoft’s technology, and Microsoft documents it well. These are the pages to read before you start:

Keep in mind that those pages describe setting up a cluster by hand. With FileMaker Server you install the Failover Clustering feature and create the shared folder, and the Admin Console does the rest.

There are three things that “the rest” does not include:

  • It does not set the permissions on the shared folder. Microsoft’s page on the file share witness, linked above, describes them. Outside a domain it comes down to this: the share and the folder are open to one local account on the witness machine and to nobody else, with Change and Read on the share and Modify on the folder. That account is the one you enter as the Windows Account for File Share Witness. In a domain, the same permissions go to the cluster’s own computer account in Active Directory, which Microsoft calls the Cluster Name Object. On my test pair, two PowerShell commands on the witness did it. They give the account Full Control, which is a bit more than Microsoft asks for:

    New-SmbShare -Name witness -Path C:\witness -FullAccess "$env:COMPUTERNAME\fmscluster"
    icacls C:\witness /inheritance:r /grant "fmscluster:(OI)(CI)F" "SYSTEM:(OI)(CI)F" "Administrators:(OI)(CI)F"


    The first one shares the folder with that one account only. The second one removes the permissions that the folder inherits from C:\ and leaves only that account, the system and the administrators.
  • It does not open anything in the Windows Firewall.
  • It does not register the name of the cluster anywhere. If your machines are not in a domain, or there is no DNS record for that name, add the cluster name to the hosts file on both FileMaker Server machines.

Disks and folders

Most of the trouble I ran into while setting up a test pair had nothing to do with the switchover itself. It was about where the two machines keep their copies of your files, and on which disk. Get this right before you pair the machines, because fixing it afterwards means sending everything to the Standby again.

The same folders on both machines

The Standby takes over the Primary’s server settings, and that includes its folder paths. The additional database folders and the default backup folder arrive on the Standby exactly as they are set on the Primary, drive letter and all. Nothing is translated.

My Primary keeps its hosted files in D:\live_files and its backups in D:\fms_backups. The Standby had no D: drive. So right after the settings came across, the Standby logged this in its Event.log:

Additional database folder [1] is invalid or could not be set: filewin:/d:/live_files/

That is error 759. The Standby keeps the setting anyway, and you will not notice anything until the first switchover. At that point the Standby copies the files into its own database folders, matching them by folder name (live_files in my case), and when it cannot create that folder, the switchover fails. There is no fallback to the default database folder.

So build the two machines the same way: the same drives, with the same drive letters, and the same folders on them.

Once both of mine did, a manual switchover worked as it should. The old Primary closed its 36 files, and 37 seconds later the new Primary had opened all 36, from its own D:\live_files and Databases folders.

The Standby folder

Each machine also has a Standby Server Folder Path, under Connectors > Standby Server. That is where FileMaker Server keeps the copies that the pair needs: on the Primary the set that is about to be sent, and on the Standby the set that it received.

Three things about that setting:

  • It defaults to a folder inside the FileMaker Server installation, C:\Program Files\FileMaker\FileMaker Server\Data\Standby\ on Windows. So if you keep your hosted files on a separate data disk, as you should, the standby copies still end up on the system disk unless you change it.
  • It is set per machine, and the Primary does not push it to the Standby. Set it on each machine, pointing at that machine’s data disk.
  • You can only change it while the pair is disconnected. And every Disconnect deletes the set on the Standby, so it has to receive everything again afterwards.

On the Primary, with progressive backup on, FileMaker Server does not copy your files into the Standby folder. It hard-links them from the progressive backup.

If hard links are new to you: a hard link is a second name for the same data on disk. The file shows up, full size, in both folders, but it takes up the space only once. FileMaker Server has been using them in its backups for years, and I explained how that works in my post on backup strategy.

On my test pair, the Standby folder on the Primary held 14.5 GB of files, but the free space on that disk dropped by only 0.8 GB. Those 0.8 GB were the compressed archives waiting to be sent. A tool that adds up file sizes, like the folder properties in Windows Explorer, counts every hard link as if it were a separate file. So do not panic when you see the numbers.

The catch: a hard link cannot cross from one disk to another. And FileMaker Server does not fall back to a copy when it cannot make one. My Primary had its progressive backup on D: and the Standby folder at its default location on C:. This is what that looks like in the Event.log:

783  Unable to create or write to backup folder ... Progressive backup is disabled.
787  Unable to start progressive backup of "<file>". Unable to read copy of file .../Standby/Progressive/Copies_FMS/...

Read the first one again. The failed standby set took my regular progressive backup down with it.

So on the Primary, keep the Standby folder on the same disk as the progressive backup folder. Then it costs you almost nothing extra: the compressed archive while it is being sent, and a temporary set.

And if progressive backup is off? The standby does not need it. The Primary then keeps its own working copy in the Standby folder, one real copy of your files. So turning progressive backup off does not save you any space either: the standby costs about one copy of your files either way, and with progressive backup on, your progressive sets come on top.

On the Standby

On the Standby there is nothing to link to. What arrives is unpacked into its Standby folder, and that is a full, real copy of your files.

On the first switchover the Standby copies the files from that set into its database folders. That is a copy as well, so at that moment the Standby needs room for your hosted files twice. After that, new sets are moved into the database folders, and a move between two disks is a full copy at best, or fails. So keep the Standby folder on the same disk as the database folders on the Standby too.

When the disk is too small, nothing tells you in the Admin Console. The copies are simply skipped, the Event.log shows this for every file, and the Last Sync field stays empty:

Where a standby pair keeps its copies of your
Where a standby pair keeps its copies of your files, and which ones take up space

How big the disks need to be

And then the old Primary on my test pair ran out of disk space, right after a manual switchover.

Both machines had 15 GB of hosted files on an 80 GB data disk. Before the switchover, the Primary had 30.6 GB free. Right after it, 2.9 GB. That is not enough to receive the full set as the new Standby.

This is where the space went, with H as the size of your hosted files:

  • A Primary in normal operation takes about 3 H. The hosted files, the scheduled backups (hard-linked to each other, so about 1 H as long as most files do not change), and the progressive backup’s copies, with the Standby folder hard-linked to those.
  • At a manual switchover, the old Primary grows to about 5 H. The hosted files stay where they are. It makes a full backup of its own at the moment of the switchover, which is another H. And progressive backup is disabled, leaving two sets behind that no longer share their data: 2 H.
  • Then, as the new Standby, it has to receive the full set. The compressed archives and the unpacked set take another 1 to 2 H.

So at the worst moment, one machine holds 6 to 7 times the size of your hosted files. And since either machine can end up as the old Primary, both need that room.

Graphic showing disk use on one machine of a standby pair
Disk use on one machine of a standby pair, in multiples of the hosted file size

My rule of thumb: size the data disk of each machine for at least 7 times your hosted files, plus growth. We grew both disks on the test pair to 160 GB. On AWS you can do that without stopping the machine.

Keep in mind that the scheduled backups are only about 1 H when few files change. Every backup you keep adds the full size of each file that changed that day, so more backups, or files that change every day, push the number up.

Caveats

The Virtual IP Address requires both machines to be on the same subnet. One address can only move between two machines when both are on the network that the address belongs to.

That is a requirement of the Virtual IP Address and not of the standby server as such. If you already run a standby pair on 26.0, with the Standby in another subnet, another data center or another region, nothing changes for you. That deployment keeps working as it does today, with manual switchover. You do not have to move anything to upgrade.

What you cannot have with such a pair is the Virtual IP Address, and with it the “When Primary Server Is Unreachable” trigger. The “When Database Server Quits” trigger does not need a Virtual IP Address, so that one is available to you. After a switchover you point the users at the other machine or change the DNS record, as you would today.

So it is a choice. A Standby in the same subnet can take over by itself and take the address with it. A Standby in another location protects you against losing the whole site, but somebody has to redirect the users.

And if your servers are in the cloud, you may already have made that choice without knowing it. On AWS, a subnet lives in one Availability Zone. So if you did the sensible thing and put the Standby in a different zone than the Primary, the two machines are in different subnets, and the Virtual IP Address is not available to that pair. My own test pair on AWS turned out to be set up exactly like that: one machine in us-east-1b and the other in us-east-1c.

It is easy to check. In the EC2 console, both instances have to show the same Subnet ID.

Now, you can move the Standby into the Primary’s subnet to get the Virtual IP Address, but then both machines sit in the same zone and the pair no longer protects you against losing that zone.

And on AWS, the Virtual IP Address does not move by itself. When a machine takes over the address, on any of the three platforms, it adds the address to its own network card and announces to the network that the address now lives there. On a regular network that is all it takes. In an AWS VPC it is not, because the VPC only delivers traffic for a private address to the network interface that the address is assigned to in EC2. So the address also has to be moved in EC2, from one instance to the other, and FileMaker Server does not do that. On my test pairs, a small script on each machine took care of it: when the machine takes the address, the script moves it in EC2 as well. Without that script, Windows reports an address conflict and the cluster holds the address back.

In the cloud there is a second catch, for users who come in from the internet. Pointing the DNS name at the Virtual IP Address, as I recommended at the start of this post, works for users inside your own network. But the Virtual IP Address is a private address, and users on the internet cannot reach it. So the public DNS name has to point at a public address, and on AWS that is usually the public address of the Primary instance. That address belongs to the instance and not to the pair, so after a switchover the public DNS name still points at the old Primary. Nothing in FileMaker Server or in the Windows cluster changes that record, and the DNS resolvers your users rely on keep the old answer cached for a while anyway.

On AWS the answer is an Elastic IP, associated with the Virtual IP Address itself and not with the instance. When the private address moves to the other machine, AWS moves the Elastic IP with it. Point the public name at the Elastic IP and it never has to change. Users inside the VPC get the Virtual IP Address from the same name in a private zone. That is how it worked on my pair.

And a standby pair is a high-availability setup, NOT a backup strategy. The Standby is kept in sync with the Primary all the time, so a record that was deleted by mistake on the Primary is gone from the Standby moments later. To get it back, you still need your regular backups.

Monitoring

There is a new Admin API call that tells you whether the Standby has what it needs to take over. Every switchover path checks that same value before it starts. Ask the Standby itself:

curl "https://standby.example.com/fmi/admin/api/v2/standby/switchover" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "response": { "switchoverState": "IDLE", "readyForSwitchover": true },
  "messages": [{ "code": "0", "text": "OK" }]
}

A Standby that reports false here will not take over when you need it to. A Primary, and a server that has no Standby at all, also answer false and not an error, so know which machine you are asking. How to get the token is in the 26.1 overview post.

What it does not tell you is how recent the Standby’s data is. For that, look at the time of the last redo log on the Standby Server page.

And true is not a guarantee. The source shows that it can be true while the Standby has applied nothing. The one value that does not lie is FOGRedoLogLastUpdate in standby_config.json on the Standby: the time of the last interval it actually applied. If that is 0, or does not move forward with each interval, the Standby is not keeping up. The file is in the Data/Preferences folder of FileMaker Server:

  • Windows: C:\Program Files\FileMaker\FileMaker Server\Data\Preferences\
  • macOS: /Library/FileMaker Server/Data/Preferences/
  • Ubuntu: /opt/FileMaker/FileMaker Server/Data/Preferences/

The value counts microseconds since the year 1, the same starting point that FileMaker uses for its timestamps. So in FileMaker, GetAsTimestamp ( value / 1000000 ) turns it into a date and time.

And do not read the server role on its own as “this server is in a pair”. A single server on my test rig, never paired, reported Primary for GET /standby/serverrole one day, after weeks of reporting None. Its standby list was empty and it was not connected to anything. So if a script or a monitor needs to know whether a server is in a pair, have it check GET /standby/list or GET /standby/connectstate as well.

And on the new Primary, a switchover shows up in the Event.log as event 1305 (completed) or 1306 (failed). But not every time. After the Database Server crash on my Ubuntu pair, the new Primary logged no 1305 at all. The promotion only showed as 1317 “Standby server is disabled” and 1315 “Standby server is enabled on primary”, followed by the files opening. So if you watch the Event.log for switchovers, watch for 1315 too.

When the Standby does not sync

A Standby can only take over with data that it actually has. That starts with the full copy of your files that the Primary sends when you pair the two machines, and it goes on with the changes that the Primary sends at every interval. If the full copy never arrives, or the changes stop arriving or are not applied, the Standby cannot take over, automatically or by hand, even when the Admin Console shows the two machines as connected. These are the things that kept my Standby from syncing, and how I found out:

  • Progressive backup can be disabled without the Admin Console showing it. After the 783 error above, the server had turned progressive backup off, but Configuration > Folders still showed it as enabled. Turning it off and on again fixed it, followed by a full backup. Enabling the Standby in the middle of a progressive backup interval did the same to me once.
  • Error 20411 tells you nothing. “Transfer of the full backup archive … failed with error 20411” is all you get on the Primary. The full copy of your files goes to the Standby over SSH, the connection that Set Up SSH prepared, and the SSH server on the Standby is the one that writes the files. So the real reason is in that SSH server’s log, but by default the log does not say which files the Primary tried to write, or why that failed. On Windows you can make it say so for as long as you are troubleshooting. In C:\ProgramData\ssh\sshd_config on the Standby, find the line that starts with Subsystem sftp (the SSH server’s file transfer part), add -l VERBOSE at the end of it, and restart the OpenSSH SSH Server service. The OpenSSH Operational log in the Event Viewer then shows every path that the Primary tries to open. Take the option out again once you have found the problem.

    Does that mean that every FileMaker Server now has file transfer over SSH turned on? No, only the machines of a standby pair. The pair needs an SSH server on both machines, because the full copies travel over SSH, so building a pair means installing and enabling one: OpenSSH, which both Ubuntu and Windows Server offer but do not turn on by themselves. FileMaker Server requires it but does not set it up for you. And once OpenSSH runs, its file transfer part is on by default, for every account that can sign in over SSH. So a standby pair does add an SSH server with file transfer to both machines. That makes the firewall rule above matter: allow port 22 only between the two FileMaker Server machines, and keep it closed to everything else.
  • The Primary gives up quietly. After a few minutes of failed transfers it stopped retrying, and it logged nothing more about it. Check the Last Sync field, and do not assume that silence means success.
  • After a switchover, the new Primary needs its own SSH setup in order to be able to connect to the new Standby. Step 4 of the to-do list under “After the switchover” explains why, and why you only have to do it once.
  • Port 443 matters as much as SSH. The full copy goes over SSH, but every interval’s changes go over HTTPS. A Standby that received its full copy and then nothing more is the sign.
  • The Primary turns the standby off after about an hour of failures. Event 1325, see “Planned maintenance”.
  • Files that are not hosted are not sent. With “Only open the last opened databases”, files that were closed when the server stopped stay closed after a restart. An encrypted file that is waiting for its encryption password after a restart is not hosted either. Neither one reaches the Standby.

For the record: on my pair, the first full copy of about 14.5 GB took about 11 minutes, from the first transfer until the Standby had applied the set. Both machines were in the same AWS subnet.

The bottom line

Automatic switchover does what it says. When the Database Server crashes or the Primary drops off the network, the Standby takes over, and with a Virtual IP Address your users find it without a DNS change. On my pairs, a manual switchover was done in under 20 seconds on Windows and in under 10 on Ubuntu.

But it gets you through one failure, not two. The disks, the folders and the firewall rules need to be right before you pair the machines, and every switchover is the start of a to-do list that puts the pair back together.

Our team built and tested two standby pairs on AWS for this post. Contact us, and we’ll help you set up a pair that is ready when you need it.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top