I have setup JMS in SDL Web 8.5 to synchronize the cache for both the Staging and Live targets. The microservices for both Staging and Live are installed on the same machine. There is one Apache MQ server installed with one topic (Tridion) and 2 values (TridionCcsLive and TridionCcsLive).
When publishing new content, only the content on Staging is updated and not on live.
It appears that only the first deployer service which is started is able to send invalidation messages and to invalidate the content. The second deployer which is started is not able to sent invalidation messages.
When looking in the cd_core.log from the Live deployer service the following errors are logged:
2018-02-23 12:28:29,374 ERROR StepActor - Step 'PageDeploy' for 'tcm:0-
581874-66560' can NOT retry
2018-02-23 12:28:29,374 ERROR StepActor - Step 'PageDeploy' for 'tcm:0-
581874-66560':
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'cacheConfigurationLoader': Invocation of init method
failed; nested exception is
com.tridion.configuration.ConfigurationException: Unable to construct
CacheChannel
And
Caused by: java.rmi.server.ExportException: Port already in use: 0; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
I have used the following connection string for Live:
<RemoteSynchronization FlushCacheDuringDisconnectInterval="20000" Queuesize="5120" ServiceMonitorInterval="10000">
<Connector Class="com.tridion.cache.JMSCacheChannelConnector" Strategy="AsyncJMS11MDB" Topic="Tridion">
<JndiContext>
<Property Name="java.naming.factory.initial" Value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
<Property Name="java.naming.provider.url" Value="tcp://localhost:61616?soTimeout=5000"/>
<Property Name="topic.Tridion" Value="TridionCcsLive"/>
</JndiContext>
</Connector>
</RemoteSynchronization>
And the following string for Staging:
<RemoteSynchronization FlushCacheDuringDisconnectInterval="20000" Queuesize="5120" ServiceMonitorInterval="10000">
<Connector Class="com.tridion.cache.JMSCacheChannelConnector" Strategy="AsyncJMS11MDB" Topic="Tridion">
<JndiContext>
<Property Name="java.naming.factory.initial" Value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
<Property Name="java.naming.provider.url" Value="tcp://localhost:61616?soTimeout=5000"/>
<Property Name="topic.Tridion" Value="TridionCcsStaging"/>
</JndiContext>
</Connector>
</RemoteSynchronization>
Addtional errors logged in cd_core.log. It looks like it is starting the RMI Cachechannel as well
018-02-23 11:40:19,142 TRACE ParentLastClassLoader - Loading class: com.tridion.cache.CacheChannelConnector using ServiceLoader
2018-02-23 11:40:19,142 TRACE ParentLastClassLoader - Class: java.rmi.RemoteException is excluded 2018-02-23 11:40:19,158 TRACE ParentLastClassLoader - Loading class: com.tridion.cache.CacheChannel_Stub using ServiceLoader 2018-02-23 11:40:19,158 TRACE ParentLastClassLoader - Could not find class: com.tridion.cache.CacheChannel_Stub in ServiceLoader 2018-02-23 11:40:19,158 TRACE ParentLastClassLoader - Loading class: com.tridion.cache.CacheEvent using ServiceLoader 2018-02-23 11:40:19,158 INFO TridionRMISocketFactory - TridionRMISocketFactory.createServerSocket: Called with port '0' 2018-02-23 11:40:19,158 INFO TridionRMISocketFactory - TridionRMISocketFactory.createServerSocket: Overriding server socket to port '1050' 2018-02-23 11:40:19,158 TRACE ParentLastClassLoader - Class: java.net.ServerSocket is excluded
Any ideas how to resolve this?