Tuesday, April 26, 2011

Only Username Expected in Production Mode of WebLogic ??

Hello Guys,

Sometime during experiments with WebLogic Server 9.x you might have seen the issue similar to the below while starting the Admin Server or Managed Servers.


[sdyade@sllinux4 bin]$ ./startWebLogic.sh

JAVA Memory arguments: -Xms256m -Xmx512m -verbose:gc
.
WLS Start Mode=Production
.
CLASSPATH=:/home/sdyade/oracle/bea923/patch_weblogic923/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/sdyade/jrockit-R27.2.0-jre1.5.0_10/lib/tools.jar:/home/sdyade/oracle/bea923/weblogic92/server/lib/weblogic_sp.jar:/home/sdyade/oracle/bea923/weblogic92/server/lib/weblogic.jar:/home/sdyade/oracle/bea923/weblogic92/server/lib/webservices.jar::/home/sdyade/oracle/bea923/weblogic92/common/eval/pointbase/lib/pbclient51.jar:/home/sdyade/oracle/bea923/weblogic92/server/lib/xqrl.jar::
.
PATH=/home/sdyade/oracle/bea923/weblogic92/server/bin:/home/sdyade/jrockit-R27.2.0-jre1.5.0_10/jre/bin:/home/sdyade/jrockit-R27.2.0-jre1.5.0_10/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
starting weblogic with Java version:
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
BEA JRockit(R) (build R27.2.0-131-78843-1.5.0_10-20070320-1511-linux-ia32, compiled mode)
Starting WLS with line:
/home/sdyade/jrockit-R27.2.0-jre1.5.0_10/bin/java    -Xms256m -Xmx512m -verbose:gc    -da -Dplatform.home=/home/sdyade/oracle/bea923/weblogic92 -Dwls.home=/home/sdyade/oracle/bea923/weblogic92/server -Dwli.home=/home/sdyade/oracle/bea923/weblogic92/integration  -Dweblogic.management.discover=true  -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/home/sdyade/oracle/bea923/patch_weblogic923/profiles/default/sysext_manifest_classpath -Dweblogic.Name=prodisw_admin_222 -Djava.security.policy=/home/sdyade/oracle/bea923/weblogic92/server/lib/weblogic.policy   weblogic.Server
[INFO ][memory ] GC mode: Garbage collection optimized for throughput, initial strategy: Generational Parallel Mark & Sweep
[INFO ][memory ] heap size: 262144K, maximal heap size: 524288K, nursery size: 131072K
[INFO ][memory ] <s>-<end>: GC <before>K-><after>K (<heap>K), <pause> ms
[INFO ][memory ] <s/start> - start time of collection (seconds since jvm start)
[INFO ][memory ] <end>     - end time of collection (seconds since jvm start)
[INFO ][memory ] <before>  - memory used by objects before collection (KB)
[INFO ][memory ] <after>   - memory used by objects after collection (KB)
[INFO ][memory ] <heap>    - size of heap after collection (KB)
[INFO ][memory ] <pause>   - total pause time during collection (milliseconds)
<Apr 25, 2011 3:04:11 PM EDT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
/home/sdyade/oracle/bea923/weblogic92/platform/lib/p13n/p13n-schemas.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/p13n/p13n_common.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/p13n/p13n_system.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/wlp/netuix_common.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/wlp/netuix_schemas.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/wlp/netuix_system.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/wlp/wsrp-common.jar>
<Apr 25, 2011 3:04:11 PM EDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.2.0-131-78843-1.5.0_10-20070320-1511-linux-ia32 from BEA Systems, Inc.>
<Apr 25, 2011 3:04:13 PM EDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 MP3  Mon Mar 10 08:28:41 EDT 2008 1096261 >
<Apr 25, 2011 3:04:14 PM EDT> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
Enter username to boot WebLogic server:weblogic
<Apr 25, 2011 3:04:19 PM EDT> <Error> <Security> <BEA-090782> <Server is Running in Production Mode and Native Library(terminalio) to read the password securely from commandline is not found.>
<Apr 25, 2011 3:04:19 PM EDT> <Notice> <WebLogicServer> <BEA-000388> <JVM called WLS shutdown hook. The server will force shutdown now>
<Apr 25, 2011 3:04:19 PM EDT> <Alert> <WebLogicServer> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>>
<Apr 25, 2011 3:04:19 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>

Cause :

<Apr 25, 2011 3:04:19 PM EDT> <Error> <Security> <BEA-090782> <Server is Running in Production Mode and Native Library(terminalio) to read the password securely from commandline is not found.>

It looks like we are missing the library "terminalio' which looks for the password from command line, so to get this working we have work around as to use -Dweblogic.management.allowPasswordEcho=true in startup scripts for the servers, which will take the clear text passwords instead of blanks as seen while you input the passwords as below.


[sdyade@sllinux4 bin]$ ./startWebLogic.sh
.
.
JAVA Memory arguments: -Xms256m -Xmx512m -verbose:gc
.
WLS Start Mode=Production
.
CLASSPATH=:/home/sdyade/oracle/bea923/patch_weblogic923/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/sdyade/jrockit-R27.2.0-jre1.5.0_10/lib/tools.jar:/home/sdyade/oracle/bea923/weblogic92/server/lib/weblogic_sp.jar:/home/sdyade/oracle/bea923/weblogic92/server/lib/weblogic.jar:/home/sdyade/oracle/bea923/weblogic92/server/lib/webservices.jar::/home/sdyade/oracle/bea923/weblogic92/common/eval/pointbase/lib/pbclient51.jar:/home/sdyade/oracle/bea923/weblogic92/server/lib/xqrl.jar::
.
PATH=/home/sdyade/oracle/bea923/weblogic92/server/bin:/home/sdyade/jrockit-R27.2.0-jre1.5.0_10/jre/bin:/home/sdyade/jrockit-R27.2.0-jre1.5.0_10/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
starting weblogic with Java version:
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
BEA JRockit(R) (build R27.2.0-131-78843-1.5.0_10-20070320-1511-linux-ia32, compiled mode)
Starting WLS with line:
/home/sdyade/jrockit-R27.2.0-jre1.5.0_10/bin/java    -Xms256m -Xmx512m -verbose:gc    -da -Dplatform.home=/home/sdyade/oracle/bea923/weblogic92 -Dwls.home=/home/sdyade/oracle/bea923/weblogic92/server -Dwli.home=/home/sdyade/oracle/bea923/weblogic92/integration  -Dweblogic.management.discover=true  -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/home/sdyade/oracle/bea923/patch_weblogic923/profiles/default/sysext_manifest_classpath -Dweblogic.Name=prodisw_admin_222 -Djava.security.policy=/home/sdyade/oracle/bea923/weblogic92/server/lib/weblogic.policy -Dweblogic.management.allowPasswordEcho=true  weblogic.Server
[INFO ][memory ] GC mode: Garbage collection optimized for throughput, initial strategy: Generational Parallel Mark & Sweep
[INFO ][memory ] heap size: 262144K, maximal heap size: 524288K, nursery size: 131072K
[INFO ][memory ] <s>-<end>: GC <before>K-><after>K (<heap>K), <pause> ms
[INFO ][memory ] <s/start> - start time of collection (seconds since jvm start)
[INFO ][memory ] <end>     - end time of collection (seconds since jvm start)
[INFO ][memory ] <before>  - memory used by objects before collection (KB)
[INFO ][memory ] <after>   - memory used by objects after collection (KB)
[INFO ][memory ] <heap>    - size of heap after collection (KB)
[INFO ][memory ] <pause>   - total pause time during collection (milliseconds)
<Apr 25, 2011 3:08:38 PM EDT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
/home/sdyade/oracle/bea923/weblogic92/platform/lib/p13n/p13n-schemas.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/p13n/p13n_common.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/p13n/p13n_system.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/wlp/netuix_common.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/wlp/netuix_schemas.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/wlp/netuix_system.jar:/home/sdyade/oracle/bea923/weblogic92/platform/lib/wlp/wsrp-common.jar>
<Apr 25, 2011 3:08:39 PM EDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.2.0-131-78843-1.5.0_10-20070320-1511-linux-ia32 from BEA Systems, Inc.>
<Apr 25, 2011 3:08:40 PM EDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 MP3  Mon Mar 10 08:28:41 EDT 2008 1096261 >
<Apr 25, 2011 3:08:42 PM EDT> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
Enter username to boot WebLogic server:weblogic
Enter password to boot WebLogic server:lotus1234
<Apr 25, 2011 3:08:56 PM EDT> <Info> <WebLogicServer> <BEA-000215> <Loaded License : /home/sdyade/oracle/bea923/license.bea>
<Apr 25, 2011 3:08:56 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Apr 25, 2011 3:08:56 PM EDT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<Apr 25, 2011 3:08:57 PM EDT> <Notice> <Log Management> <BEA-170019> <The server log file /home/sdyade/oracle/bea923/user_projects/domains/PRODISW/servers/prodisw_admin_222/logs/prodisw_admin_222.log is opened. All server side log events will be written to this file.>

Please let me know if this helps.

Thanks
~ Shailesh

Wednesday, April 6, 2011

Install / Uninstall WebLogic as Windows Service

Hello Guys,

In this post we discuss about Installing and Uninstalling WebLogic as Windows Service. Here its tried on WebLogic 10.3.3, Please let me know if you face any issues following this article.

Assume you have following properties set at Windows XP/Any Operating System.

WebLogic Home : C:\Oracle\Middleware\wlserver_10.3
Domain Home : C:\Oracle\Middleware\user_projects\domains\TestDomain
Server Name : AdminServer

Installing WebLogic as Windows Service

Create a batch file called : Service.bat with following contents.

echo off
SETLOCAL

set DOMAIN_NAME=
TestDomain
set USERDOMAIN_HOME=C:\Oracle\Middleware\user_projects\domains\TestDomain
set SERVER_NAME=AdminServer

call "
C:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"

ENDLOCAL


Note : If you would like to troubleshoot on this, please specify the -log parameter in the installSvc.cmd file as below. 


"%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -log:"D:\WinService.log" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%

by this if you see any issues while you setup or after you have setup the windows service, you will be able to troubleshoot over the same.

Note : Specify the variables values accordingly, and for managed server you need to use the script installSvc-Managed.cmd in place of installSvc.cmd

And Execute the file in command window or just a Double Click

It will install the WebLogic Server Windows Service With the Name : "TestDomain_AdminServer", however you change the name with the help of editing the script of installSvc.cmd / installSvc-Managed.cmd.

Uninstalling WebLogic as Windows Service :

In this Scenario we have to create the same script with little modifications as below :

echo off
SETLOCAL

set DOMAIN_NAME=
TestDomain
set USERDOMAIN_HOME=C:\Oracle\Middleware\user_projects\domains\TestDomain
set SERVER_NAME=AdminServer

call "
C:\Oracle\Middleware\wlserver_10.3\server\bin\uninstallSvc.cmd"

ENDLOCAL


Note : Same script here (uninstallSvc.cmd) goes for Uninstalling WebLogic Service for Admin Server as well as Managed Server.

Execute the script with a double click or in command shell, it will remove the service what you have specified with the name as "TestDomain_AdminServer"  or if you have any custom name, you can set it in uninstallSvc.cmd file.

Please let me know if you have any kind of difficulty in following this article.

Thanks
Shailesh Dyade