Java Service Wrapper -Wrapper用法

时间:2014-02-11 11:48:25

标签: java service java-service-wrapper

I have been referring this Java Service Wrapper for Linux Daemon , 

#encoding=UTF-8
# Configuration files must begin with a line specifying the encoding
#  of the the file.

#********************************************************************
# 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.com/purchase
# http://wrapper.tanukisoftware.com/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 ../conf/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 Localization
#********************************************************************
# Specify the locale which the Wrapper should use.  By default the system
#  locale is used.
#wrapper.lang=en_US # en_US or ja_JP

# Specify the location of the Wrapper's language resources.  If these are
#  missing, the Wrapper will default to the en_US locale.
wrapper.lang.folder=../lang

#********************************************************************
# Wrapper Java Properties
#********************************************************************
# Java Application
#  Locate the java binary on the system PATH:
wrapper.java.command=java
wrapper.working.dir =/home/badvelip/pras/JavaServiceWrapper/
#  Specify a specific java binary:
#set.JAVA_HOME=/java/path
#wrapper.java.command=%JAVA_HOME%/bin/java

# Tell the Wrapper to log the full generated Java command line.
wrapper.java.command.loglevel=INFO

# 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.WrapperJarApp

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.2=/home/badvelip/pras/JavaServiceWrapper/bin/lib/wrapper.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=/home/badvelip/pras/JavaServiceWrapper/bin/lib/libwrapper.so

# 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=

# 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=/home/badvelip/pras/JavaServiceWrapper/bin/myDaemon.jar

 #********************************************************************
# 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=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.on_exit.default=RESTART
#********************************************************************
# Wrapper General Properties
#********************************************************************
# Allow for the use of non-contiguous numbered properties
wrapper.ignore_sequence_gaps=TRUE

# Do not start if the pid file already exists.
wrapper.pidfile.strict=TRUE

# Title to use when running as a console
wrapper.console.title=Test Wrapper Sample Application

我的日志文件就是这个

jvm 1    | WrapperJarApp Usage:
jvm 1    |   java org.tanukisoftware.wrapper.WrapperJarApp {jar_file} [app_arguments]
jvm 1    |
jvm 1    | Where:
jvm 1    |   jar_file:       The jar file to run.
jvm 1    |   app_arguments:  The arguments that would normally be passed to the
jvm 1    |                   application.
jvm 1    | WrapperManager Debug: WrapperManager.stop(1) called by thread: main
jvm 1    | WrapperManager Debug: Backend not connected, not sending packet STOP : 1
jvm 1    | WrapperManager Debug: Pausing for 1,000ms to allow a clean shutdown...
jvm 1    | WrapperManager Debug: Startup runner thread started.
jvm 1    | WrapperManager Debug: Thread, main, handling the shutdown process.
jvm 1    | WrapperManager Debug: shutdownJVM(1) Thread: main
jvm 1    | WrapperManager Debug: wait for 0 shutdown locks to be released.
jvm 1    | WrapperManager Debug: Backend not connected, not sending packet STOPPED : 1
wrapper  | Signal trapped.  Details:
wrapper  |   signal number=17 (SIGCHLD), source="unknown"
wrapper  | Received SIGCHLD, checking JVM process status.
wrapper  | JVM process exited with a code of 1, setting the wrapper exit code to 1.
wrapper  | JVM exited while loading the application.
jvm 1    | WrapperManager Debug: calling System.exit(1)

我已经尝试了所有可能的方法来解决这个问题...我还看到了与此主题相关的其他查询,但没有结果。 如果有人遇到这个问题,请帮我解决这个问题。

我提到的链接是

http://opentodo.net/2013/03/deploying-java-unix-daemon-with-java-service-wrapper/

我尝试了所有的步骤。

此致 Rushita

0 个答案:

没有答案