UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Absent Member.
Absent Member.

SCSMTP stopping - not restarting - advice?

Put in a case with HP today...


Attached you will find todays sm.log, scsmtp.log, scsmtp.ini, sm.ini, and sm.cfg.


At 10:00:12 yesterday, scsmtp.exe got an error and was unable to recover.  The log shows:

09/21/2010 10:00:00   pid (5864)(2068) Sent email <evsysseq=0000000000305784> to <Tim.Beatty@nscorp.com>

09/21/2010 10:00:12   pid (5864)(2068) Error connecting to SMTP server <mailhub.nscorp.com> on port <25>

09/21/2010 10:00:12   pid (5864)(2068) Error: 102 - Hostname lookup failed

09/21/2010 10:00:12   pid (5864)(2068) Network error while sending email <evsysseq=0000000000305785> to <Kimmy.Solomon@nscorp.com>

09/21/2010 10:00:12   pid (5864)(2068) Terminating....

09/21/2010 10:00:12   pid (5864)(2068) Terminated.


We have set the scsmtp.ini as sc_reconnect:0 since the comments in scsmtp.ini state this value should be 0 if starting scsmtp.exe from sm.cfg.



1 = Enable reconnect to SC if the connection is lost

0 = Disabled (default) Enabling this option is NOT recommended if SCSMTP is started from the SC.CFG file because SCSMTP will go into a reconnect loop when ServiceCenter is shutdown and the connection is lost. When ServiceCenter is restarted, you would have multiple SCSMTP processes running."


Our options at this point are few. 

a. We can cycle the SM service.  This requires an outage for all SM users.

b. We can cycle the SM server.   This requires an outage for all SM users.

c. We can log into the server and from the command line start scsmtp.exe.  However, we cannot log out.



1. I need a way to start scsmtp without cycling anything. 

2.Is there a better way to start scsmtp than from sm.cfg?  Can it be started like other internal tasks to sm (like inactivity timer)?

3. Request an enhancement for scsmtp to wait/retry after an error before terminating.




 Anyone have experience with this issue?




Tags (3)
11 Replies
Fleet Admiral Fleet Admiral
Fleet Admiral

Well, if you have the "us.launch.external.NEW" RAD application, you can get a little tricky and start up scsmtp from inside Service Manager.


I found this works well on any node set to debug, because then you know what server you're connecting to and you can set up the other parts you need to make this work.


So, what I did is create a batch file on the C: drive of the primary app server for Service Manager.  I called the file scsmtp.bat, and it contained the following:




cd e:\Program Files\HP\Service Manager 7.11\Server\scsmtp





Then, using the us.launch.external.NEW RAD application, you can create a wizard/script that calls the RAD application with the following:



$boolean1=val("false", 4)


RAD Application: us.launch.external.NEW

Parameter Names | Parameter Values

name | $name

boolean1 | $boolean1



Then, whenever your SCEMAIL user is not connected, run the script/wizard to start it back up.



If you want to get _really_ fancy, you could build something that periodically checks to see if SCEMAIL is connected, and, if it isn't, trigger the script automatically, but I don't know if you want to go that far.


EDIT:  had a typo in the bat file... changed scsmpt.exe to scsmtp.exe

Absent Member.
Absent Member.

Run that way, do you see it in Windows Services or in HPSM status?



Fleet Admiral Fleet Admiral
Fleet Admiral


Fleet Admiral Fleet Admiral
Fleet Admiral

So here's what I did for fun... I wrote a javascript which will check the running Processes to see if SCEmail is logged in, and, if it isn't will run that batch job to start the process.  I haven't tested this in Production or a horizontally scaled environment, but it works in my Dev environment.


Add the following to your ScriptLibrary

ScriptName: Processes


function CheckOn(name){
 var Processes = system.functions.processes("user")
 for (i=0;i<system.functions.lng(Processes);i++){
  var A = system.functions.str(Processes[i])
  var A = system.functions.strrep(A, "{", "")
  var A = system.functions.strrep(A, "}", "")
  var A = system.functions.strrep(A, "[", "")
  var A = system.functions.strrep(A, "]", "")
  var B = new Array
  B = A.split(",")
  var C=B[3].replace(/\"/g,"")
  if (C==" "+name){
   return true
 return false

function SCEmail(){
 var IsOn = system.library.Processes.CheckOn("SCEMAIL")
 if (IsOn != true){
  var RetCode
  var File = "C:\\scsmtp.bat"
  system.functions.rtecall("callrad", RetCode, "us.launch.external.NEW", ["name", "boolean1"], [File, false], false)



Then, create a schedule record of class "problem" like the following:

Name: Restart SCSMTP

Class: problem


Runs a Javascript to check on the SCEMAIL process and restarts it if stopped.

Repeat Interval -

Other: 00:05:00

Javascript -




Every 5 minutes, the job will run, check the proceses, and run the batch file to start the SCEmail connection.

Absent Member.
Absent Member.

I am currently 7.10app/7.11.228rte and do not have us.launch.external.NEW.


Do I have to ask support for us.launch.external.NEW? Or does it come with 7.11app or 9.20app?

Fleet Admiral Fleet Admiral
Fleet Admiral

Don't know if it comes with a particular version - I had to ask for it. 

Absent Member.
Absent Member.

Consider changing the way scsmtp is started in order to take advantage of the sc_reconnect parameter.


Running transient commands (e.g. processes() function or sm -reportlocks) on a regular basis is not recommended in a horizontally-scaled environment. These commands create a significant load on the Jgroups communication (information passed between servlets). This can lead to performance issues, hanging problems, and might expose software defects depending on the version of Service Manager.


KB Article with download links for us.launch.external.NEW:




Absent Member.
Absent Member.

Is us.launch.external.NEW supported in 9.20/9.21?  I'd hate to get dependant on it just to have it yanked out.

Absent Member.. Absent Member..
Absent Member..

I am working on adding this to our Service Manager implemenation and am wondering...


What are the reasons behing pointing the Javascript to the bat file to start scsmtp.exe instead of diirectly to the scsmtp.exe in the RUN directory? 

Absent Member.. Absent Member..
Absent Member..

I've got this working so a schedule runs every 30 minutes to check for SCEMAIL in System Status.  If it's not found, it uses the us.launch.external.NEW to restart scsmtp.exe.  It works great.


Now I have the need to stop/start SCEMAIL during time change.  I can't figure out how to terminate the SCEMAIL process from System Status if it is running.  Any suggestions?

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.