Errors occurring for Remote events over TCP
References
A great tool from Paul Smith when throubleshooting Remote eventsListen to the logger "EPiServer.Events"
EPiServerLog.config
<logger name="EPiServer.Events">
<level value="debug" />
</logger>
You should look for
EPiServer.Events.Remote.RemoteEventsManager.RaiseEvent
on the backend server sending the event and on the front end server
EPiServer.Events.Remote.RemoteEventsManager.ReceiveEvent
when receiving the event and
EPiServer.Events.Remote.EventReplicationWCFProviders.GetEndPoints
to list all opened endpoints from the server
Example
To examine all send and recived events (with cygwin)
grep 9484e34b-b419-4e59-8fd5-3277668a7fce * | grep ReceiveEvent
grep 9484e34b-b419-4e59-8fd5-3277668a7fce * | grep RaiseEvent
grep "Could not connect to" * | sed -e "s/The connection attempt.*//g" | sort | uniq -c | sort
It takes long time to update remote servers
The remote events are handles synchronously and if one server gets a time out it going to delay every each server. To fix this set a smaller time out value for the binding
Example
<netTcpBinding>
<binding name="RemoteEventsBinding"
openTimeout="00:00:05"
sendTimeout="00:00:05">
<security mode="None" />
</binding>
</netTcpBinding>
The error "Port already in use"
This happens when you trying to open up the same port on the same machine (for example multisite installations where you have to sense all the sites are going to use the same web.config). To solve this enable “port sharing”.
Example
<configuration>
...
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="RemoteEventsBinding" portSharingEnabled="true">
TCP error code 10061: No connection could be made because the target machine actively refused it
When getting messages simulate to this in the EPiServer log
The connection attempt lasted for a time span of 00:00:01.0618064. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:13000
You can increase the time out (on this configuration 1 second).
All clients has to be up and running
If not all client can be connected, WCF are going to not deliver packages.