Why installing Tomcat Service erred out with "access denied"? How to get over or around it?
D:\IBM\rtc_406\JazzTeamServer\server\tomcat\bin>echo %JRE_HOME%
D:\IBM\rtc_406\JazzTeamServer\server\jre
D:\IBM\rtc_406\JazzTeamServer\server\tomcat\bin>whoami
tent\svc_rtc
D:\IBM\rtc_406\JazzTeamServer\server\tomcat\bin>service.bat install tomcat7clm40
6
Installing the service 'tomcat7clm406' ...
Using CATALINA_HOME: "D:\IBM\rtc_406\JazzTeamServer\server\tomcat"
Using CATALINA_BASE: "D:\IBM\rtc_406\JazzTeamServer\server\tomcat"
Using JAVA_HOME: ""
Using JRE_HOME: "D:\IBM\rtc_406\JazzTeamServer\server\jre"
Using JVM: "D:\IBM\rtc_406\JazzTeamServer\server\jre\bin\j9vm\jvm.d
ll"
Access is denied.
Failed to install serviceFailed installing 'tomcat7clm406' service
D:\IBM\rtc_406\JazzTeamServer\server\tomcat\bin>
Portion of the script responsible for above:
:doInstall
rem Install the service
echo Installing the service '%SERVICE_NAME%' ...
echo Using CATALINA_HOME: "%CATALINA_HOME%"
echo Using CATALINA_BASE: "%CATALINA_BASE%"
echo Using JAVA_HOME: "%JAVA_HOME%"
echo Using JRE_HOME: "%JRE_HOME%"
rem Use the environment variables as an example
rem Each command line option is prefixed with PR_
set PR_DESCRIPTION=Apache Tomcat 7.0.32 Server - http://tomcat.apache.org/
set "PR_INSTALL=%EXECUTABLE%"
set "PR_LOGPATH=%CATALINA_BASE%\logs"
set "PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_BASE%\bin\tomcat-juli.jar;%CATALINA_HOME%\bin\tomcat-juli.jar"
rem Set the server jvm from JAVA_HOME
set "PR_JVM=%JRE_HOME%\bin\server\jvm.dll"
if exist "%PR_JVM%" goto foundJvm
rem Set the client jvm from JAVA_HOME
set "PR_JVM=%JRE_HOME%\bin\client\jvm.dll"
if exist "%PR_JVM%" goto foundJvm
rem Check for IBM JVM installed with Jazz Team Server
set "PR_JVM=%JRE_HOME%\bin\j9vm\jvm.dll"
if exist "%PR_JVM%" goto foundJvm
set PR_JVM=auto
:foundJvm
echo Using JVM: "%PR_JVM%"
"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop
if not errorlevel 1 goto installed
echo Failed installing '%SERVICE_NAME%' service
goto end
Accepted answer
That being said for the access denied, I would start up a command window with full admin rights and then execute the script to see if that changes the outcome and have the user log in with admin rights so they at least have permission to create a service.
Comments
Thx Abraham,