When performing Spectrum NCM backups we are receiving this error message "SPC-OCC-10170: Unable to process. Device configuration data contains special characters"

Document ID : KB000092584
Last Modified Date : 20/04/2018
Show Technical Document Details
Question:
When performing Spectrum NCM backups we are receiving this error message "SPC-OCC-10170: Unable to process. Device configuration data contains special characters" and the backup fails.  How can I find and fix this problem?
 
Environment:
Spectrum 10.0.x
Spectrum 10.1.x
Spectrum 10.2.x
Answer:
This problem could be related to country specific accented characters but it could also come from hidden characters that may have been unknowingly introduced into a device config through cut and paste from a document source.  Here is a way to find hidden or accented characters to locate your problem.


1.    Enable NCM debug by editing the config.xml file located in $SPECROOT/NCM and change
    <debugging type="java.lang.String">off</debugging>
    To
    <debugging type="java.lang.String">max</debugging>

2.    Perform a capture on the same device that failed and when the same error appears disable the debug from step 1 and locate the debug file in $SPECROOT/NCM/logs/debug directory.

3.    Copy the debug file into a temporary directory and rename it to something simple such as before.txt.

4.    From a bash shell run the following command:

    tr -c -d '\11\12\15\40-\176' < input file > output file
 
    With the idea being
 
    octal 11: tab
    octal 12: linefeed
    octal 15: carriage return
    octal 40 through octal 176: all the "good" keyboard characters

    Example:
    tr -c -d '\11\12\15\40-\176'< before.txt > fixed.txt

    This provided me with a fixed.txt file with all of the illegal characters stripped out.

5.    Using a program such as Notepad++ with the macro compare, run a compare check between the before.txt and the fixed.txt file.  The compare macro will show the difference to include the hidden characters.

6.    Once the illegal or hidden characters are located, you will need to manually make changes to the devices config by either copy and pasted the corrected line from the fixed.txt file or carefully retyping the line in so that the hidden or illegal characters are not    reintroduced.

7.    Run another NCM capture, the capture should now be successful.