|
From: GLOVER, M. C. <MAR...@UT...> - 2010-09-24 15:37:58
|
How long should the Windows XP System await a response before replying: 'The service is not responding to the control function'? Should the system return immediately, or should there be a short delay while the process starts? Can this awaiting response time be manipulated? Thanks, Mark -----Original Message----- From: Leif Mortenson [mailto:lei...@ta...] Sent: Thursday, September 23, 2010 12:43 PM To: wra...@li... Subject: Re: [Wrapper-user] Help Please: The service is not responding to the control function Mark, 1) The application is exiting right away when run from the command line because its main method simply returns. Java will shut itself down when there are no non-daemon threads running. 2) The install as a service looks fine. 3) The attempt to start the service is saying that the Service Manager is trying to start the Wrapper, but it does not respond that it has started up. Could you please send me your wrapper.conf, as well as the wrapper.log file when wrapper.debug=true is set? This should tell me what exactly is happening when you try to start the service. In most cases, you do not need to implement your own WrapperListener implementation. Most applications will work fine if launched using our WrapperSimpleApp helper class. Its use is described as Integration Method #1. This will let you get up and running without any Java code. Cheers, Leif On Thu, Sep 23, 2010 at 9:15 PM, GLOVER, MARK CSC <MAR...@ut...> wrote: > Hi, > > Using wrapper-windows-x86-32-3.5.4 on XP Professional. > > An application ‘Main’ executes, then exits when run from the command line. > > The application will successfully install and uninstall as a service. > > The application will fail to run as a service with error expression ‘The > service is not responding to the control function’. > > Any Suggestions? > > > > Command Line > > > > > > C:\wrapper-windows\MainApp\bin>wrapper.exe -c ..\conf\wrapper.conf > > wrapper | --> Wrapper Started as Console > > wrapper | Java Service Wrapper Community Edition 32-bit 3.5.4 > > wrapper | Copyright (C) 1999-2010 Tanuki Software, Ltd. All Rights > Reserved. > > wrapper | http://wrapper.tanukisoftware.com > > wrapper | > > wrapper | Launching a JVM... > > jvm 1 | WrapperManager: Initializing... > > jvm 1 | [MyApp Constructor] We're here! We're Here! WE'RE HERE! > > jvm 1 | [MyApp Stop] We're here! We're Here! WE'RE HERE! > > wrapper | <-- Wrapper Stopped > > > > Installing as Service > > C:\wrapper-windows\MainApp\bin>InstallMainApp-NT.bat > > wrapper | MarkTestWrapperApp service installed. > > > > > > ---------------------------------------------- > > Running as Service – FAILURE > > > > C:\wrapper-windows\MainApp\bin>net start MarkTestWrapperApp > > The service is not responding to the control function. > > > > More help is available by typing NET HELPMSG 2186. > > > > > > Source Code for MAIN application > > > > import org.tanukisoftware.wrapper.WrapperManager; > > import org.tanukisoftware.wrapper.WrapperListener; > > > > public class Main > > implements WrapperListener > > { > > private MyApp m_app; > > > > > > private Main() > > { } > > > > /*--------------------------------------------------------------- > > * WrapperListener Methods > > *-------------------------------------------------------------*/ > > public Integer start( String[] args ) > > { > > m_app = new MyApp( args ); > > WrapperManager.signalStarting( 6543 ); > > > > return null; > > } > > > > public int stop( int exitCode ) > > { > > m_app.stop(); > > > > return exitCode; > > } > > > > public void controlEvent( int event ) > > { > > if ( ( event == WrapperManager.WRAPPER_CTRL_LOGOFF_EVENT ) > > && ( WrapperManager.isLaunchedAsService() || > WrapperManager.isIgnoreUserLogoffs() ) ) > > { > > // Ignore > > } > > else > > { > > WrapperManager.stop( 0 ); > > // Will not get here. > > } > > } > > > > /*--------------------------------------------------------------- > > * Main Method > > *-------------------------------------------------------------*/ > > public static void main( String[] args ) > > { > > WrapperManager.start( new Main(), args ); > > } > > } > > > > > > MyApp Source code; > > > > public class MyApp { > > > > public MyApp(String [] args){ > > System.out.println("[MyApp Constructor] We're here! We're Here! > WE'RE HERE!"); > > } > > > > public static void main(String [] args){ > > System.out.println("[MyApp main] We're here! We're Here! WE'RE > HERE!"); > > } > > > > public Integer start(){ > > System.out.println("[MyApp Start]We're here! We're Here! WE'RE > HERE!"); > > return null; > > } > > > > public int stop(){ > > System.out.println("[MyApp Stop] We're here! We're Here! WE'RE > HERE!"); > > return 0; > > } > > > > } ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |