ViPR SRM: Error "The string doesn't match the expected date/time format"
Summary: This article describes how to resolve a date/time format error in the VNX collection log. The error occurs when a file-side replication session has no Last Sync Time value.
Symptoms
If a file-side replication session does not have a "Last Sync Time" value, the VNX collection log contains error messages similar to the following:
SEVERE -- [2016-08-01 12:44:41 EDT] -- JDK14LoggerFactory$JDK14Logger::error(): Template processing error: "Error: on line 21, column 22 in vnxfile-nas-replicate.freemarker\nThe string doesn't match the expected date/time format. The string to parse was: \" EDT\". The expected format was: \"dd MMM yyyy HH:mm:ss zzz\"." Error: on line 21, column 22 in vnxfile-nas-replicate.freemarker The string doesn't match the expected date/time format. The string to parse was: " EDT". The expected format was: "dd MMM yyyy HH:mm:ss zzz".
Cause
A file-side replication session exists on the VNX system, but the session does not have a "Last Sync Time" value.
Resolution
To resolve this issur, modify the vnxfile-nas-replicate.freemarker file. The modified file checks that the lastSyncTime value is not null before the file performs calculations that use lastSyncTime. Perform the following steps:
-
Connect to the Collector host by using PuTTy or Remote Desktop Connection (RDC).
-
Navigate to the directory that contains the vnxfile-nas-replicate.freemarker file.
Linux command:
cd /opt/APG/Collecting/Stream-Collector/emc-vnx/conf/parsers/freemaker/vnxfile-nas-replicate.freemarker
Windows: Navigate to the following folder:
Program File\APG\Collecting\Stream-Collector\emc-vnx\conf\parsers\freemarker\vnxfile-nas-replicate.freemarker -
Create a backup copy of the vnxfile-nas-replicate.freemarker file.
Linux command:
cp vnxfile-nas-replicate.freemarker vnxfile-nas-replicate.org
Windows: Copy the vnxfile-nas-replicate.freemarker file. Rename the copy to "vnxfile-nas-replicate.org".
-
Open the vnxfile-nas-replicate.freemarker file by using vi (Linux) or Notepad (Windows). Edit the file as described below.
Locate the following lines in the original file. Only the relevant portion is shown.lastSyncTimeEpoch=${((lastSyncTime + " " + timeZone)?datetime("dd MMM yyyy HH:mm:ss zzz")?long / 1000)?floor?c} syncLag=${((.now?time?long - (lastSyncTime + " " + timeZone)?datetime("dd MMM yyyy HH:mm:ss zzz")?long) / 1000)?floor?c}Replace the original lines with the following lines:
<#-- Check that lastSyncTime is not null before proceeding; else do not create the context-keys --> <#if (lastSyncTime?has_content)> lastSyncTimeEpoch=${((lastSyncTime + " " + timeZone)?datetime("dd MMM yyyy HH:mm:ss zzz")?long / 1000)?floor?c} syncLag=${((.now?time?long - (lastSyncTime + " " + timeZone)?datetime("dd MMM yyyy HH:mm:ss zzz")?long) / 1000)?floor?c} <#else> </#if> -
Save the file.
-
Restart the emc-vnx collector-manager service by using one of the following methods:
- SRM GUI: Restart the emc-vnx collector-manager service from the SRM GUI.
- Linux: Run the following command on the Collector host:
/opt/APG/bin/manage-modules.sh service restart collector-manager emc-vnx
-
Monitor the VNX collection log. Verify that the date/time format error no longer appears.