|
From: Gaurav P. <gau...@tc...> - 2011-05-05 10:48:55
|
Hi, I am using Wrapper 3.5.4. I have written a java code and running it as java wrapper service on Windows NT machine. I have a code to uplaod files from client machine (on which service is installed) to server. Sometimes, it happens that the upload takes time say 5 - 10 minutes to upload a file. In the meantime, there is no response from server to the client. In this situation, I assume, that my wrapper service restarts JVM thinking that the jvm is hung. Due to this, there is duplicate upload happening. To avoid this, i am thinking of increasing wrapper ping interval to say 300 seconds. What do you think guys? Below is the wrapper.conf file contents: ******************************************************************************************* wrapper.lang.folder=../lang #******************************************************************** # Wrapper Java Properties #******************************************************************** # Java Application # Locate the java binary on the system PATH: wrapper.java.command=java # 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=com.auto.upload.client.AutoFileUpload wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp # 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=../lib/auto-upload.jar wrapper.java.classpath.3=../lib/log4j-1.2.11.jar wrapper.java.classpath.4=../lib/commons-io-2.0.jar # Java Library Path (location of Wrapper.DLL or libwrapper.so) wrapper.java.library.path.1=../lib # Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit mode. wrapper.java.additional.auto_bits=TRUE wrapper.java.additional.1=-Dorg.tanukisoftware.wrapper.WrapperSimpleApp.waitForStartMain=FALSE # Java Additional Parameters #wrapper.java.additional.2=-Dorg.tanukisoftware.wrapper.WrapperSimpleApp.maxStartMainWait=300 # 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=com.nsdl.auto.upload.client.AutoFileUpload #******************************************************************** # 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=../nsdl-system.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=2m # 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=10 # Log Level for sys/event log output. (See docs for log levels) wrapper.syslog.loglevel=NONE #******************************************************************** # 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=Automatic File Upload Service #******************************************************************** # 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_deadlock.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=Automatic File Upload # Display name of the service wrapper.displayname=Automatic File Upload Service # Description of the service wrapper.description=auto file upload # 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=true ******************************************************************************************* Also written below is the system logs; ******************************************************************************************* INFO | jvm 4 | 2011/05/03 21:51:33 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:33 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:33 | read a packet PING : ping DEBUG | wrapper | 2011/05/03 21:51:34 | SERVICE_CONTROL_INTERROGATE DEBUG | wrapperp | 2011/05/03 21:51:34 | send a packet SERVICE_CONTROL_CODE : 4 INFO | jvm 4 | 2011/05/03 21:51:34 | WrapperManager Debug: Received a packet SERVICE_CONTROL_CODE : 4 INFO | jvm 4 | 2011/05/03 21:51:34 | WrapperManager Debug: ServiceControlCode from Wrapper with code 4 DEBUG | wrapperp | 2011/05/03 21:51:37 | send a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:37 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:37 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:37 | read a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:41 | send a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:42 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:42 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:42 | read a packet PING : ping DEBUG | wrapper | 2011/05/03 21:51:45 | SERVICE_CONTROL_INTERROGATE DEBUG | wrapperp | 2011/05/03 21:51:45 | send a packet SERVICE_CONTROL_CODE : 4 INFO | jvm 4 | 2011/05/03 21:51:46 | WrapperManager Debug: Received a packet SERVICE_CONTROL_CODE : 4 INFO | jvm 4 | 2011/05/03 21:51:46 | WrapperManager Debug: ServiceControlCode from Wrapper with code 4 DEBUG | wrapperp | 2011/05/03 21:51:46 | send a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:46 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:46 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:46 | read a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:50 | send a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:50 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:50 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:50 | read a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:55 | send a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:55 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:55 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:55 | read a packet PING : ping DEBUG | wrapper | 2011/05/03 21:51:57 | SERVICE_CONTROL_INTERROGATE DEBUG | wrapperp | 2011/05/03 21:51:57 | send a packet SERVICE_CONTROL_CODE : 4 INFO | jvm 4 | 2011/05/03 21:51:57 | WrapperManager Debug: Received a packet SERVICE_CONTROL_CODE : 4 INFO | jvm 4 | 2011/05/03 21:51:57 | WrapperManager Debug: ServiceControlCode from Wrapper with code 4 DEBUG | wrapperp | 2011/05/03 21:51:59 | send a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:59 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:51:59 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:51:59 | read a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:52:04 | send a packet PING : ping INFO | jvm 4 | 2011/05/03 21:52:04 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:52:04 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:52:04 | read a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:52:08 | send a packet PING : ping INFO | jvm 4 | 2011/05/03 21:52:08 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:52:08 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:52:08 | read a packet PING : ping DEBUG | wrapper | 2011/05/03 21:52:09 | SERVICE_CONTROL_INTERROGATE DEBUG | wrapperp | 2011/05/03 21:52:09 | send a packet SERVICE_CONTROL_CODE : 4 INFO | jvm 4 | 2011/05/03 21:52:09 | WrapperManager Debug: Received a packet SERVICE_CONTROL_CODE : 4 INFO | jvm 4 | 2011/05/03 21:52:09 | WrapperManager Debug: ServiceControlCode from Wrapper with code 4 DEBUG | wrapperp | 2011/05/03 21:52:13 | send a packet PING : ping INFO | jvm 4 | 2011/05/03 21:52:13 | WrapperManager Debug: Received a packet PING : ping INFO | jvm 4 | 2011/05/03 21:52:13 | WrapperManager Debug: Send a packet PING : ping DEBUG | wrapperp | 2011/05/03 21:52:13 | read a packet PING : ping DEBUG | wrapper | 2011/05/03 21:52:16 | SERVICE_CONTROL_STOP DEBUG | wrapperp | 2011/05/03 21:52:16 | send a packet SERVICE_CONTROL_CODE : 1 DEBUG | wrapper | 2011/05/03 21:52:16 | wrapperStopProcess(0) called. DEBUG | wrapper | 2011/05/03 21:52:16 | Sending stop signal to JVM DEBUG | wrapperp | 2011/05/03 21:52:16 | send a packet STOP : NULL INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: Received a packet SERVICE_CONTROL_CODE : 1 INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: ServiceControlCode from Wrapper with code 1 INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: Received a packet STOP : INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: Thread, Wrapper-Connection, handling the shutdown process. INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: calling listener.stop() INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: Waiting for WrapperListener.stop runner thread to complete. INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: WrapperListener.stop runner thread started. INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperSimpleApp Debug: stop(0) INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: WrapperListener.stop runner thread stopped. INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: returned from listener.stop() -> 0 INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: shutdownJVM(0) Thread: Wrapper-Connection INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: wait for 0 shutdown locks to be released. INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: Send a packet STOPPED : 0 INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: Stopped checking for control events. DEBUG | wrapperp | 2011/05/03 21:52:16 | read a packet STOPPED : 0 DEBUG | wrapper | 2011/05/03 21:52:16 | JVM signaled that it was stopped. INFO | jvm 4 | 2011/05/03 21:52:16 | WrapperManager Debug: Closing backend socket. DEBUG | wrapperp | 2011/05/03 21:52:16 | socket read no code (closed?). DEBUG | wrapperp | 2011/05/03 21:52:16 | closing backend socket. INFO | jvm 4 | 2011/05/03 21:52:17 | WrapperManager Debug: calling System.exit(0) DEBUG | wrapper | 2011/05/03 21:52:17 | JVM process exited with a code of 0, leaving the wrapper exit code set to 0. DEBUG | wrapper | 2011/05/03 21:52:17 | JVM exited normally. STATUS | wrapper | 2011/05/03 21:52:18 | <-- Wrapper Stopped DEBUG | wrapper | 2011/05/03 21:55:16 | Allocating a console for the service. DEBUG | wrapper | 2011/05/03 21:55:16 | Found console window. DEBUG | wrapper | 2011/05/03 21:55:16 | Wrapper console window hidden successfully. STATUS | wrapper | 2011/05/03 21:55:16 | --> Wrapper Started as Service STATUS | wrapper | 2011/05/03 21:55:16 | Java Service Wrapper Community Edition 32-bit 3.5.4 STATUS | wrapper | 2011/05/03 21:55:16 | Copyright (C) 1999-2010 Tanuki Software, Ltd. All Rights Reserved. STATUS | wrapper | 2011/05/03 21:55:16 | http://wrapper.tanukisoftware.com STATUS | wrapper | 2011/05/03 21:55:16 | DEBUG | wrapper | 2011/05/03 21:55:16 | Release time: 2010/08/25 00:00:00 DEBUG | wrapper | 2011/05/03 21:55:16 | Build time: 2010/08/26 05:04:00 DEBUG | wrapper | 2011/05/03 21:55:16 | Timezone: India Standard Time (India Standard Time) Offset: -19800, hasDaylight: 0 DEBUG | wrapper | 2011/05/03 21:55:16 | Using tick timer. ........................ .......................... ******************************************************************************************* Guys what your views on this? Is this really because Wrapper thinks that the JVM is hung? Or is it because of some other reason? Thanks in advance to all. Regards, Gaurav Goel Tata Consultancy Services Mailto: gau...@tc... Website: http://www.tcs.com ____________________________________________ Experience certainty. IT Services Business Solutions Outsourcing ____________________________________________ =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you |