KB-1823 Unable to start the application server after an upgrade due to Invalid Security Token


During an Appian upgrade, the application server is unable to start and the following error appears on the application server log:

ERROR com.appiancorp.kougar.driver.ipc.IpcConnection - Unexpected exception while handling message for personalization (localhost:5012)
com.appiancorp.kougar.driver.exceptions.TcpException: java.io.EOFException: Socket returned no more data at end of stream


com.appiancorp.kougar.driver.exceptions.SafeRetryException: Unable to acquire a Read connection. Safe to retry.
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147)
... 71 more

In the service_manager.log file located at <APPIAN_HOME>/logs/, the following warning is present:

com.appian.komodo.gateway.handler.codec.SecurityTokenDecoder - Invalid Security Token.


This error appears when the security token has been modified or deleted during the upgrade. In particular, it happens when the security token has been changed after starting Service Manager, causing the engines to refuse the connection with the application server. The following documentation provides additional details about the security token.


If this occurs during the upgrade, stop all the components and copy the security token from the backup folder to the correct directory in the new installation folder. The security token should be in the <APPIAN_HOME>/conf/ directory for Appian 18.2 and later or in the <APPIAN_HOME>/ear/suite.ear/conf/ directory for Appian version 18.1 and earlier.
If a backup does not exist, it is also possible to generate a new security token, as mentioned in the documentation.
Note: For distributed environments, the security token must match across all servers in the environment. This is further explained in this documentation

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: December 2018