How to install WebLogic AdminServer and NodeManager as windows service?

5.2k Views Asked by At

I am trying to install Weblogic adminserver as windows service but getting "Input too long" error while executing the install script.

2

There are 2 best solutions below

0
On BEST ANSWER

This answer is continuation of below one:

after a lot of analysis I found that is is not authentoication issue, the problem was with boot.properties file. boot. properties file was not read properly.


Now I would give some background- If the fusion middleware is installed as development mode the boot.properties files is created automatically inside Oracle_HOME\user_projects\domains\domainname\servers\AdminServer\security and if you look at this prop file you will find the password and username in encrypted mode. If the fusion Middleware is installed as production Mode then everytime it will ask for password and username. to avoid this perform below steps:

  1. manually create file under Oracle_HOME\user_projects\domains\domainname\servers\AdminServer\security\boot.properties like mention below:

username=weblogic password=Password

Note: No spaces should be added and take care of file extension.

  1. Now start weblogic from domain\bin\startWeblogic.cmd. This will encrypt you boot.properties file. check boot.proprties file if encrypted you are good to go.

Finally start the windows service whic is installed following above process. It should work fine.

=======================

About Node manager use installNodeMgrSvc from domain\bin. Again if you get input is too long error, you must shorten JAVA_OPTIONS and then carefully edit CMDLINE param in the windows registry.

0
On

I have struggled a lot in this issue and finally got the way to register AdminServer and Nodemanager as windows service for Weblogic. Below are the steps and issues faced with the progress:

To register weblogic AdminServer as windows server first need to create a script which will contain values like oracle home, java home etc. Below is the script I have used to install the service:

`

echo off 
SETLOCAL 
set MW_HOME=C:\Oracle\Middleware\Oracle_Home 
set DOMAIN_NAME=osb_domain 
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain 
set SERVER_NAME=AdminServer 
set WL_HOME=C:\Oracle\Middleware\Oracle_Home\wlserver 
set PRODUCTION_MODE=true 
set JAVA_OPTIONS=-Dweblogic.Stdout="%USERDOMAIN_HOME%\stdout.txt" -Dweblogic.Stderr="%USERDOMAIN_HOME%\stderr.txt" 
set WLS_USER=weblogic 
set WLS_PW=Password123 
set MEM_ARGS=-Xms1024m -Xmx1024m 
call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain\bin\setDomainEnv.cmd" 
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd" 
ENDLOCAL

`

  1. By running this script I was not even able to install the windows service as it was throwing " Input is too long" error and the reason is windows char limitations. You might get confused by classpath and will try to resolve classpath but the issue is with JAVA_OPTIONS values which is set by SetDomainEnv.txt is creating this issue.

  2. I have modified the script like below and shorten the JAVA_OPTIONS values by calling SetDomainEnv.txt command just before setting JAVA_OPTIONS in the script. This has overridden the lengthy value of JAVA_OPTIONS. Now I have succesfully installed the AdminServer as windows service.

`

echo off 
SETLOCAL 
set MW_HOME=C:\Oracle\Middleware\Oracle_Home 
set DOMAIN_NAME=osb_domain 
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain 
set SERVER_NAME=AdminServer 
set WL_HOME=C:\Oracle\Middleware\Oracle_Home\wlserver 
set PRODUCTION_MODE=true
call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain\bin\setDomainEnv.cmd" 
set JAVA_OPTIONS=-Dweblogic.Stdout="%USERDOMAIN_HOME%\stdout.txt" -Dweblogic.Stderr="%USERDOMAIN_HOME%\stderr.txt" 
set WLS_USER=weblogic 
set WLS_PW=Password123 
set MEM_ARGS=-Xms1024m -Xmx1024m 
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd" 
ENDLOCAL `
  1. Even the service is successfully installed, when I was starting it the service is stopped immediately and wasn't printing any logs as it was not connecting to AdminServer.

  2. After a bit analysis I found that JAVA_OPTIONS values which I have overridden in my script is very much needed to invoke AdminServer.

  3. I have run SetDomainEnv.txt in cmd prompt and copied thre JAVA_OPTIONS values.

  4. As the service is already installed, I just copied the correct JAVA_OPTIONS values CMDLINE param in the windows service registry manually.

Server subsystem failed. Reason: A MultiException has 6 exceptions. Server installed as Windows NT service with incorrect password for user weblogic. The password may have been changed since the server was installed as a Windows NT Service. Contact the Windows NT system administrator.

Note: No extra spaces or character is inserted in CMDLINE param.

  1. Now everything is in place which is actually required to start the admin server. But when I start the service it is throwing some authentication error along with others in the adminserver.log file.

  2. after a lot of analysis I found that is is not authentoication issue, the problem was with boot.properties file. boot. properties file was not read properly.