A few months back I wrote a post on how to install FileMaker Server 15 on Windows Server 2012 while “offline” (e.g. your server is not connected to the Internet). Well, the issues I described in that post are not relevant in FileMaker Server 16 as FileMaker Inc. has included Application Request Routing (ARR) with the installer (finally)!
Hope to have a few new posts up in the coming weeks…
In my last post I mentioned that servers at my work are typically scoped to the local LAN and have no access to the Internet. This can cause problems with software that needs to download pre-requisites during installation.
If you try to install FileMaker Server on Windows while disconnected from the Internet, you’ll get a message like the one below:
You might wonder what is ARR and why do I need it for FileMaker Server? According to Microsoft:
Microsoft Application Request Routing (ARR) 3 for IIS is a proxy based routing module that forwards HTTP requests to application servers based on HTTP headers and server variables, and load balance algorithms .
This allows IIS to forward requests to Apache Tomcat which is used to run the Admin Console as well as WebDirect and Custom Web Publishing.
In order to fix this issue, we’ll have to install ARR manually. There are a few ways to obtain the ARR install package and pre-requisites. All of these require a computer that is connected to the Internet. Once you have the files however, you can just copy them to your server.
You can run the FileMaker Server installer on a computer that IS connected to the Internet and copy the installers out of the directory where FileMaker downloads them, which is C:\Users\\AppData\Local\Microsoft\Web Platform Installer\installers
Because ARR is intended to be used with IIS, we need to make sure that IIS is installed before running the ARR installer.
To install IIS we need to use the Add Roles and Features Wizard. The wizard can be launched from the Server Manager by going to Manage -> Add Roles and Features, or from the Programs and Features Control Panel Applet by clicking on Turn Windows features on or off as shown below:
The first dialog you will encounter will look like the one below:
You can just click on the Next button until you arrive at the Server Roles screen:
We want to install Web Server (IIS) so check the box next to the entry in the list. When you check the Web Server (IIS) box you’ll be see a prompt like the one below, just click on Add Features.
To continue, click on the Next button. Continue clicking past the Features screen (you don’t need to change anything here) and Web Server Role (IIS) screen until you come to the Role Services screen.
I’m going to set up IIS the same way the FileMaker Server installer would if it had access to download ARR. It’s up to you if you want to add extra Role services, but you should at least include the ones checked in the images below:
For reference, here is what you should check:
Under Web Server – Common HTTP Features
Under Web Server – Application Development
Under Management Tools
IIS Management Console
After you’ve checked all the options you’d like to check, click Next and you should be at the screen below:
Click Install to begin the installation.
Before we can install ARR we’ll need to stop the IIS service. Open up an elevated command prompt (find Command Prompt on your computer, right-click and choose Run as administrator) and type the following command:
Your screen should look similar to the screen below:
Once you’ve stopped the IIS services, you’re ready to install ARR!
Browse to where you’ve placed the ARR install file(s). I placed mine in C:\FMS_Install:
If you downloaded the ARR 3.0 Stand-alone package (IExpress) x64 installer, double-click the file to launch it. If you’ve downloaded the pieces separately or got them from a different FileMaker Server install you’ll need to run them in a certain order. You can view that order on Erez’s IIS Blog.
This is what you should see in Programs and Features after ARR is installed:
If you don’t see IIS URL Rewrite Module 2, Microsoft Application Request Routing 3.0 and Microsoft External Cache installed, then something went wrong. Most likely you did not have IIS installed before running the ARR installer.
At this point in the process I usually reboot the server, but you could also just restart the IIS services using either the Services Control Panel Applet or the IIS Management console.
Now that IIS and ARR are installed, we can install FileMaker Server!
I find the FileMaker Server installer runs best if it is stored on the C:\ drive and if you right-click and choose “Run as administrator” even if you are already logged on as a member of the Administrators group.
From this point on the process is the same as any other FileMaker Server install so I’m not going to go through every screen, but here are a few where you might want to make changes.
We’re doing a single Machine install, but if you were doing a Multiple machine install you’d want to do all of the steps above on the Worker Machine first, and then the Master Machine.
Changing this next section is optional. We usually leave it just using the Local System account. One reason you might want to run as a specific user is to give FileMaker Server the ability to read from or write to shared network storage or a mapped network drive. The Local System account will only have access to read from and write to local drives.
Starting with FileMaker Server 14 you have the ability to change the ports used by the Web Server for web connections. If you want to use IIS to run other websites you can either change the ports FileMaker Server uses, or change the ports your other websites use. Since FileMaker recommends that you run FileMaker Server on a dedicated server, I’d recommend leaving the defaults here.
Since we have IIS setup to already use ports 80 and 443, you’ll see the dialog below pop-up. Just click on Disable Websites.
The next item we’re concerned about is Bonjour for Windows. I’m sure many IT professionals have an opinion about Bonjour and whether it is necessary or if it is a security risk and you can Google that to read all about it. Bonjour is Apple’s multicast DNS protocol (mDNS) which allows FileMaker Server to broadcast its presence across your network for clients to pick up on. This is how the Local Hosts feature of FileMaker Pro works. Since we don’t want users to be able to discover our FileMaker Server but also don’t want FileMaker Server to log an error message and send us an email every time it starts up complaining about Bonjour not being installed, I’m going to install Bonjour and then later disable the Windows Firewall rules that apply to it.
After the Bonjour install you’ll pretty much be finished. The only thing left is to run the Deployment Wizard, which I’m not going to go through here.
And that’s all there is to it! Let me know in the comments below if you have any questions!
I was recently asked for some assistance in troubleshooting a FileMaker Server 15 installation issue where the user could connect to the FMServer_Sample file, but was not able to use the FileMaker client to upload databases.
They received a generic “Connection failed.” error as shown below:
The user had set up a Windows firewall exception for their own IP address that allowed all traffic through and we were able to use Wireshark to view that traffic was indeed reaching the FileMaker Server. We tried placing a file directly into the Databases folder on the server and were able to open and connect to that file just fine.
We were connected to the Admin Console on the server itself, so on a whim I asked, “Can you connect to the Admin Console from your workstation?” Turns out the answer was no, we received a 404 error trying to connect! I thought that was a bit odd so we took a look at IIS Manager and I noticed something right away — there was no sign of the URL Rewrite Module in IIS! I knew FileMaker Server used the rewrite rules for the Admin Console and a few other things like WebDirect, but wasn’t sure if it was used by the client itself (hint: it is). We installed the IIS URL Rewrite Module, try to “repair” the install and run the deployment wizard again, but were not able to get FileMaker to create the rewrite rules. I suggested the user uninstall and reinstall FileMaker Server, but that would have to wait until the next day.
In the meantime I fired up my Dev copy of FileMaker Server to test a few things out. I started by disabling all of the rewrite rules created by FileMaker and then re-enabling them one-by-one to try and figure out which rule was used to upload files. It didn’t take long until I found the offending rule; the “fmws” rule, as it turns out, is used to rewrite incoming database upload requests to the proper location.
Without this rule in place, the server didn’t know what to do with the request and simply rejected it. Now, some of you may be wondering why the IIS URL Rewrite Module wasn’t installed; doesn’t FileMaker Server install this during installation? Normally, yes, it does. In our environment however, servers rarely have access to the Internet, so the FileMaker Server installation is not able to download and install the ARR package, we have to do that manually. The user had installed ARR, but not the URL Rewrite module. I’ll have a post up in the next few days to detail installing FileMaker Server while being disconnected from the Internet.
At work we use the very handy FX.php library to develop sites in PHP with FileMaker as the backend. Due to an upcoming change in the way course numbers are represented in our student information system, I needed to ‘extend’ a found set in one of my models. From reading the FX.php documentation, I got the impression that it wasn’t possible to do using FX.php. So, I took a look at the official FileMaker documentation on Custom Web Publishing with XML to see if this was a limitation of FileMaker server, or just something that hadn’t made it into FX.php. What I came across was the ‘-findquery’ and ‘-query’ parameters which allow you to do a “compound find request” (so it is supported!). I couldn’t find anything about how to do this in the FX.php documentation, so I decided that I would take a look at the source code to see if it was there, and if not, make an attempt at adding it.
Turns out there is a function called FMFindQuery that is not in the FXFunctions documentation. It took some trial and error, but I was able to figure out how it worked and wanted to share what I learned. Here is a simple example of the use of FMFindQuery that is analogous to what I was trying to accomplish. According to the official CWP documentation, the ‘-query’ parameter is where you provide the query names and search criteria for your request. Each search request (or set of search requests) should be enclosed in parentheses. AND search requests should be separated by a comma (make sure there are no spaces between your commas, or it won’t work!). OR search requests are separated by semi-colons. You can perform an OMIT request by prefixing your request with an exclamation point like so !(q3). Here is an example:
This request would find all Pets where ‘PetName’ is ‘Spot’ AND ‘Breed’ is ‘Shiba Inu’ OR ‘PetName’ is ‘Spot’ AND ‘Breed’ is ‘Corgi’.
After figuring out how it all worked, I decided to fork the FX.php project on Github and add a section to the FXFunctions.rtf file about FMFindQuery(). Today, I got an email that my change had been merged back into the main FX.php repo. A small contribution, but it is my first contribution to open source software on Github!
I’ve never been to California before, so I’m excited to get the chance to travel there. And…it will be a great networking and professional development opportunity ;). Hopefully I’ll have some things to share on the blog when I get back!