|
From: Leif M. <lei...@ta...> - 2010-07-27 19:02:08
|
Jay, You were very close. The configured "main class" needs to be a Wrapper helper class or a user class which implements the WrapperListener interface. Please try the following: wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp wrapper.app.parameter.1=org.jruby.Main wrapper.app.parameter.2=-S wrapper.app.parameter.3=glassfish The following property also didn't have a valid value. Try this: wrapper.java.command.loglevel=INFO Please let me know how this works for you. Cheers, Leif On Wed, Jul 28, 2010 at 12:29 AM, <Jay...@sc...> wrote: > Hi, > > I am trying to use the Simple wrapper approach to launch a webserver and am > running into issues. > > I was wondering if anyone could offer up some suggestions of where to look > etc. > > First: > I am using Jruby and the glassfish gem which launches the glassfish > server. > Second > when I setup using the "simple wrapper" approach > It looks like things are starting up... then I get a timeout in the > wrapper log. > > I'm not 100% sure that this approach is the right one to be taking here. > but it seems so close to working :). > > Without the wrapper I launch glassfish thusly: > jruby -S glassfish > > this produces a process : > java -client -Djruby.memory.max=500m -Djruby.stack.max=1024k -Xmx500m > -Xss1024k -Djffi.boot.library.path=jruby-1.5.0/lib/native/x86_64-Linux > -Xbootclasspath/a:jruby-1.5.0/lib/jruby.jar -classpath > jruby-1.5.0/lib/jna.jar:jruby-1.5.0/lib/profile.jar: > -Djruby.home=jruby-1.5.0 -Djruby.lib=jruby-1.5.0/lib -Djruby.script=jruby > -Djruby.shell=/bin/sh org.jruby.Main -S glassfish > > > I'm thinking that the problem may be that launching this app never > returns... > or ... I know in the past jruby stuff I've done does not launch any non > daemon threads and this interfered with the wrapper's ability to keep my app > running. > > Any thoughts? > > > > here is a snippet of the wrapper log file following this is my > wrapper.conf file : > ERROR | wrapper | 2010/07/27 11:04:07 | Startup failed: Timed out waiting > for a signal from the JVM. > ADVICE | wrapper | 2010/07/27 11:04:07 | > ADVICE | wrapper | 2010/07/27 11:04:07 | > ------------------------------------------------------------------------ > ADVICE | wrapper | 2010/07/27 11:04:07 | Advice: > ADVICE | wrapper | 2010/07/27 11:04:07 | The Wrapper consists of a native > component as well as a set of classes > ADVICE | wrapper | 2010/07/27 11:04:07 | which run within the JVM that it > launches. The Java component of the > ADVICE | wrapper | 2010/07/27 11:04:07 | Wrapper must be initialized > promptly after the JVM is launched or the > ADVICE | wrapper | 2010/07/27 11:04:07 | Wrapper will timeout, as just > happened. Most likely the main class > ADVICE | wrapper | 2010/07/27 11:04:07 | specified in the Wrapper > configuration file is not correctly initializing > ADVICE | wrapper | 2010/07/27 11:04:07 | the Wrapper classes: > ADVICE | wrapper | 2010/07/27 11:04:07 | org.jruby.Main > ADVICE | wrapper | 2010/07/27 11:04:07 | While it is possible to do so > manually, the Wrapper ships with helper > ADVICE | wrapper | 2010/07/27 11:04:07 | classes to make this > initialization processes automatic. > ADVICE | wrapper | 2010/07/27 11:04:07 | Please review the integration > section of the Wrapper's documentation > ADVICE | wrapper | 2010/07/27 11:04:07 | for the various methods which can > be employed to launch an application > ADVICE | wrapper | 2010/07/27 11:04:07 | within the Wrapper: > ADVICE | wrapper | 2010/07/27 11:04:07 | > http://wrapper.tanukisoftware.org/doc/english/integrate.html > ADVICE | wrapper | 2010/07/27 11:04:07 | > ------------------------------------------------------------------------ > ADVICE | wrapper | 2010/07/27 11:04:07 | > ERROR | wrapper | 2010/07/27 11:04:08 | JVM did not exit on request, > terminated > DEBUG | wrapper | 2010/07/27 11:04:08 | Signal trapped. Details: > DEBUG | wrapper | 2010/07/27 11:04:08 | signal number=17 (SIGCHLD), > source="unknown" > DEBUG | wrapper | 2010/07/27 11:04:08 | Received SIGCHLD, checking JVM > process status. > STATUS | wrapper | 2010/07/27 11:04:08 | JVM received a signal SIGKILL > (9). > DEBUG | wrapper | 2010/07/27 11:04:08 | JVM was only running for 29 > seconds leading to a failed restart count of 1. > DEBUG | wrapper | 2010/07/27 11:04:08 | Waiting 5 seconds before > launching another JVM. > DEBUG | wrapper | 2010/07/27 11:04:12 | Ping settings: > wrapper.ping.interval=5, wrapper.ping.interval.logged=1, > wrapper.ping.timeout=3600 > STATUS | wrapper | 2010/07/27 11:04:12 | Launching a JVM... > INFO | jvm 2 | 2010/07/27 11:04:16 | Parsing config file: > /var/www/seaviewlx/config/glassfish.yml > INFO | jvm 2 | 2010/07/27 11:04:16 | Starting GlassFish server at: > 0.0.0.0:3000 in production environment... > INFO | jvm 2 | 2010/07/27 11:04:16 | Writing log messages to: > /var/www/seaviewlx/log/production.log. > INFO | jvm 2 | 2010/07/27 11:04:16 | Press Ctrl+C to stop. > INFO | jvm 2 | 2010/07/27 11:04:16 | > > > > > > wrapper.conf > > #******************************************************************** > # Wrapper License Properties (Ignored by Community Edition) > #******************************************************************** > # Professional and Standard Editions of the Wrapper require a valid > # License Key to start. Licenses can be purchased or a trial license > # requested on the following pages: > # http://wrapper.tanukisoftware.org/purchase > # http://wrapper.tanukisoftware.org/trial > > # Include file problems can be debugged by removing the first '#' > # from the following line: > ##include.debug > > # The Wrapper will look for either of the following optional files for a > # valid License Key. License Key properties can optionally be included > # directly in this configuration file. > #include /var/www/seaviewlx/config/wrapper-license.conf > #include ../conf/wrapper-license-%WRAPPER_HOST_NAME%.conf > > # The following property will output information about which License Key(s) > # are being found, and can aid in resolving any licensing problems. > wrapper.license.debug=TRUE > > #******************************************************************** > # Wrapper Java Properties > #******************************************************************** > # Java Application > wrapper.java.command=java > > # Tell the Wrapper to log the full generated Java command line. > wrapper.java.command.loglevel=ALL > > # 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.jruby.Main > > # Java Classpath (include wrapper.jar) Add class path elements as > # needed starting from 1 > wrapper.java.classpath.1=/var/www/seaviewlx/lib/wrapper.jar > wrapper.java.classpath.2=/var/www/seaviewlx/jruby-1.5.0/lib/jna.jar > wrapper.java.classpath.3=/var/www/seaviewlx/jruby-1.5.0/lib/profile.jar > wrapper.java.classpath.4=/var/www/seaviewlx/lib/util.jar > wrapper.java.classpath.5=/var/www/seaviewlx/lib/args4j-2.0.9.jar > > # Java Library Path (location of Wrapper.DLL or libwrapper.so) > wrapper.java.library.path.1=/var/www/seaviewlx/lib > > # Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit > mode. > wrapper.java.additional.auto_bits=TRUE > > # Java Additional Parameters > wrapper.java.additional.1=-server > wrapper.java.additional.2=-Djruby.memory.max=500m > wrapper.java.additional.3=-Djruby.stack.max=1024k > wrapper.java.additional.4=-Xmx500m > wrapper.java.additional.5=-Xss1024k > > wrapper.java.additional.6=-Djffi.boot.library.path=/var/www/seaviewlx/jruby-1.5.0/lib/native/x86_64-Linux > > wrapper.java.additional.7=-Xbootclasspath/a:/var/www/seaviewlx/jruby-1.5.0/lib/jruby.jar > wrapper.java.additional.8=-Djruby.home=/var/www/seaviewlx/jruby-1.5.0 > wrapper.java.additional.9=-Djruby.lib=/var/www/seaviewlx/jruby-1.5.0/lib > wrapper.java.additional.10=-Djruby.script=jruby > wrapper.java.additional.11=-Djruby.shell=/bin/sh > > # 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 > wrapper.app.parameter.1=-S > wrapper.app.parameter.2=glassfish > > #******************************************************************** > # Wrapper Logging Properties > #******************************************************************** > # Enables Debug output from the Wrapper. > wrapper.debug=TRUE > > # 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=ALL > > # Log file to use for wrapper output logging. > wrapper.logfile=/var/www/seaviewlx/log/wrapper.log > > # Format of output for the log file. (See docs for formats) > wrapper.logfile.format=LPTM > wrapper.ping.timeout=3600 > > # 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=ALL > > #******************************************************************** > # Wrapper General Properties > #******************************************************************** > # Allow for the use of non-contiguous numbered properties > wrapper.ignore_sequence_gaps=TRUE > > # Title to use when running as a console > wrapper.console.title=Test Wrapper Sample Application > > #******************************************************************** > # Wrapper JVM Checks > #******************************************************************** > # Detect DeadLocked Threads in the JVM. (Requires Standard Edition) > wrapper.check.deadlock=TRUE > wrapper.check.deadlock.interval=60 > wrapper.check.deadlock.action=RESTART > wrapper.check.deadlock.output=FULL > > # Out Of Memory detection. > wrapper.filter.trigger.1000=java.lang.OutOfMemoryError > wrapper.filter.action.1000=RESTART > wrapper.filter.message.1000=The JVM has run out of memory. > > #******************************************************************** > # Wrapper Email Notifications. (Requires Professional Edition) > #******************************************************************** > # Common Event Email settings. > #wrapper.event.default.email.debug=TRUE > #wrapper.event.default.email.smtp.host=<SMTP_Host> > #wrapper.event.default.email.smtp.port=25 > #wrapper.event.default.email.subject=[%WRAPPER_HOSTNAME%:%WRAPPER_NAME%:%WRAPPER_EVENT_NAME%] > Event Notification > #wrapper.event.default.email.sender=<Sender email> > #wrapper.event.default.email.recipient=<Recipient email> > > # Configure the log attached to event emails. > #wrapper.event.default.email.attach_log=TRUE > #wrapper.event.default.email.maillog.lines=50 > #wrapper.event.default.email.maillog.format=LPTM > #wrapper.event.default.email.maillog.loglevel=INFO > > # Enable specific event emails. > #wrapper.event.wrapper_start.email=TRUE > #wrapper.event.jvm_prelaunch.email=TRUE > #wrapper.event.jvm_start.email=TRUE > #wrapper.event.jvm_started.email=TRUE > #wrapper.event.jvm_stop.email=TRUE > #wrapper.event.jvm_stopped.email=TRUE > #wrapper.event.jvm_restart.email=TRUE > #wrapper.event.jvm_failed_invocation.email=TRUE > #wrapper.event.jvm_max_failed_invocations.email=TRUE > #wrapper.event.jvm_kill.email=TRUE > #wrapper.event.jvm_killed.email=TRUE > #wrapper.event.jvm_unexpected_exit.email=TRUE > #wrapper.event.wrapper_stop.email=TRUE > > # Specify custom mail content > wrapper.event.jvm_restart.email.body=The JVM was restarted.\n\nPlease check > on its status.\n > > #******************************************************************** > # 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.name=testwrapper > > # Display name of the service > wrapper.displayname=Test Wrapper Sample Application > > # Description of the service > wrapper.description=Test Wrapper Sample Application Description > > # Service dependencies. Add dependencies as needed starting from 1 > wrapper.ntservice.dependency.1= > > # Mode in which the service is installed. AUTO_START, DELAY_START or > DEMAND_START > wrapper.ntservice.starttype=AUTO_START > > # Allow the service to interact with the desktop. > wrapper.ntservice.interactive=false > *Jay McGaffigan *| Consulting Software Engineer* > SeaChange International, Inc.* > 50 Nagog Park, Acton, MA 01720* > **www.schange.com* <http://www.schange.com/> | *jay...@sc... > * <%3Ca+href=> > O: 978-889-3136 | F: 978-987-5065 This e-mail and any attachments may > contain information which is SeaChange International confidential. The > information enclosed is intended only for the addressees herein and may not > be copied or forwarded without permission from SeaChange International. > |