Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: catanirex on November 30, 2007, 03:32:01 PM

Title: SCI and Tomcat 5.5 running as a windows service?
Post by: catanirex on November 30, 2007, 03:32:01 PM
Hi,

Anybody that successfully have configured Tomcat 5.5 (running as a windows service) in Genesys CME 7.5, so that Tomcat can be both monitored in SCI and started/stopped?

I have tried with the section start_stop on Annex tab (with options start_command=net start Tomcat5 and stop_command=net stop Tomcat5). This gives me error messages from the OS:  OS Error=5. Access is denied.
This usually works good with third party applications.


I would like to be able to both monitor status in SCI, and start/stop it.

Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: René on December 03, 2007, 11:33:57 AM
Hi,

I've tried it using Genesys CME 7.2 and SCS 7.1 and it works. I was able to reproduce the error "OS Error=5" by a mistake only - creating the section "start_stop" on Options tab instead of Annex tab.

Could you post here the log of LCA?

René
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: catanirex on December 03, 2007, 03:39:39 PM
Hi,

Thank you for your interest :-)

I will attach a zipped document with some screen shots of configuration and LCA log.

Hope you see whats wrong!
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: catanirex on December 03, 2007, 04:09:21 PM
Update:

Solved it by creating a new application of Third Part Server in CME... realised that this Tomcat was of another application type.

I guess that WFM Web is not possible to start/stop/monitor through SCI...
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: Luk on April 17, 2008, 03:42:55 PM
[quote author=catanirex link=topic=2623.msg10263#msg10263 date=1196698161]
Update:

Solved it by creating a new application of Third Part Server in CME... realised that this Tomcat was of another application type.

I guess that WFM Web is not possible to start/stop/monitor through SCI...
[/quote]

Hey,
I'm trying to achieve the same thing. I have created an Application object in CME of type Third Party Server and I am able to start the Tomcat5.5 server as a service. Unfortunately, the status is not updated in SCI.
Do you know how to do that as well? Or anybody else  ???

Thanks a lot in advance!
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: catanirex on April 17, 2008, 05:21:51 PM
Check working directory and command line on the application object in CME. Look at my screen shots in the previous message

LCA must also be running on the host.
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: Luk on April 18, 2008, 08:12:50 AM
Hey, Thank you for your quick answer!!

I attached screenshots of my CME application object as well. I tried a few things with the Command Line field but without success. Did you configure anything on the Options tab? I didn't. And on the Annex tab I only have the start_stop section.
By the way, what did you use as Application Template? I created one myself with nothing specified on Options tab or Annex tab.
Hope you can help me...

Cheers, Luk
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: René on April 18, 2008, 09:16:49 AM
Luk,

Your configuration in CME is wrong. It's necessary to split command line and command line arguments. Correct configuration is:

- Command line: C:\ApacheTomcat5_5\bin\tomcat5.exe
- Command Line Arguments: //RS//"Apache Tomcat" [i](<-- check that the parameters correspond to your service configuration - only part visible on the screenshot)[/i]

Let do this change and try. If not working then I would change type of your application to "Third Party Server".

R.
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: Luk on April 18, 2008, 10:16:54 AM
Hello Rene, Catanirex and others,

AHAAA.  I found the solution. It is a nasty one!!! Really nasty!
It was not crucial to put the command line arguments in the other box. The error was that I had "Apache Tomcat" as the service name while it had to be "Tomcat5"!!!
How did I discover this? Well, from what I found online I understood that I had to put the service name behind //RS//... but the nasty thing is that this is not the Name as it appears on the Services panel of your server. What you see there is the DISPLAY name, so that's quite confusing! If you double-click the service, it becomes clear. On the General tab it first says Service name (that's the one you need to put in CME) and then it says Display name (that's the one that shows on the services panel of your server).

So, in brief the solution for this thread:
- Application Type: Third Party Server (I had this from the start)
- Command line: C:\ApacheTomcat5_5\bin\tomcat5.exe
- Command Line Arguments: //RS//Tomcat5 (<--- the Name of the service, NOT the DISPLAY name)
- create a section "start_stop" on the Annex tab with 2 subsections
    start_command = net start "Apache Tomcat"
    stop_command = net stop "Apache Tomcat"

As you can see from the latter, it is allowed to use the DISPLAY name in the net start and net stop statements...

Hope this is usefull for others, it is for me!!!
Thank's to everyone who contributed to this solution

Cheers, Luk
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: anandtadimalla on August 19, 2011, 03:43:50 PM
hi,
    how to monitor tomcat using SCI in Linux. i've followed same steps as in windows but, am not able to start or stop the Tomcat application.

Regards,
AT
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: fnunezsa on August 20, 2011, 12:42:26 AM
You just has to be sure that you're start_command is exactly the same as the output for the "ps -ef | grep catalina" in Linux. For example, your start_command should be something like "/bin/sh /opt/Tomcat/bin/catalina.sh start" assuming Tomcat is installed in /opt/Tomcat
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: anandtadimalla on August 20, 2011, 08:37:23 AM
Thanks for the prompt response fnunezsa...

but, still din't solved.
when i start the Tomcat application from SCI...it's trying to start the application...initializing....pending...and then getting stopped. but, when i check the same in linux server using "ps -ef|grep catalina" catalina is started.
the issue may be with SCI... b'coz on server tomcat is started, but SCI is not able to show the correct status.

these are the parameters i've configured in Tomcat Application object.

working directory: /opt/Tomcat/bin
command line: ./startup.sh
command line arguments: .

[Annex]
section:
start_stop

Sub-sections:
start_command:"/bin/sh /opt/Tomcat/bin/catalina.sh start"
stop_command:start_command:"/bin/sh /opt/Tomcat/bin/shutdown.sh start"

let me know where am going wrong.

R,
AT
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: anandtadimalla on August 22, 2011, 08:58:12 AM
any update?
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: René on August 22, 2011, 04:48:45 PM
Hi,

Parameters "Command line" and "Command line arguments" must match to what is returned by "ps -ef|grep catalina" command.

R.
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: fnunezsa on August 22, 2011, 10:32:59 PM
would you please post the output for "ps -ef| grep catalina"?

This is definately wrong: stop_command:start_command:"/bin/sh /opt/Tomcat/bin/shutdown.sh start"
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: anandtadimalla on August 23, 2011, 07:54:13 AM
[b]output of ps -ef|grep catalina:[/b]
[root@H3G_OffshoreDEV_Gig_01 ~]# ps -ef|grep catalina
genesys  5152    1  0 Aug22 ?        00:01:17 /usr/java/jre1.5.0_22/bin/java -Djava.util.logging.config.file=/genesys/app/H3G/OffDev/ApacheGroup/Tomcat1/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/genesys/app/H3G/OffDev/ApacheGroup/Tomcat1/endorsed -classpath /genesys/app/H3G/OffDev/ApacheGroup/Tomcat1/bin/bootstrap.jar -Dcatalina.base=/genesys/app/H3G/OffDev/ApacheGroup/Tomcat1
-Dcatalina.home=/genesys/app/H3G/OffDev/ApacheGroup/Tomcat1 -Djava.io.tmpdir=/genesys/app/H3G/OffDev/ApacheGroup/Tomcat1/temp org.apache.catalina.startup.Bootstrap start
root      6944  6879  0 13:05 pts/11  00:00:00 grep catalina
[root@H3G_OffshoreDEV_Gig_01 ~]#



Regards,
AT
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: fnunezsa on August 23, 2011, 08:47:00 PM
ouch  :(

Are you sure that your Tomcat is running? That output does not seem to reflect Tomcat running, there is a java process running, but not Tomcat
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: cavagnaro on August 23, 2011, 09:43:02 PM
I'm curious also in what should go in there. This is my output for a server that has Tomcat running...what should be used as parameter?


[quote]
[root@ebdics ~]# ps -ef |grep catalina
102      8955    1  0 Aug19 ?        00:00:26 /usr/java/jre1.5.0_16/bin/java -Xms64m -Xmx256m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/apache-tomcat-5.5.23/conf/logging.properties -Djava.endorsed.dirs=/opt/apache-tomcat-5.5.23/common/endorsed -classpath :/opt/apache-tomcat-5.5.23/bin/bootstrap.jar:/opt/apache-tomcat-5.5.23/bin/commons
-logging-api.jar -Dcatalina.base=/opt/apache-tomcat-5.5.23 -Dcatalina.home=/opt/apache-tomcat-5.5.23 -Djava.io.tmpdir=/opt/apache-tomcat-5.5.23/temp org.apache.catalina.startup.Bootstrap start
root    13079    1  0 Aug19 ?        00:28:25 /opt/Alcatel-Lucent/Java_Development_Kit/bin/java -server -classpath /opt/Alcatel-Lucent/Tomcat/bin/bootstrap.jar:/opt/Alcatel-Lucent/Tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/Alcatel-Lucent/Tomcat -Dcatalina.home=/opt/Alcatel-Lucent/Tomcat -Djava.endorsed.dirs=/opt/Alcatel-Lucent/Tomcat/endorsed -Djava.io.tmpdir=/opt/Alcatel-Lucent/Tomcat/temp -Decc.applicationName=tomcat -Decc.path=/opt/Alcatel-Lucent/ecc.properties -Decc.logsDir=/opt/Alcatel-Lucent/logs -DTOMCAT_HOME=/opt/Alcatel-Lucent/Tomcat -Djava.security.auth.login.config=/opt/Alcatel-Lucent/Tomcat/conf/auth.config -XX:OnOutOfMemoryError=kill -9 %p -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=heapOOM.hprof -Dsun.io.useCanonCaches=false -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10111 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -XX:+DisableExplicitGC -XX:MaxPermSize=192M -Xms128m -Xmx512m -Dfile.encoding=UTF-8 -DWindows=false -DLinux=true -DvoiceApplicationCache=/opt/Alcatel-Lucent/VoiceApplicationCache -Dlog4j.configuration=file:/opt/Alcatel-Lucent/Tomcat/conf/traces.xml org.apache.catalina.startup.Bootstrap start
root    16727 16189  0 15:53 pts/0    00:00:00 grep catalina
[/quote]
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: anandtadimalla on August 24, 2011, 06:01:40 AM
Hi fnunezsa,

YES Tomcat is Running...am able to open the webapplication deployed inside tomcat.

Reg,
AT
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: fnunezsa on August 25, 2011, 12:54:20 AM
This is my output:

bash-3.00$ ps -ef | grep catal
genesis 26507  5674  0  Aug 23 ?          0:00 /bin/sh /opt/GCTI/MCR/Tomcat_GAD/bin/catalina.sh start
genesis  6963  5674  0  Aug 15 ?          0:00 /bin/sh ./catalina.sh start

There are 2 Tomcat instances running on that server.

Application in CME is based on Third Party Server template. Command line: /bin/sh, command line parameters: <tomcat install directory>bin/catalina.sh start (please note that I remove the actual tomcat installation directory). start_command: /opt/GCTI/MCR/Tomcat_GAD/bin/startup.sh, stop_command: /opt/GCTI/MCR/Tomcat_GAD/bin/shutdown.sh

The previous is working fine for me.
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: cavagnaro on August 25, 2011, 04:55:56 PM
bash? are you running it as root? On which Linux exactly?
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: fnunezsa on August 25, 2011, 07:59:49 PM
Those Tomcat instances are running under "genesys" user, not root. We have Solaris 10.
Title: Re: SCI and Tomcat 5.5 running as a windows service?
Post by: cavagnaro on August 25, 2011, 08:06:53 PM
Well seems that it is not exactly the same output expected...