High Availability Installation

The Benefits of a JAMS Failover Scheduler

In many instances, it is beneficial to ensure a secondary Failover environment has been configured for the JAMS installation. The Failover ensures that there is a completely redundant instance of JAMS residing on a secondary server, often times offsite, relying on a heartbeat connection between the two.

By default, this heartbeat is set to a 60 second interval. In the event the Failover does not get a response from the Primary within 3 consecutive beats, the Failover will takeover as the Primary scheduler, ensuring that the schedule continues unharmed.
JAMS Failover Architecture
The JAMS Failover Architecture should consist of at least three servers:
  • JAMS Primary Scheduler Server
  • JAMS Failover Scheduler Server
  • JAMS Agent Server(s), where Jobs are run

In the event of a failure, the Failover Scheduler will take over for the Primary Scheduler, ensuring the schedule of Jobs remains intact. If Jobs are executing locally on the Primary Scheduler Server, a failure would result in the failure of all Jobs executing on the Scheduler server. Running Jobs on JAMS Agent Server(s) insulates those Jobs from Primary Scheduler Server failure. To further insulate the executing JAMS Jobs from server failure, the JAMS Agent can be configured in a cluster.


Installing and Configuring the JAMS Failover
  1. Note: An additional license will need to be purchased to install a Failover Server. Please contact your Account Manager for more details.
  2. Begin by stepping through the normal installation of the JAMS Primary Engine.
  3. For redundancy of the JAMS Database, you can configure AlwaysOn Availability (which replaced Database Mirroring as of SQL Server 2012), after completing these instructions.
  4. At this point, please be sure to stop the JAMS Scheduler service on the Primary Engine machine.
  5. Next, begin by installing the JAMS Scheduler on the second node; when prompted for the database server, specify the same SQL Server, Instance and Database Name identically to the Primary JAMS Engine. Upon hitting Next, a dialog will appear stating “Database already exists”. Be sure to select “Use Database.”
  6. As done on the Primary Server, stop the JAMS Scheduler service on the secondary server.
  7. Create/Edit a Failover.config file (sample is displayed below) in the <Root Install>\MVPSI\JAMS\Scheduler directory on the Primary server - by default: C:\Program Files\MVPSI\JAMS\Scheduler\
  8. Copy the completed Failover.config from the Primary Engine to the Secondary Failover server. Please ensure the Failover.config is identical on both servers.
  9. Next, start the JAMS Scheduler server on both the Primary and Failover machine.
  10. Lastly, if the Primary and Failover are sharing a database, it is necessary to add a user to the JAMS database to allow the Secondary engine to connect. This can be done by running the following SQL statements on the JAMS database (Note: Be sure to replace the login name with the machine name):


    exec sp_grantlogin @loginame='YourDomain\YourMachineName$'
    exec sp_grantdbaccess @loginame='YourDomain\YourMachineName$', @name_in_db='JAMSMachine2'
    exec sp_addrolemember @rolename='JAMSApp', @membername='JAMSMachine2'


Sample Failover.config



Common Log Output location

To have a common log output location on network share for both Primary and Secondary schedulers please see this article's solution.

Setting a common log output location for JAMS in a Failover Environment

Note: After configuring the Common Log Output location, ensure that the default log location exists on both Primary and Secondary schedulers.

JAMS in a DR Site

Installing JAMS in a completely separate Disaster Recovery site allows jobs to run in the event that the Primary JAMS Server and Database are lost. Note the following about DR:

  • The scheduler is installed on a completely separate server, and installed to its own database - the JAMS Services on the DR scheduler are left stopped.
  • The DR database is mirrored using SQL log shipping or mirroring services (also known as High Availability as of SQL 2012), and replication of the SQL DB takes place from Production to DR.

During a DR Scenario, the following must take place:

  • The Services on the Production scheduler must be brought down.
  • The direction of the Mirroring or Log Shipping must be switched to "DR to Production" from "Production to DR," this is handled within SQL itself.
  • The Failover table in the DR Database must be truncated to allow the DR Scheduler to gain control over its own Database.
  • The Scheduler will look to see if there is a JAMS GUID in the Failover table, and will not take control of the DB if another GUID is present.
  • The Services can be started on the DR Scheduler, and the DR Scheduler will pick up the execution of Jobs utilizing the replicated information in its own DB.


Also see:

How to grant permissions to the MSMQ service from a Secondary JAMS Scheduler

By granting access to MSMQ queues on each Scheduling Engine, jobs can be submitted transparently to the either the Primary or Secondary Engine.
Have more questions? Submit a request