3 Replies Latest reply: May 9, 2013 12:50 AM by René van Wijk RSS

    Scripts for automatic start services on Weblogic Server

    kokito
      Hello friends,
      I try to create a script to automatic mode to upload the Admin server and server nodes weblogic 11g, any recommendations for this process

      Thanks
        • 1. Re: Scripts for automatic start services on Weblogic Server
          Vijaya Moderator -Oracle
          Hi there,

          Here's some of the helpful points for you start weblogic server automatically.

          Starting Server Automatically without Nodemanager

          1. If you are working on windows environment, you can start WebLogic as a windows services.
          http://docs.oracle.com/cd/E23943_01/web.1111/e13708/winservice.htm

          Please refer the above document, if you want WebLogic Server instance to start automatically when you boot a Windows host computer by setting up the server as a Windows service.

          Starting Server Automatically with Nodemanager

          2. If the JVM process fails (shuts down), then Windows Services Manager will attempt to restart it. But there are some scenarios where the Admin Server or Managed Server may go into an unhealthy or failed state but the JVM is still running. The Windows Service will not know to restart the process in these cases, whereas if the Admin Server and Managed Server had been started using Node Manager, Node Manager would recognize such a state and restart the process accordingly. So it may be desirable to start Node Manager with a Windows Service and then start the Admin Server and Managed Servers with Node Manager to take advantage of this monitoring feature. Below you will find one such example of how to do this.

          Example of starting the Admin Server and a Managed Server using Node Manager

          Create a batch script similar to this:
          Myscript.cmd
          call D:\Product\Oracle\Middleware\user_projects\domains\base_domain\bin\setDomainEnv.cmd
          java weblogic.WLST D:\Product\Oracle\Middleware\user_projects\domains\Vijaya_domain\ServerStart.py


          Create a Python script similar to this:
          ServerStart.py
          nmConnect('weblogic', 'welcome1', '192.168.0.101', '5556', 'Vijaya_domain','D:\Product\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~1','ssl')
          nmStart('AdminServer')
          connect ('weblogic','welcome1','t3://192.168.0.101:7001')
          nmstart('myserver','Server','t3://192.168.0.101:7002')

          If you want this to happen automatically on boot up, you can run the script (myscript.cmd) from the Windows Scheduler. You must configure the scheduler to run the script on system startup. This will execute the script without requiring an interactive login to Windows (unattended).

          Hope this helps!!


          Thanks,
          Vijaya
          • 2. Re: Scripts for automatic start services on Weblogic Server
            kokito
            Thanks, as through this process in a Linux environment
            • 3. Re: Scripts for automatic start services on Weblogic Server
              René van Wijk
              http://middlewaremagic.com/weblogic/?p=8187 (for starting and stopping servers) or http://middlewaremagic.com/weblogic/?p=8260 (to automate the set-up of a domain)