|
From: Leif M. <lei...@ta...> - 2009-06-11 15:17:08
|
Jonathan, This is not a problem I have seen before and we are attempting to track down the cause. I went in and dug through the source. This error is being thrown after the Wrapper service has requested and received permission to start the service, when it actually calls the StartService function. Looking at the documentation for the StartService function, ERROR_ACCESS_DENIED should only be encountered if the SERVICE_START was not granted, which it was. This sounds like it might be related, but the page says it is a Windows 2000 problem. You are running Windows XP correct? http://support.microsoft.com/kb/256299 Does this look like it might apply? The error you are seeing happening when the ServiceManager is attempting to launch the Wrapper service. Because it is happening when you run "net start derby", I think that is is something related to the system configuration or security policy rather than an issue with the Wrapper. I say this because the error is happening before the Wrapper process is launched. I do want to help track this down as it may affect other users as well. The Java policy etc should not have anything to do with this problem either because at the point that the error is encountered, Java is not even in the equation. >From the wrapper.conf file that you sent, it does not appear that you are specifying a specific account to run as. This means that the Wrapper service will run as the default SYSTEM account. You might want to try uninstalling and then reinstalling the service. Were any modifications made to the service configuration after it was installed? Please take a look at the above page and we will investigate this further on our end as well. Cheers, Leif On Thu, Jun 11, 2009 at 6:27 AM, Jonathan Ashar<Jon...@hi...> wrote: > Hi, > > I see the error whenever I try to start the service (manually, or automatically on start up). > > For example, running wrapper.exe -t derby.conf, the log file reads > > STATUS | wrapper | 2009/06/11 00:25:59 | Starting the Apache Derby Database service... > ERROR | wrapper | 2009/06/11 00:25:59 | Unable to start the service - Access is denied. (0x5) > > > When I start the Wrapper through the console, it works. I'm attaching the log file when started through console. (By the way, the log file gets placed in C:/ , which is not the location of wrapper.exe) > > Thank you, > Yoni > > > ________________________________________ > From: Leif Mortenson [lei...@ta...] > Sent: Wednesday, June 10, 2009 6:19 PM > To: wra...@li... > Cc: Brent Frederick > Subject: Re: [Wrapper-user] (no subject) > > Jonathan, > Looking over the files you sent, I do not see anything that stands out > as a problem. > > Where exactly are you seeing the error? > > What happens if you try to start the Wrapper service as follows?: > wrapper.exe -t derby.conf > > When you try to start the service, do you get anything in the > wrapper.log file? If so, could you send the wrapper.log with > wrapper.debug=true set? > > In some cases, the wrapper may output errors to the log file before > the wrapper.conf has been loaded. In this case the wrapper will write > to its default log file. When running as a service, this will be a > file called wrapper.log in the Windows system directory. > > Cheers, > Leif > > On Wed, Jun 10, 2009 at 7:49 PM, Jonathan > Ashar<Jon...@hi...> wrote: >> Hello, >> >> I am using the wrapper to wrap an Apache Derby database service. >> >> When I start the wrapper via the console (wrapper.exe -c derby.conf) it >> succeeds. >> When I install it as a service (wrapper.exe -i derby.conf) the install >> succeeds, but the service is never able to start. I see "Error 5: access is >> denied". >> >> I have XP Pro, and am installing as Windows admin user. I am pasting below >> my java.policy and derby.conf >> >> The first time I installed it as service, it was working -- ever since I >> uninstalled and reinstalled the service, it fails! >> >> Thank you, >> Yoni >> >> >> Here is my java.policy file: >> >> // Standard extensions get all permissions by default >> grant codeBase "file:${{java.ext.dirs}}/*" { >> permission java.security.AllPermission; >> }; >> // default permissions granted to all domains >> grant { >> // Allows any thread to stop itself using the java.lang.Thread.stop() >> // method that takes no argument. >> // Note that this permission is granted by default only to remain >> // backwards compatible. >> // It is strongly recommended that you either remove this permission >> // from this policy file or further restrict it to code sources >> // that you specify, because Thread.stop() is potentially unsafe. >> // See "http://java.sun.com/notes" for more information. >> permission java.lang.RuntimePermission "stopThread"; >> // allows anyone to listen on un-privileged ports >> permission java.net.SocketPermission "localhost:1024-", "listen"; >> // "standard" properies that can be read by anyone >> permission java.util.PropertyPermission "java.version", "read"; >> permission java.util.PropertyPermission "java.vendor", "read"; >> permission java.util.PropertyPermission "java.vendor.url", "read"; >> permission java.util.PropertyPermission "java.class.version", "read"; >> permission java.util.PropertyPermission "os.name", "read"; >> permission java.util.PropertyPermission "os.version", "read"; >> permission java.util.PropertyPermission "os.arch", "read"; >> permission java.util.PropertyPermission "file.separator", "read"; >> permission java.util.PropertyPermission "path.separator", "read"; >> permission java.util.PropertyPermission "line.separator", "read"; >> permission java.util.PropertyPermission "java.specification.version", >> "read"; >> permission java.util.PropertyPermission "java.specification.vendor", >> "read"; >> permission java.util.PropertyPermission "java.specification.name", "read"; >> permission java.util.PropertyPermission "java.vm.specification.version", >> "read"; >> permission java.util.PropertyPermission "java.vm.specification.vendor", >> "read"; >> permission java.util.PropertyPermission "java.vm.specification.name", >> "read"; >> permission java.util.PropertyPermission "java.vm.version", "read"; >> permission java.util.PropertyPermission "java.vm.vendor", "read"; >> permission java.util.PropertyPermission "java.vm.name", "read"; >> }; >> // Give Wrapper classes full permissions >> grant codeBase "file:C:/Program Files/glassfish-v2/javadb/lib/wrapper.jar" { >> permission java.security.AllPermission; >> }; >> // Give Derby net classes full permissions >> grant codeBase "file:C:/Program Files/glassfish-v2/javadb/lib/derbynet.jar" >> { >> permission java.security.AllPermission; >> }; >> >> >> and derby.conf: >> >> # Java Application >> wrapper.java.command = C:/Program Files/Java/jdk1.6.0_10/bin/java.exe >> # Java Main class >> wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp >> # Java Classpath (include wrapper.jar) >> wrapper.java.classpath.1=../lib/derby.jar >> wrapper.java.classpath.2=../lib/derbynet.jar >> wrapper.java.classpath.3=../lib/derbytools.jar >> wrapper.java.classpath.4=../lib/Wrapper.jar >> # Java Library Path (location of Wrapper.DLL or libwrapper.so) >> wrapper.java.library.path.1=../lib >> # Java Additional Parameters >> wrapper.java.additional.1=-Dderby.system.home="C:/Documents and >> Settings/Yoni/.netbeans-derby" >> # Application parameters >> wrapper.app.parameter.1=org.apache.derby.drda.NetworkServerControl >> # number of arguments is 3 >> wrapper.app.parameter.2=3 >> wrapper.app.parameter.3=start >> # Option -h 0.0.0.0 means: listening on all interfaces, not only on >> localhost. >> # This is needed to make the derby server accept connections from other >> hosts >> # than the localhost. >> wrapper.app.parameter.4=-h >> wrapper.app.parameter.5=0.0.0.0 >> wrapper.app.parameter.6=org.apache.derby.drda.NetworkServerControl >> wrapper.app.parameter.7=true >> # number of arguments is 1 >> wrapper.app.parameter.8=1 >> wrapper.app.parameter.9=shutdown >> # Initial Java Heap Size (in MB) >> wrapper.java.initmemory=64 >> # Maximum Java Heap Size (in MB) >> wrapper.java.maxmemory=128 >> #******************************************************************** >> # Wrapper Logging Properties >> #******************************************************************** >> wrapper.console.format=PM >> wrapper.console.loglevel=INFO >> wrapper.logfile=/wrapper.log >> wrapper.logfile.format=LPTM >> wrapper.logfile.loglevel=INFO >> wrapper.logfile.maxsize=5m >> wrapper.logfile.maxfiles=10 >> wrapper.syslog.loglevel=ERROR >> #******************************************************************** >> # Wrapper Windows Properties >> #******************************************************************** >> # Title to use when running as a console >> wrapper.console.title=Derby DB Server >> # 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. >> wrapper.ntservice.name=derby >> wrapper.ntservice.displayname=Apache Derby Database >> wrapper.ntservice.description=Apache Derby Relational Database Engine >> (Network Server) >> wrapper.ntservice.starttype=AUTO_START >> wrapper.ntservice.interactive=false |