When upgrading from Appian version 17.4 or earlier to Appian 18.1 or later, the following error may be seen in the application server logs concerning an Invalid Shard Id Assignment:
HH:MM:SS.mmm INFO [stdout] (Appian MultithreadedMapper - 1) YYYY-MM-DD HH:MM:SS.mmm [Appian MultithreadedMapper - 1] ERROR com.appiancorp.kougar.driver.ipc.IpcConnection - Could not initialize engine: [process-analytics1:Socket[addr=server01.dev.appian.com/126.96.36.199,port=5020,localport=51307],in,out,RW,LittleEndian (read), offset=29]HH:MM:SS.mmm INFO [stdout] (Appian MultithreadedMapper - 1) com.appiancorp.kougar.driver.exceptions.Signal: InvalidShardIdAssignment
End users may also see that all or certain sets of user tasks are no longer visible in the Appian environment.This may also occur in a new installation of Appian 18.1 or above.
The application server and engines are unable to communicate correctly. This is frequently caused by a misconfiguration in the appian-topology.xml or a mismatch with the hostname configured on the server.
The hostname or IP address for each engine must match what is listed in the appian-topology.xml file configurations. This is particularly important for the execution and analytics engines, as they match their local information with the entries in the appian-topology.xml file on startup in order to determine which shard (engine id) they are (execution and analytics engines come in pairs in Appian and usually have 3 or more pairs running in an environment). If the shard values do not match, then the engine will fail to identify itself properly and result in the output above.
First, ensure that the hostname of the server running the Appian engines on matches the hostname value present in the appian-topology.xml file. If not, then the topology file must match the server hostname. If the server has more than one valid hostname for the machine, then the hostname being used in the appian-toplogy.xml file must be the top, first most entry in the OS hosts file.
This will allow the Appian execution and analytics engines to communicate properly, detect their valid shard id, and propagate data between each other successfully.
Second, in a distributed environment, ensure the hostname matches in every instance of the appian-topology.xml and ensure the hostname is resolved correctly on all nodes. If the issue persists or there are constraints that prevent the hostname being resolved correctly from all nodes, update the appian-topology.xml file to use the server IP instead of the hostname.
This article applies to Appian 18.1 and later.
Last Reviewed: February 2019
© 2021 Appian. All rights reserved.