Re: How to start scsmtp process automatically (531 Views)
Reply
Frequent Advisor
quanta223
Posts: 70
Registered: ‎06-27-2013
Message 1 of 5 (595 Views)
Accepted Solution

How to start scsmtp process automatically

Hi Friends,

 

Have a nice day!

I have a small question about scsmtp process in HP Service Manager. I have configured and setup the scsmtp. But everyday i have to start scsmtp manually. Is there any way to start it automatically?

Please find the content of my config files:

 

sm.ini:

# ServiceManager Initialization file
# (c) Copyright 2008 Hewlett-Packard Development Company, L.P.
# Configuration Modified Date:12/22/11 2:07 PM
shared_memory:64000000
log:../logs/sm.log
maxlogsize:90000000
numberoflogfiles:10
system:13080
#httpPort:13080
sslConnector:1
httpsPort:13443
sqldictionary:oracle10
[oracle10]
sqldb:SMADMIN
sqllogin:smadmin/smadmin
sqllibrary:sqoracle.oci10.DLL
plugin0:kmplugin.dll
groupbindaddress:172.22.27.202
threadsperprocess:50
sessiontimeout:6


ldapserver1:rbiadc04.rbi1.rbi.org.in
ldapserver2:rbiadc03.rbi1.rbi.org.in
ldapserver3:rbiadc05.rbi1.rbi.org.in
#ldapserver1:172.22.14.136
#ldapserver2:172.22.14.135
#ldapserver3:172.22.14.137
ldapsearchscope:0
ldapbinddn:rbi1\hpoveuser
#ldapbinddn:rbi1\syssecy
#ldapbinddn:CN=hpoveuser,CN=Users,DC=RBI1,DC=rbi,DC=org,DC=in
#ldapbinddn:CN=LDAPConnector,CN=Users,DC=RBI1,DC=rbi,DC=org,DC=in
#ldapbindpass:rbi@123
ldapbindpass:rbi@1234
ldapauthenticateonly
ldapnostrictlogin:1
ldapdisable:0
ldapstats:1

#$axces.debug.on=true



#RTM:4
#debughttp:1
#debugdbquery:999
KMSearchEngineClass:com.hp.ov.sm.server.plugins.knowledgemanagement.solr.KMSolrSearch



#RTM:3
#debugdbquery:999
#debughttp:1
#maxlogsize:524288000
#numberoflogfiles:7

#querySecurity:0

sm.cfg:

 

 #
# HP Service Manager Server Configuration File
#
# Used by HP Service Manager service on Windows and smstart script on Unix
# to start the Service Manager server processes.
#
######################################################################################
#
# Copyright 1994-2010 Hewlett-Packard Development Company, L.P.
# All Rights Reserved
#
######################################################################################

#
# start a Service Manager listener
#

#sm

sm -loadBalancer -httpPort:13080 -httpsPort:13081
sm -httpPort:13082 -httpsPort:13083
#sm -httpPort:13084 -httpsPort:13085
sm -httpPort:13084 -httpsPort:13085 -debugnode:1 -log:BSM.log


#
# start an SCAuto Listener for scsmtp
#

sm -scautolistener:12690


#
# make scsmtp an automated process when SM9 starts
#

#taskkill /IM scsmtp.exe
scsmtp.exe




# When unable to start the server as a service
# uncomment the following line to produce an output
# file which may contain some information from the
# Java JVM.
#cmd /c "sm" > C:\\process_stdout 2>&1



#
# start background schedulers
#

sm system.start

scsmtp.ini:

 

#########################################################################################################################
#scsmtp.ini                                                                                                             #
#                                                                                                                       #
#update the following parm:                                                                                             #
#smtpserver                      SMTP server hostname, no default.                                                      #
#                                                                                                                       #
#Optional parameters:                                                                                                   #
#server                          The ServiceCenter server hostname and listener port, default is localhost.12690        #
#smtpport                        SMTP port number, default is 25                                                        #
#smtpuser                        email address to be used in the "From" field for all email messages                    #
#                                default is to use the value from the email event (2nd value in evfields)               #
#smtp_cc                         email address(es) to be used in the "cc" field for all email messages, no default      #
#smtp_bcc                        email address(es) to be used in the "bcc" field for all email messages, no default     #
#clean                           1 = Remove "ServiceCenter Operator" and "SCenter_cc" from the email                    #
#                                0 = off (default)                                                                      #
#sleep                           Interval in seconds between queries for new email events                               #
#                                default is 10 seconds                                                                  #
#log                             File to log messages, default is scsmtp.log                                            #
#keepmail                        1 = Do not delete email event after processing                                         #
#                                0 = delete email event after processing (default)                                      #
#debug                           1 = Enable debugging mode mode (also turns on keepmail)                                #
#                                0 = Disabled (default)                                                                 #
#smtpdebug                       1 = Enable SMTP command debug mode                                                     #
#                                0 = Disabled (default)                                                                 #
#smtp_reconnect                  1 = Enable reconnect to the SMTP server if the connection is lost                      #
#                                0 = Disabled (default)                                                                 #
#smtp_numberof_retry_connect     Number of reconnect attempts before exiting                                            #
#                                0 = retry forever (default is 10)                                                      #
#smtp_reconnect_interval         Interval in seconds between reconnect attempts                                         #
#                                default is 60 seconds                                                                  #
#sc_reconnect                    1 = Enable reconnect to ServiceCenter 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.                                                              #
#sc_numberof_retry_connect       Number of reconnect attempts before exiting                                            #
#                                0 = retry forever (default is 10)                                                      #
#sc_reconnect_interval           Interval in seconds between reconnect attempts                                         #
#                                default is 60 seconds                                                                  #
#########################################################################################################################
smtpserver:10.35.1.17
server:localhost.12690
smtpport:25
smtpuser:ekuberhelpdesk@rbi.org.in
#smtp_cc:user@company.com
#smtp_bcc:user@company.com
#clean:1
#sleep:10
log:D:\Program Files (x86)\HP\Service Manager 9.30\Server\RUN\scsmtp.log
keepmail:0
debug:0
smtpdebug:1
smtp_reconnect:1
smtp_numberof_retry_connect:60
smtp_reconnect_interval:60
#sc_reconnect:1
sc_numberof_retry_connect:10
sc_reconnect_interval:60
#debug:1
#smtpdebug:1
#smtp_reconnect:1
#smtp_numberof_retry_connect:10
#smtp_reconnect_interval:60
#sc_reconnect:1
#sc_numberof_retry_connect:10
#sc_reconnect_interval:60

 

 

Regards,

Valued Contributor
uhyo
Posts: 399
Registered: ‎07-15-2003
Message 2 of 5 (581 Views)

Re: How to start scsmtp process automatically

Hi

 

I call scsmtp.bat in sm.cfg at last line.

scsmtp.bat do

1) sleep 60(ping localhost to 60 times with interval 1 sec)

2) scsmtp.exe

 

It's not support by HP, but I succecc to do it.

 

As you know scsmpt.exe is needed to connect SM and SMTP.

So I set sleep in scsmtp.bat.

 

scsmtp.bat puts RUN directory.

Frequent Advisor
quanta223
Posts: 70
Registered: ‎06-27-2013
Message 3 of 5 (561 Views)

Re: How to start scsmtp process automatically

Hi uhyo,

Thanks for your reply.
I 've created the batch file with the following content:
sleep 10
scsmtp.exe
Then but the scsmtp.ini and scsmtp.exe file in RUN folder of SM, also the scsmtp.bat file. Next, put the line scsmtp.bat in sm.cfg.

Please correct me if I miss something.

Regards,
Honored Contributor
Piku
Posts: 4,128
Registered: ‎06-17-2010
Message 4 of 5 (554 Views)

Re: How to start scsmtp process automatically

Hi,

You said that you have to start it manually , but why? is it getting down frequently ? If so, look for the log file for rootcause.

Also you can make any scheduler with desired .bat file , which will check status of scsmtp.exe every 5 minutes (or any desired interval) and will start it if found down. You have to read bat scripting for it (easy one). It will also add small overhead on system.

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
Valued Contributor
uhyo
Posts: 399
Registered: ‎07-15-2003
Message 5 of 5 (531 Views)

Re: How to start scsmtp process automatically

Is it enough to sleep 10 ?

 

The reason why I set sleep is waiting boot up and open port by SM.

It depends on the environment.

 

If scsmpt.bat is running correctly, you should wait for a long time.

 

Regards.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.