I found that I was killing time in my local dev environment by using the wls console to issue a force shutdown request, wait for the screen to refresh with the updated status, then issue a startup request. I would often start another task while the shutdown was underway, but then forget to issue the startup request. As you know, the 10g startup time would be in the two to five minute range when running on a local vm, but 11g can easily be five to ten minutes.
Here's a quick rundown of what's happening in the attached scripts:
The UCMrestart.py script ties together the sub-scripts. This will allow for easy reuse when alterations are required or more than one server needs to be maintained. I would also consider parameterizing some of the variables.
print 'connecting to admin server....'
connect( 'weblogic', 'welcome1', 't3://localhost:7001', adminServerName='AdminServer' )
print 'trying to start adminserver...'
print 'Error while starting the AdminServer...'
The connect script takes care of creating the connection to the server. If there is an error, the script will attempt to start the Admin server. Note that the username, password, host, port, and admin server name may need to be updated to match your instance.
print 'stopping and undeploying ....'
print('sleeping for 5 seconds...')
The restart_ucm script manages the shutdown and startup of the UCM managed server. Note that it uses the default Managed Server name.
There is a five second delay before the startup process occurs. I found that there were intermittent issues with the startup without creating some buffer between the shutdown procedure and the startup.
The process is timestamped to track the amount of time the process took to complete.
print 'disconnecting from admin server....'The disconnect script simply manages the cleanup process.
Let me know if you have any issues with the script. This is been tested on OEL5u5. You'll want to make sure you have java pointed to a sun jre opposed to the git version that a number of Linux instances are defaulted.
If you have any deployments, clustering needs or other, feel free to post a comment below.
Here is a sample execution:
java -cp '/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar' weblogic.WLST UCMrestart.py
Download script files