Automation Server
On this page
The Automation Server is the Windows service that performs Alloy Navigator's background work: the scheduled jobs, the outgoing notification queue, server-side external commands, the daily purge of old history, and the licensing beacon and full-text search activation. The Windows Services console lists it as Alloy Automation Server, with the description "Performs automated tasks for Alloy Navigator".
You check the service's state in the Settings App and in the Automation Server Manager, and you start, stop, and restart it on its own computer, in the Automation Server Manager. Neither the Settings App's Automation Server pages nor the Admin Center has a command to start, stop, or restart it. The jobs the service runs are described in Jobs and Schedules; setting up the service after installation is described in Configure the Automation Server.
In the Automation Server Manager
The Automation Server Manager shows and controls the Automation Server of the computer it runs on. Open it from the Alloy Control Panel, or double-click the Automation Server icon in the Settings App's status bar. The Alloy Control Panel lists the manager when its program file is present on the computer. Setting up the service in the manager, including its startup account, its Database Access Key and database connection, and the connection test, is described in Configure the Automation Server.
The manager's window shows:
- Startup account: the Windows account the service runs under.
- Connection: Key:, the name of the imported Database Access Key or "N/A", SQL Server:, and Database:.
- Registered as: Primary, Failover, or Not registered.
- A status line and the Start, Stop, Restart, Test Connection, and Apply buttons.
If no key is stored when the manager starts, it shows "Unable to find a valid Database Access Key. Please import your Database Access Key before configuring the Automation Server." and opens the key import. When the database version does not match the manager's own, the manager shows an error that names both versions and does not open the connection.
Check the service's status
The status line reads:
| Status line | When |
|---|---|
| "Automation Server" and the database status | The service runs and the database reports it running. |
| "Running with Errors (<status>)" | The service runs, but the database does not report it running. |
| "Running with Errors (Not registered)" | The service is not stopped, but the computer is not registered. |
| The Windows state of the service | Any other case. |
| "database access error" | The manager cannot read the database, for example because no key is stored. |
| "Automation Server is not installed" | The service is not installed. |
Press F5 to refresh the status line.
Start, stop, or restart the service
In the Automation Server Manager, click Start, Stop, or Restart:
- Start is enabled when the service is stopped. For a paused service, it reads Resume.
- Stop is enabled when the service is started, stopping, or paused.
- Restart is enabled when the service is started or paused.
When you start the service, the manager asks the service for its state and reports success, or lists what it found under "The Automation Server has started with the following error:": "Database connection failure:", gaps in the outgoing mail settings, and configuration warnings.
The manager has no Pause command.
Start and Restart first open the connection and register the computer, and save the server and the database when something has changed. With no key imported, they show "No information about database connection provided. You need to obtain and import the database access key."
After an upgrade or a move to another database, bring the service up with Import Key..., then Test Connection, then Start. The service joins the database only when its version matches.
In the Settings App
Check the service's status
The Settings App shows the state of the Automation Server in two places. Both come from the database, not from Windows:
- The Job List page of the Automation Server manager is headed Host:, Status:, and Version:. Status: reads "Running", "Offline", or "<not registered>", and Host: and Version: read "N/A" when no Automation Server is registered. The values are those of the active server, or of the primary server when none is active. Refresh reads them again.
- The status bar of the main window carries an Automation Server icon. Point to it to see "The Automation Server is running on <host>." or "The Automation Server is not running." Double-click it to open the Automation Server Manager. The Settings App reads the icon's state again on a timer and after Set as Primary.
When the Settings App starts with a valid license and finds no running Automation Server, it shows "Some Alloy Navigator features will be unavailable because an Automation Server instance was not found." with OK and Help. A stopped service, a service that cannot reach the database, and a server that was never registered all raise this message.
Startup account messages when you test a job
The product does not check the Automation Server startup account's rights in advance. It does not check whether the account belongs to the local Administrators group, and it does not refuse the Local System account. When the Settings App tests a job that runs a tool under another Windows account, it reports the outcome of the launch:
- When Windows refuses the launch because a privilege is not held: "The Automation Server cannot run the <tool> under the specified Windows account. Make sure that the Automation Server startup account belongs to the local Administrators group on the Automation Server computer. For details, click Help." For the Mail Connector, the message reads "Profile account" instead of "Windows account".
- When the logon type is not granted: a message that the account needs the "Log on as a batch job" user right.
- When the logon fails: "The Automation Server cannot run the <tool> under the specified Windows account."
You set the startup account in the Automation Server Manager; see Configure the Automation Server.
For the jobs on the Job List page, see Jobs and Schedules.
Manage High Availability Mode
The High Availability Mode page lists every registered Automation Server. It appears under Services > Automation Server > High Availability Mode, for an administrator who holds the Settings App's right to the Automation Server service, once two or more servers are registered. The Settings App checks the number of servers when it builds the navigation tree and when you refresh the main window. In Alloy Navigator Cloud, the Settings App does not show the page, whatever the number of registered servers; see Administering Alloy Navigator Cloud.
The page reads "High availability mode ensures your system remains operational even if the primary Automation Server instance becomes unavailable." By default, its grid shows each server's host name, whether it is primary, its status, its last report to the database, and its version. The toolbar holds Delete, Set as Primary, and Refresh; the page has no command to add a server.
To make another server the primary one:
- Go to Services > Automation Server > High Availability Mode.
- Select the server and click Set as Primary, on the toolbar or in the right-click menu. The command is enabled for one selected server that is not primary yet.
- If the selected server is offline, the Settings App warns "This server is offline. If it is not started, then another running server will become the active server." and asks "Continue?". Click Yes to go on; No stops without a change. A running server gets no prompt.
The selected server becomes primary, and every other server stops being primary. The Settings App refreshes the list and its status bar icon. The servers switch the active role at their next check, within a minute; a new primary server waits two minutes while the old one is still active.
To remove the registration of a server, select it and click Delete. The command is enabled only when the list holds more than one server and the selected server is neither primary nor running. The registration of a running server is refused with "You cannot delete the registration of a running Automation Server."
In the Admin Center
The Admin Center has no command to start, stop, or restart the Automation Server. Its Automation Server page, one of the services pages, has no tabs: the list of jobs is shown directly under the page header, and the list has no New button. The page has its own permission; see Permissions Reference.
In the Admin Center's job lists, Run is available only for one selected job and only while an Automation Server is active; Terminate also needs the job's last run to be still executing. When you run or terminate a job in the Admin Center, the request waits in the database until the service next refreshes its job information, so it can take effect up to one refresh interval later; the same request made in the Settings App reaches the service at once. A job queued this way shows "Queued to run as soon as possible" or "Queued for forced termination" in its Next Run column. See Jobs and Schedules.
What the Automation Server runs
| Work | When | How |
|---|---|---|
| Scheduled jobs of three kinds: triggers, recurring objects, and tool jobs | By each job's schedule | Triggers and recurring objects run inside the service. Each run of a tool job starts a separate program and waits for it to exit. |
| Outgoing notification queue | At the queue-check interval | One sending thread for e-mail and one for push messages. |
| Server-side external commands | Every 10 seconds | Commands queued by workflow run on the server. |
| History purge | Once a calendar day, and once at start | Removes old entries by each log's retention setting. |
| Licensing beacon and full-text search activation | Started when the service becomes active | Background workers of the service. |
Only the scheduled jobs appear in the job list; the other four kinds of work have no job of their own.
Scheduled jobs. A trigger runs one at a time with all other workflow work of the service, and a recurring object runs one at a time with other recurring objects. Each tool job has one run at a time, while different tool jobs run in parallel. When a tool job's program ends with an error code, the service writes the error to the tool's log and marks the run as failed. Only a Mail Connector job can run under a Windows account of its own. A job that was due while the service was down runs once, out of schedule, as soon as the service is active again, and that run is recorded in its log. A run that took longer than its interval does not build up a backlog of missed runs.
Notifications. Because e-mail and push messages are sent by separate threads, a slow mail server delays only e-mail. A sending pass takes messages that have never failed first, so a message that keeps failing does not hold back newer ones. When only failed messages remain, they wait for the next start of the service or for a manual send. While the notification queue is paused, the service sends nothing from it. See Notifications Overview.
External commands. An external-command operation that workflow runs on the server is queued, and the service launches the queued commands every 10 seconds. A command that fails to launch leaves no trace in the queue. See Operations Reference.
History purge. Once a day the service removes old entries from the workflow log, the system log, the session logs of each tool, the user session log, the deleted objects log, and the portal search log, each by its own retention setting. A purge that fails is logged, and that pass ends. See Logs.
Configuration changes. The service checks for changed configuration once a minute. A job added, changed, or removed in the Settings App takes effect at once. An edited workflow action can still run in its old form on the Automation Server for up to a minute.
How the service starts
The service builds its list of scheduled jobs once, when it becomes active, and updates it from then on. When a service starts but does nothing, the order of start-up helps you find the step that failed:
- The service reads its connection settings.
- It connects to the database and registers itself. A failed connection is written to the Windows event log and retried: five times at 60 seconds, five times at 10 minutes, then every hour.
- It purges old history.
- It sends the queued notifications, including messages that failed before.
- It builds the job list. Each schedule resumes from the job's previous run rather than starting over.
- It starts the timer for external commands and the licensing beacon worker.
- It opens its control channel, and then starts full-text search activation.
The service writes the outcome of its start, a failed connection or a successful start, to the Windows event log.
The service connects only to a database whose version and upgrade state match its own. On a mismatch it writes one fatal entry to its log, closes the connection, and keeps retrying on the connection interval; the service does not exit.
Registration, status, and failover
Every Automation Server registers itself in the Alloy Navigator database with its host name and version. An additional Automation Server must be registered with the Automation Server Manager's registration wizard first; an unregistered one does not connect. A running service reports to the database about once a minute, and it counts as running while its last report is less than two minutes old. Its status is Running (Active), Running (Failover), or Offline.
The status comes from the database, not from Windows. A service that runs but cannot reach the database shows as offline.
If its registration is removed while the service runs, the service logs "The Automation Server registration has been removed or replaced" and stops. Two minutes in a row without a successful report also make an active server stop working as the active one.
Several Automation Servers can be installed against one database, and exactly one of them works at a time. The primary server is your choice of which one should work; the active server is the one that is working. Each server re-evaluates its role every minute:
- A server that is not primary takes over only when no other registered server is active and running, and it steps down as soon as one is.
- The primary server takes over at once, or waits two minutes when another server is still active or it is itself still marked active.
- When there is no primary server, or more than one, the service logs an error and makes the first server by host name the primary one. The error for more than one primary server is written to the Windows event log.
You choose the primary server on the High Availability Mode page of the Settings App.
Related topics
- Jobs and Schedules - the jobs the Automation Server runs and their schedules.
- Configure the Automation Server - set up the service after installation.