|
From: Christopher H. <cha...@pi...> - 2004-08-31 16:07:13
|
Hi, =20 I'm trying to get the wrapper to add Tomcat as a service under NT/XP.=20 I have followed the instructions at, http://wrapper.tanukisoftware.org/doc/english/integrate-start-stop-win.h tml But when I run 'Tomcat.bat' in the console I get the following; =20 STATUS | wrapper | 2004/08/31 16:02:26 | --> Wrapper Started as Console STATUS | wrapper | 2004/08/31 16:02:26 | Launching a JVM... INFO | jvm 1 | 2004/08/31 16:02:27 | Wrapper (Version 3.1.1) http://wrapper.tanukisoftware.org INFO | jvm 1 | 2004/08/31 16:02:27 |=20 INFO | jvm 1 | 2004/08/31 16:02:28 | Catalina.stop: java.net.ConnectException: Connection refused: connect INFO | jvm 1 | 2004/08/31 16:02:28 | java.net.ConnectException: Connection refused: connect INFO | jvm 1 | 2004/08/31 16:02:28 | at java.net.PlainSocketImpl.socketConnect(Native Method) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.net.Socket.connect(Socket.java:452) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.net.Socket.connect(Socket.java:402) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.net.Socket.<init>(Socket.java:309) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.net.Socket.<init>(Socket.java:124) INFO | jvm 1 | 2004/08/31 16:02:28 | at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:436) INFO | jvm 1 | 2004/08/31 16:02:28 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2004/08/31 16:02:28 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) INFO | jvm 1 | 2004/08/31 16:02:28 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.lang.reflect.Method.invoke(Method.java:324) INFO | jvm 1 | 2004/08/31 16:02:28 | at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:322) INFO | jvm 1 | 2004/08/31 16:02:28 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:400) INFO | jvm 1 | 2004/08/31 16:02:28 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2004/08/31 16:02:28 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) INFO | jvm 1 | 2004/08/31 16:02:28 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.lang.reflect.Method.invoke(Method.java:324) INFO | jvm 1 | 2004/08/31 16:02:28 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:13 6) INFO | jvm 1 | 2004/08/31 16:02:28 | at java.lang.Thread.run(Thread.java:534) STATUS | wrapper | 2004/08/31 16:02:30 | <-- Wrapper Stopped =20 Now to me it looks like the wrapper is trying to invoke the 'stop' command before it has started tomcat. So I commented out the 'wrapper.app.parameters' with the stop info in. Example; =20 # Application parameters. Add parameters as needed starting from 1 #wrapper.app.parameter.1=3D<YourMainClass> # The first application parameter is the name of the class whose main # method is to be called when the application is launched. The class # name is followed by the number of parameters to be passed to its main # method. Then comes the actual parameters. wrapper.app.parameter.1=3Dorg.apache.catalina.startup.Bootstrap wrapper.app.parameter.2=3D1 wrapper.app.parameter.3=3Dstart =20 # The start parameters are followed by the name of the class whose main # method is to be called to stop the application. The stop class name # is followed by a flag which controls whether or not the Wrapper should # wait for all non daemon threads to complete before exiting the JVM. # The flag is followed by the number of parameters to be passed to the # stop class's main method. Finally comes the actual parameters. #wrapper.app.parameter.4=3Dorg.apache.catalina.startup.Bootstrap #wrapper.app.parameter.5=3Dtrue #wrapper.app.parameter.6=3D1 #wrapper.app.parameter.7=3Dstop =20 Now everything seems to work ok. Started up in the console and also added it as a service, with tomcat starting and stopping. =20 Does anyone see a problem with me removing the 4 lines from my conf file. Why does it work? Are they not required for Tomcat 5? =20 Thanks for any help/advice. =20 Chris Haskins Java Developer Piper Group plc Email: cha...@pi... <mailto:cha...@pi...>=20 Tel: + 44 (0) 1454 284900 Fax: + 44 (0) 1454 284950 www.piper-group.com <http://www.piper-group.com/> =20 Information contained in this e-mail is intended for the use of the addressee only, and is confidential and may be the subject of legal professional privilege. Any dissemination, distribution, copying or use of this communication without permission of the addressee is strictly prohibited. The views expressed in this communication may not necessarily be the views held by Piper Group plc. =20 |