Spectrum AlarmNotifier fails to execute SetScript
search cancel

Spectrum AlarmNotifier fails to execute SetScript


Article ID: 186890


Updated On:


CA Spectrum CA eHealth


We upgraded our test system to 10.4.1 and SANM failed to execute custom script.

As per the NOTIFIER.OUT, the problem is on SetScript_orig2 file

D:/CA/Spectrum/NotifierCustomScript/SetScript_orig2: line 1: #!/bin/sh: No such file or directory


Release : 10.4.1

Component : Spectrum Core / SpectroSERVER


The line 1: #!/bin/sh, is commented, so it is strange that this particular line appears as causing a problem on the parsing.

A possible cause is the encoding used in the file is different than UTF-8 (Windows) or us-ascii (Linux), hence AlarmNotifier is not able to process it.


 To resolve the problem, check the encoding of the file

1. In Windows a simple method is opening the file with Notepad. Then Select File->Save As...

2. In Linux, you may use: file -i <path_to_the_file>

[spectrum@spectrumrh]# file -i SetScript_custom
SetScript_custom: text/x-shellscript; charset=utf-8

To change the encoding of a file

1. In Windows, you may open the file in Notepad as before, select File->Save As..., and save the file selecting UTF-8 as the encoding, before to press Save.

2. In Linux, you may use iconv: iconv -f utf-8 -t us-ascii//TRANSLIT SetScript_custom -o SetScript_custom2
    You may find examples of using iconv in next URL: https://www.tecmint.com/convert-files-to-utf-8-encoding-in-linux/

After change the encoding of the file, it may be necessary to review its content, in case the conversion added some strange characters.