In Sage CRM 2021 R2 and above, Exchange sync may fail every day after midnight.
The following error messages will appear in the syncActivityExchangeToCRM logs:
ERROR [http-nio-10001-exec-3]: DD-MON-YYYY HH:MM:SS java.nio.file.InvalidPathException: Illegal char < > at index 127: C:\Program Files (x86)\Sage\CRM\.....\Logs\Exchange Integration\User\....\'admin_syncActivityExchangeToCRM- .log
The root cause of the issue is the file pattern defined in log4j2.xml, which does not allow CRM to create a new logfile each day, and therefore Exchange sync fails.
We recommend one of the following workarounds
Workaround 1: Restarting Tomcat Daily.
Restarting Tomcat daily will resolve this issue by allowing CRM to generate new logs daily. You can schedule this process by following the below post.
Workaround 2: Changing pattern in Log4j2.xml file.
If restarting Tomcat daily is not a feasible workaround, another solution is to change the pattern of syncActivityExchangeToCRM.log in log4j2.xml file.
We have made an updated version of the log4j2.xml file available for download: https://community.sagecrm.com/partner_community/m/fixes_and_workarounds/28753.aspx
To implement this workaround, replace the existing version of log4j2.xml in <CRM INSTALL>\tomcat\webapps\<install_name>j\WEB-INF\classes with the updated version downloaded from the Community, and restart Tomcat for the change to take effect.
This should help you to resolve the issue.