2 Replies Latest reply: Oct 29, 2010 12:33 PM by 807435 RSS

    Installing Weblogic Admin Server as service -  service won't start

    807435
      I'm installing Weblogic Admin Server as a Service in Weblogic 10 on a Windows 2008 R2 box.

      The service installs correctly, but when I start it, it immeidately stops with this error:

      "The <service name> service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the performance logs and alerts service."

      Also, sometimes it gives me this error:

      "Error 1053: The service did not respond to the start or control request in a timely fashion"

      Thanks in advance for any help.  Here is my installSvc.cmd:

      @echo off
      SETLOCAL

      set PRODUCTION_MODE=true

      SET JAVA_VENDOR=BEA
      SET JAVA_HOME=C:\bea10_64\jr

      set USERDOMAIN_HOME=C:\PA_Prod
      set SERVER_NAME=AdminServer
      set DOMAIN_NAME=PA_domain

      set HOST=10.0.1.28
      set PORT=7001

      set WL_HOME=C:\bea10_64\wlserver_10.3
      call "%WL_HOME%\common\bin\commEnv.cmd"

      @rem Check that the WebLogic classes are where we expect them to be
      :checkWLS
      if exist "%WL_HOME%\server\lib\weblogic.jar" goto checkJava
      echo The WebLogic Server wasn't found in directory %WL_HOME%\server.
      echo Please edit your script so that the WL_HOME variable points
      echo to the WebLogic installation directory.
      goto finish

      @rem Check that java is where we expect it to be
      :checkJava
      if exist "%JAVA_HOME%\bin\java.exe" goto runWebLogic
      echo The JDK wasn't found in directory %JAVA_HOME%.
      echo Please edit your script so that the JAVA_HOME variable
      echo points to the location of your JDK.
      goto finish

      :runWebLogic

      if not "%JAVA_VM%" == "" goto noResetJavaVM
      if "%JAVA_VENDOR%" == "BEA" set JAVA_VM=-jrocket
      if "%JAVA_VENDOR%" == "HP" set JAVA_VM=-server
      if "%JAVA_VENDOR%" == "Sun" set JAVA_VM=-server

      :noResetJavaVM
      if not "%MEM_ARGS%" == "" goto noResetMemArgs
      set MEM_ARGS=-Xms32m -Xmx200m

      :noResetMemArgs

      @echo on

      set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH%

      if "%ADMIN_URL%" == "" goto runAdmin
      @echo on
      set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.management.server=\"%ADMIN_URL%\" -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"
      goto finish

      :runAdmin
      @echo on
      set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"

      :finish
      rem *** Set up extrapath for win32 and win64 platform separately
      if "%WL_USE_X86DLL%" == "true" set EXTRAPATH=%WL_HOME%\server\native\win\32;%WL_HOME%\server\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%WL_HOME%\server\native\win\32\oci920_8

      if "%WL_USE_IA64DLL%" == "true" set EXTRAPATH=%WL_HOME%\server\native\win\64\;%WL_HOME%\server\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%WL_HOME%\server\native\win\64\oci920_8

      if "%WL_USE_AMD64DLL%" == "true" set EXTRAPATH=%WL_HOME%\server\native\win\x64\;%WL_HOME%\server\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%WL_HOME%\server\native\win\x64\oci920_8

      rem *** Install the service
      "%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%

      ENDLOCAL
        • 1. Re: Installing Weblogic Admin Server as service -  service won't start
          René van Wijk
          The problem lies in your additions to the script installSvc.cmd

          Say we have for example the following directory as our middleware-home
          c:\bea. In this directory we also have installed a JVM say C:\bea\jrockit_160_05_R27.6.2-20.
          When you create a domain (by using the config.cmd script) the domain you created
          is placed in the directory c:\bea\user_projects\domain\base_domain (assuming we have
          called the domain base_domain).

          Now we have to add the following parameter definitions to installSvc.cmd
          @rem JAVA_VENDOR and JAVA_HOME are set in the call to commEnv.cmd
          @rem JAVA_VENDOR is checked in commEnv.cmd to be Oracle or Sun
          set JAVA_VENDOR=Oracle
          set JAVA_HOME=C:\bea\jrockit_160_05_R27.6.2-20
          
          set USERDOMAIN_HOME=C:\bea\user_projects\domains\base_domain
          set SERVER_NAME=AdminServer
          set DOMAIN_NAME=base_domain
          
          @rem i am assuming it is running on localhost
          set HOST=127.0.0.1
          set PORT=7001
          In your case it becomes (just a guess)
          @rem use Oracle instead of BEA
          set JAVA_VENDOR=Oracle
          @rem the location where your JVM is installed
          set JAVA_HOME=C:\bea10_64\jr
          
          @rem if bea10_64 is your middleware home and PA_domain is your domain name
          set USERDOMAIN_HOME=C:\bea10_64\user_projects\domains\PA_domain
          
          @rem the rest should be alright
          set SERVER_NAME=AdminServer
          set DOMAIN_NAME=PA_domain
          set HOST=10.0.1.28
          set PORT=7001
          If you add the following to uninstallSvc.cmd you can uninstall the service
          set SERVER_NAME=AdminServer
          set DOMAIN_NAME=base_domain
          • 2. Re: Installing Weblogic Admin Server as service -  service won't start
            807435
            I had moved my default domain to C:\PA_Prod, but I wasn't pointing to it correctly. Thanks for the input!