WebLogic Server - OGG Domain under Windows7 Startup and Shutdown Admin Server and Managed Servers 12.09.2014 1. Startup and Stop without userid and password prompts 1.1. User credentials for starting and stopping of WebLogic servers If you start or stop the administration server or any managed server you must enter the administrator username and password. If you want start and stop the server by a scheduling system you need another way to deliver this user credentials. With the Boot Identity File WebLogic offers such solution. This is a simple text file but after the first server startup the contents of this file will be encrypted. 1.2. Name and Location of the Boot Identity File The name of the Boot Identity File is "boot.properties". It must be created in the <domain_name>/server/<server_name>/security directory for each WebLogic server (admin or managed). In my case these are the three locations: Administration Server: d:\oracle\wls\ogg_1213_domain\servers \Adminserver\security Managed Server for OGG Monitor: d:\oracle\wls\ogg_1213_domain\servers \MONITORSERVER_server1\security Managed Server for OGG Veridata: d:\oracle\wls\ogg_1213_domain\servers \VERIDATA_server1\security Note: If the subfolder "security" does not exist it must be created in each directory.
1.3. Boot Identity File: "boot.properties" The file contains only two lines first with the username and the second with the password of the server administration user (see figures 1 & 2). Figure 1: File "boot.properties" of the administration server after create Figure 2: File "boot.properties" of the administration server after first startup
You must create the "boot.properties" file for each server where you want suppress username and password prompts (see also 2.) 2. Using Startup and Shutdown Scripts 2.1. Startup Scripts If you open a command prompt you should be able to execute the startup script from your home directory. In Figure 3 my home directory is C:\Users\JJ and all scripts are located there. Figure 3: Location of startup and shutdown scripts
start_wls.bat - Startup script of the domain admin server cd oracle\wls\ogg_1213_domain\bin startweblogic.cmd start_mon.bat - Startup script of the managed server of OGG Monitor cd oracle\wls\ogg_1213_domain\bin startmanagedweblogic.cmd MONITORSERVER_server1 http://jjt420:7001 start_ver.bat - Startup script of the managed server of OGG Veridata cd oracle\wls\ogg_1213_domain\veridata\bin veridataserver.bat start VERIDATA_server1 http://jjt420:7001 Use the Weblogic Console to check that all servers are started and running: (http://jjt420.de.oracle.com:7001/console) Figure 4: WebLogic Console Domain Environment Servers
2.2. Shutdown Scripts stop_mon.bat - Shutdown script of the managed server of OGG Monitor cd oracle\wls\ogg_1213_domain\bin stopmanagedweblogic.cmd MONITORSERVER_server1 http://jjt420:7001 stop_ver.bat - Startup script of the managed server of OGG Veridata cd oracle\wls\ogg_1213_domain\veridata\bin veridataserver.bat stop VERIDATA_server1 http://jjt420:7001 stop_wls.bat - Shutdown script of the domain Admin Server cd oracle\wls\ogg_1213_domain\bin stopweblogic.cmd Note: If the admin server running you can also startup and shutdown the managed servers from the WebLogic console. 2.3. Shutdown script terminated with error If you use the HTTP protocol and a shutdown script failed with the error messages how you can see in table 1 you must "Enable Tunneling" for this server:
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\JJ>stop_mon C:\Users\JJ> D:\>cd oracle\wls\ogg_1213_domain\bin D:\Oracle\wls\ogg_1213_domain\bin>stopmanagedweblogic.cmd MONITORSERVER_server1 http://jjt420:7001 Stopping Weblogic Server... Logging configuration class "oracle.core.ojdl.logging.loggingconfiguration" failed java.lang.classnotfoundexception: oracle.core.ojdl.logging.loggingconfiguration Initializing WebLogic Scripting Tool (WLST)... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Connecting to http://jjt420:7001 with userid weblogic... This Exception occurred at Thu Sep 11 10:50:34 CEST 2014. javax.naming.communicationexception: http://jjt420:7001: Destination 10.165.253.34, 7001 unreachable; nested exception is: java.net.protocolexception: Tunneling result unspecified - is the HTTP server at host: '10.165.253.34' and port: '7001' a WebLogic Server?; No available router to destination [Root exception is java.net.connectexception: http://jjt420:7001: Destination 10.165.253.34, 7001 unreachable; nested exception is: java.net.protocolexception: Tunneling result unspecified - is the HTTP server at host: '10.165.253.34' and port: '7001' a WebLogic Server?; No available router to destination] Problem invoking WLST - Traceback (innermost last): File "D:\Oracle\wls\ogg_1213_domain\shutdown-MONITORSERVER_server1.py", line 3, in? File "<iostream>", line 19, in connect File "<iostream>", line 552, in raisewlstexception WLSTException: Error occurred while performing connect : Cannot connect via http. Connecting through "http" will require you to enable "TunnellingEnabled" attribute on the ServerMBean to "true" : http://jjt420: 7001: Destination 10.165.253.34, 7001 unreachable; nested exception is: java.net.protocolexception: Tunneling result unspecified - is the HTTP server at host: '10.165.253.34' and port: '7001' a WebLogic Server?; No available router to destination Use dumpstack() to view the full stacktrace : Done Stopping Derby Server... Derby server stopped. D:\Oracle\wls\ogg_1213_domain\bin> Table 1: Error messages at shutdown a server
2.4. "Enable Tunneling" using WebLogic Console Domain Environment Servers choose a server Protocols HTTP Figure 5-1: Managed server MONITORSERVER_server1 settings (Top) scroll down and click (activate) "Enable Tunneling" Figure 5-2: Managed server MONITORSERVER_server1 settings (Bottom)
Note: You must use Change Center (top left corner) Buttons "Lock & Edit" and "Activate Changes": 1. Lock & Edit 2. 3. Activate Changes click Enable Tunneling & save 3. Further Information Oracle Fusion Middleware Administering Server Startup and Shutdown for Oracle WebLogic Server 12c E41938-01 June 2014 http://docs.oracle.com/middleware/1213/wls/start.pdf