|
From: Borkholder, B. <bor...@me...> - 2008-05-30 01:20:00
|
It was indeed a permissions issue. After changing the service account to be one of the administrators on the machine, the logging worked correctly. One of the parent directories had denied SYSTEM access, so it wasn't immediately obvious. Thank you for your quick and insightful reply, Leif. Brandon ________________________________________________________________________ From: Leif Mortenson <le...@ta...> Reply-To: wra...@li... To: wra...@li... Subject: Re: [Wrapper-user] win32 service doesn't log Date: Fri, 30 May 2008 09:46:19 +0900 Brandon, For the log4j problem. This is working with this exact same configuration that works on other machines? Usually there is a reference to a log4j properties file in the wrapper.java.additional.n section. It might be in one of your application jar files however. Because both your log4j and wrapper.log files are failing to write to the disk, I am wondering if you have some kind of file permissions set on the application directory. The service is running as the SYSTEM directory which will not have the same permissions as a regular user. If the Wrapper fails to write to the configured directory, it will attempt to write to current working directory. On startup, this will be the windows system directory when running as a service. Can you please search under C:\windows for a wrapper.log file? That might give us some more clues. Your classpath declaration contains the log4j jar twice. That should matter though. wrapper.java.classpath.11=lib/log4j-1.2.15.jar wrapper.java.classpath.16=lib/log4j-1.2.15.jar Also, you can simplify your classpath declaration as follows. This makes it a lot easier to maintain and will get rid of mistakes like the one above: wrapper.java.classpath.1=lib/jaxb/*.jar wrapper.java.classpath.2=lib/*.jar wrapper.java.classpath.3=resources Cheers, Leif On Fri, May 30, 2008 at 8:04 AM, Borkholder, Brandon <bor...@me...> wrote: > I have a problem with logging under a Windows XP Pro installation using > the 32bit community edition v3.3.0. The same deployment package works > for several other machines that we've tested. But this one machine will > not log the service messages to wrapper.log nor will our software log > using the log4j package. The log4j jar is in the classpath, but > regardless of whether it is or not, that shouldn't affect the > wrapper.log that the java-service-wrapper generates. > > The problem only exists when the wrapper is run as a service. When it > is run from the console, everything logs as normal. As a service, the > software runs, but nothing logs. > > My configuration file is below. > > Thanks, > Brandon > > #******************************************************************** > # Wrapper License Properties (Ignored by Community Edition) > #******************************************************************** > #include wrapper-license.conf > > #******************************************************************** > # Wrapper Java Properties > #******************************************************************** > # Java Application > wrapper.java.command=java > > wrapper.working.dir=.. > > # 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=thread.DetectorService > > > # Java Classpath (include wrapper.jar) Add class path elements as > # needed starting from 1 > wrapper.java.classpath.1=lib/jaxb/activation.jar > wrapper.java.classpath.2=lib/jaxb/jaxb-api.jar > wrapper.java.classpath.3=lib/jaxb/jaxb-impl.jar > wrapper.java.classpath.4=lib/jaxb/jaxb-xjc.jar > wrapper.java.classpath.5=lib/jaxb/jaxb1-impl.jar > wrapper.java.classpath.6=lib/jaxb/jsr173_1.0_api.jar > wrapper.java.classpath.7=lib/jdbcappender.jar > wrapper.java.classpath.8=lib/jms.jar > wrapper.java.classpath.9=lib/jta.jar > wrapper.java.classpath.10=lib/aqapi.jar > wrapper.java.classpath.11=lib/log4j-1.2.15.jar > wrapper.java.classpath.12=lib/ojdbc14.jar > wrapper.java.classpath.13=lib/weka.jar > wrapper.java.classpath.14=lib/xalan.jar > wrapper.java.classpath.15=lib/xercesImpl.jar > wrapper.java.classpath.16=lib/log4j-1.2.15.jar > wrapper.java.classpath.17=lib/commons-dbcp-1.2.2.jar > wrapper.java.classpath.18=lib/commons-pool-1.3.jar > wrapper.java.classpath.19=lib/util.jar > wrapper.java.classpath.20=resources > wrapper.java.classpath.21=lib/service-wrapper.jar > > # Java Library Path (location of Wrapper.DLL or libwrapper.so) > wrapper.java.library.path.1=ServiceWrapper/lib > > # Java Additional Parameters > #wrapper.java.additional.1= > > # Initial Java Heap Size (in MB) > wrapper.java.initmemory=100 > > # Maximum Java Heap Size (in MB) > wrapper.java.maxmemory=1024 > > # Application parameters. Add parameters as needed starting from 1 > #wrapper.app.parameter.1= > > #******************************************************************** > # 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=DEBUG > > # Log file to use for wrapper output logging. > wrapper.logfile=ServiceWrapper/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=DEBUG > > # 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=1m > > # 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=DEBUG > > #******************************************************************** > # Wrapper Windows Properties > #******************************************************************** > # Title to use when running as a console > wrapper.console.title=Dummy > > #******************************************************************** > # 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=Dummy > > # Display name of the service > wrapper.ntservice.displayname=Dummy > > # Description of the service > wrapper.ntservice.description= > > # 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=DEMAND_START > > # Allow the service to interact with the desktop. > wrapper.ntservice.interactive=false > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |