|
From: <IPi...@Xe...> - 2005-02-03 14:10:01
|
Hi Leif, Thanks for your reply, I pretty much came to the same conclusions myself, but try as I could, I wasn't able to find a way to start-up WebSphere in the same JVM. I had all sorts of crazy attempts, but I couldn't pinpoint the exact set-up required without it launching and terminating the JVM. I went for options 2 in the end and ran the start-up scripts using the Runtime class as an external process, not elegant, but I was running out of time. Thanks for you help and if anyone does pinpoint the exact class and parameters necessary to start WebSphere please let me know. Cheers, Ian Ian Pilborough Pre Sales Consultant - Northern Europe xenos | the data to e-content company(tm) Direct: +44 (0) 1932 236 912 Mobile: +44 (0) 7812 193 208 Main: +44 (0) 1932 252 299 Fax: +44 (0) 1932 252 288 Email: mailto:ipi...@xe... Web: http://www.xenos.com/ ***************************************************************** For Xenos Helpdesk support contact +44 (0)1932 236900 or e-mail su...@xe... ***************************************************************** Ian, If I understand your situation correctly, the Wrapper is actually behaving as intended here. The Wrapper's job in this case is to launch and then monitor the JVM that it launches. In this case that is the WSLauncher class. That class is launching an external JVM instance and then completing. The Wrapper sees that the class that it started completed and thus exits. This is the same behavior as you would get if your ran the JVM standalone using the scripts that come with WebSphere. There are a couple of ways to resolve this. 1) I don't use WebSphere, but most likely the only reason that WSLauncher is used is to do the job of scanning your system for a configuration and then generating a custom command like to then launch the actual WebSphere JVM. Is there any way of enabling debug output to find out what the exact command line is that is used to launch the WebSphere JVM? If so, you can hard code that into a new wrapper.conf file and have the Wrapper handle the job of launching WebSphere directly. You may need to do the same thing for the shutdown process to find out how to cleanly shut it down. If WebSphere makes use of shutdown hooks then this later step may not be necessary. This is the best option as the Wrapper will directly monitor the lifecycle of the JVM and recover from any errors. 2) You can also create a new main class which calls the WSLauncher class with its startup parameters and then waits in a non-daemon thread until it is time to shut down. At this time, it would call the WSLauncher with the shutdown parameters. At the simplest, this would start and stop your child JVM if everything went well. The problems are that if the WebSphere JVM dies of freezes up, there would be nobody watching to do anything about it. A second problem is that if for some reason, the JVM that the Wrapper is controlling directly crashed then it would be restarted, but its child processes (WebSphere JVM) would be left running. This would lead to a second instance being launched. You could always attempt to stop WebSphere before launching a new one to resolve this second problem. These can be worked around, but they would require quite a bit of work. If possible option 1 would be best for you. Also, from your log file, everything appears to have been working correctly until the very end. Then the Wrapper timed out waiting for the WSLauncher stop command to complete. Without seeing the wrapper.debug output, I can't say the exact cause there... Cheers, Leif IPi...@Xe... wrote: > Hi, > > Hopefully this isn't a duplicate. > > I have WebSphere Advanced Single Server Edition 4.0.x installed on > Windows 2000 Server. I've set-up Wrapper to stop and start the server > using WrapperStartStopApp and I am able to start and stop > successfully. However, when I start-up the server and the start-up of > WebSphere is complete, the shutdown sequence begins. > > My thoughts are that the start-up script for WebSphere starts > WebSphere as a server and then the JVM that created the server exits. > This may then trigger the shutdown sequence. I also wonder if the fact > that I'm using the IBM JDK 1.3 has any bearing on the situation. Has > anyone any experience of using Wrapper for WebSphere? > > I have also configured WrapperSimpleApp to work, which is successful, > but the wrapper terminates after a successful start-up, which means > that the although WebSphere runs it doesn't show as a started > application in Windows Services. This is acceptable for now, but if we > ever run monitoring software that looks for the status of services it > will report a false negative. > > Cheers, > > Ian > > Here's my configuration file: > > #******************************************************************** > > # Wrapper Properties > > #******************************************************************** > > # Java Application > > wrapper.java.command=C:\appserver\WebSphere\AppServer\java\bin\java > > # Java Main class. This class must implement the WrapperListener interface > > # or guarantee that the WrapperManager class is initialized. Helper > > # classes are provided to do this for you. See the Integration section > > # of the documentation for details. > > wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp > > # Java Classpath (include wrapper.jar) Add class path elements as > > # needed starting from 1 > > wrapper.java.classpath.1=../lib/wrapper.jar > > wrapper.java.classpath.2=c:\appserver\WebSphere\AppServer\properties > > wrapper.java.classpath.3=c:\appserver\WebSphere\AppServer\lib\bootstrap.jar > > # Java Library Path (location of Wrapper.DLL or libwrapper.so) > > wrapper.java.library.path.1=../lib > > wrapper.java.library.path.2=. > > # Java Additional Parameters > > wrapper.java.additional.1=-Dws.output.encoding=console > > wrapper.java.additional.2=-Dserver.root=c:\appserver\WebSphere\AppServer > > wrapper.java.additional.3=-Dws.def.olt.host=localhost > > wrapper.java.additional.4=-Dws.def.olt.port=2102 > > wrapper.java.additional.5=-Dws.def.jdwp.port=7777 > > wrapper.java.additional.6=-Dws.ext.dirs=c:\appserver\WebSphere\AppServer\jav a\lib;c:\appserver\WebSphere\AppServer\classes;c:\appserver\WebSphere\AppSer ver\lib;c:\appserver\WebSphere\AppServer\lib\ext;c:\appserver\WebSphere\AppS erver\web\help; > > wrapper.java.additional.7=-Dcom.ibm.CORBA.ConfigURL=file:/c:/appserver/WebSp here/AppServer/properties/sas.server.props > > # Initial Java Heap Size (in MB) > > #wrapper.java.initmemory=3 > > # Maximum Java Heap Size (in MB) > > #wrapper.java.maxmemory=64 > > # Application parameters. Add parameters as needed starting from 1 > > # 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=com.ibm.ws.bootstrap.WSLauncher > > wrapper.app.parameter.2=1 > > wrapper.app.parameter.3=com.ibm.websphere.install.commands.ProcessLauncherTe st > > # 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=com.ibm.ws.bootstrap.WSLauncher > > wrapper.app.parameter.5=true > > wrapper.app.parameter.6=4 > > wrapper.app.parameter.7=com.ibm.ejs.sm.util.debug.DrAdmin > > wrapper.app.parameter.8=-configurationFile > > wrapper.app.parameter.9=c:\appserver\WebSphere\AppServer\config\server-cfg.x ml > > wrapper.app.parameter.10=-stopServer > > #******************************************************************** > > # Wrapper Logging Properties > > #******************************************************************** > > # Format of output for the console. (See docs for formats) > > wrapper.console.format=PM > > # Log Level for console output. (See docs for log levels) > > wrapper.console.loglevel=INFO > > # Log file to use for wrapper output logging. > > wrapper.logfile=../logs/wrapper.log > > # Format of output for the log file. (See docs for formats) > > wrapper.logfile.format=LPTM > > # Log Level for log file output. (See docs for log levels) > > wrapper.logfile.loglevel=INFO > > # Maximum size that the log file will be allowed to grow to before > > # the log is rolled. Size is specified in bytes. The default value > > # of 0, disables log rolling. May abbreviate with the 'k' (kb) or > > # 'm' (mb) suffix. For example: 10m = 10 megabytes. > > wrapper.logfile.maxsize=0 > > # Maximum number of rolled log files which will be allowed before old > > # files are deleted. The default value of 0 implies no limit. > > wrapper.logfile.maxfiles=0 > > # Log Level for sys/event log output. (See docs for log levels) > > wrapper.syslog.loglevel=NONE > > #******************************************************************** > > # Wrapper Windows Properties > > #******************************************************************** > > # Title to use when running as a console > > wra...@ap...@ > > #******************************************************************** > > # Wrapper Windows NT/2000/XP Service Properties > > #******************************************************************** > > # WARNING - Do not modify any of these properties when an application > > # using this configuration file has been installed as a service. > > # Please uninstall the service before modifying this section. The > > # service can then be reinstalled. > > # Name of the service > > wrapper.ntservice.name=WebSphere > > # Display name of the service > > wrapper.ntservice.displayname=WebSphere Application Server > > # Description of the service > > wrapper.ntservice.description=WebSphere Application Server service > running under Java Wrapper > > # Service dependencies. Add dependencies as needed starting from 1 > > wrapper.ntservice.dependency.1= > > # Mode in which the service is installed. AUTO_START or DEMAND_START > > wrapper.ntservice.starttype=AUTO_START > > # Allow the service to interact with the desktop. > > wrapper.ntservice.interactive=false > > Here's my wrapper log: > > STATUS | wrapper | 2005/01/26 15:59:30 | --> Wrapper Started as Service > > STATUS | wrapper | 2005/01/26 15:59:31 | Launching a JVM... > > INFO | jvm 1 | 2005/01/26 15:59:31 | > > INFO | jvm 1 | 2005/01/26 15:59:31 | Wrapper (Version 3.1.2) > http://wrapper.tanukisoftware.org > > INFO | jvm 1 | 2005/01/26 15:59:31 | > > INFO | jvm 1 | 2005/01/26 15:59:32 | > > INFO | jvm 1 | 2005/01/26 15:59:32 | WebSphere Application Server, > Advanced Single Server Edition V4.0 > > INFO | jvm 1 | 2005/01/26 15:59:32 | Application Server Launcher > > INFO | jvm 1 | 2005/01/26 15:59:32 | Copyright (C) IBM Corporation, 2001 > > INFO | jvm 1 | 2005/01/26 15:59:32 | > > INFO | jvm 1 | 2005/01/26 15:59:32 | The configuration file was > defaulted to: > > INFO | jvm 1 | 2005/01/26 15:59:32 | > c:\WebSphere\AppServer\config\server-cfg.xml > > INFO | jvm 1 | 2005/01/26 15:59:32 | Using the single available node > or the localhost node. > > INFO | jvm 1 | 2005/01/26 15:59:32 | Using the single available server. > > INFO | jvm 1 | 2005/01/26 15:59:32 | Initiating server launch. > > INFO | jvm 1 | 2005/01/26 15:59:34 | Loaded domain "WebSphere > Administrative Domain". > > INFO | jvm 1 | 2005/01/26 15:59:34 | Selected node "uklab02". > > INFO | jvm 1 | 2005/01/26 15:59:34 | Selected server "Default Server". > > INFO | jvm 1 | 2005/01/26 15:59:34 | WSPL0065I: Initiated server > launch with process id 2296. > > INFO | jvm 1 | 2005/01/26 15:59:38 | Time mark: 26 January 2005 > 15:59:38 o'clock GMT > > INFO | jvm 1 | 2005/01/26 15:59:38 | Waiting for the server to be > initialized. > > INFO | jvm 1 | 2005/01/26 15:59:40 | Time mark: 26 January 2005 > 15:59:40 o'clock GMT > > INFO | jvm 1 | 2005/01/26 15:59:40 | Initialized server. > > INFO | jvm 1 | 2005/01/26 15:59:40 | Waiting for applications to be > started. > > INFO | jvm 1 | 2005/01/26 15:59:56 | Time mark: 26 January 2005 > 15:59:56 o'clock GMT > > INFO | jvm 1 | 2005/01/26 15:59:56 | Started applications. > > INFO | jvm 1 | 2005/01/26 15:59:56 | WSPL0057I: The server Default > Server is open for e-business. > > INFO | jvm 1 | 2005/01/26 15:59:56 | Please review the server log > files for additional information. > > INFO | jvm 1 | 2005/01/26 15:59:56 | Standard output: > C:\WebSphere\AppServer/logs/default_server_stdout.log > > INFO | jvm 1 | 2005/01/26 15:59:56 | Standard error: > C:\WebSphere\AppServer/logs/default_server_stderr.log > > INFO | jvm 1 | 2005/01/26 15:59:57 | > > INFO | jvm 1 | 2005/01/26 15:59:57 | WebSphere Application Server, > Advanced Single Server Edition V4.0 > > INFO | jvm 1 | 2005/01/26 15:59:57 | WebSphere Application Server, > Advanced Developer Edition V4.0 > > INFO | jvm 1 | 2005/01/26 15:59:57 | WebSphere Application Server, > Advanced Edition V4.0 > > INFO | jvm 1 | 2005/01/26 15:59:57 | Runtime Utility Program > > INFO | jvm 1 | 2005/01/26 15:59:57 | Copyright (C) IBM Corporation, > 1997-2001 > > INFO | jvm 1 | 2005/01/26 15:59:57 | > > INFO | jvm 1 | 2005/01/26 15:59:57 | WSRU0025I: Loading configuration > from file. > > INFO | jvm 1 | 2005/01/26 15:59:57 | WSRU0028I: Using the specified > configuration file: > > INFO | jvm 1 | 2005/01/26 15:59:57 | > c:\WebSphere\AppServer\config\server-cfg.xml > > INFO | jvm 1 | 2005/01/26 15:59:57 | WSRU0029I: The diagnostic host > name read as localhost. > > INFO | jvm 1 | 2005/01/26 15:59:57 | WSRU0030I: The diagnostic port > was read as 7000. > > INFO | jvm 1 | 2005/01/26 15:59:57 | Stopping server. > > INFO | jvm 1 | 2005/01/26 15:59:57 | The server was successfully stopped. > > ERROR | wrapper | 2005/01/26 16:00:30 | Shutdown failed: Timed out > waiting for signal from JVM. > > ERROR | wrapper | 2005/01/26 16:00:30 | JVM did not exit on request, > terminated > > STATUS | wrapper | 2005/01/26 16:00:31 | <-- Wrapper Stopped > > Ian Pilborough > > Integration Consultant > > xenos | the data to e-content company(tm) > > Direct: +44 (0) 1932 236 912 > > Mobile: +44 (0) 7812 193 208 > > Main: +44 (0) 1932 252 299 > > Fax: +44 (0) 1932 252 288 > > Email: mailto:ipi...@xe... > > Web: http://www.xenos.com/ > > ***************************************************************** > > For Xenos Helpdesk support contact +44 (0)1932 236900 or e-mail > su...@xe... > > ***************************************************************** > |