Set Up Automatic Startup

It is possible to configure any Windows service to restart itself upon failure. These are standard options available when configuring a Windows service in the context of Windows Services Manager.

However, it is important to understand that Windows Services Manager only monitors the service's JVM process. If the JVM process fails (shuts down), then Windows Services Manager will attempt to restart it. But there are some scenarios where the WebLogic Admin Server or Managed Server may go into an unhealthy or failed state while the JVM is still running. The Windows Service Manager will not know to restart the process in these cases, whereas if the Admin Server and Managed Server had been started using the WebLogic Node Manager, Node Manager would recognize such a state and restart the process.

Oracle recommends starting the Admin and Managed Servers through the Node Manager using python scripts and then configuring the Windows server to execute the python scripts at startup.

To start servers manually, see How to Start Servers Manually.

This section includes:

Create boot.properties

Check if the boot.properties file exists in Oracle_Home\user_projects\domains\FRDomain\servers\AdminServer\security.

If not, create it as a plain text file with the following contents:

username = weblogic_user_name
password = weblogic_user_password

By default, the WebLogic user name is weblogic. This user name and password will get encrypted after all services are started.

Increase the Delay for Auto Start OPADomain and FRDomain

For OPADomain and FRDomain to start successfully, depending on the performance in your environment, you may want to increase the delay by which OPADomain and FRDomain start to allow time for Node Manager to start first.

  1. Go to OPA_HOME\config\opa_setup_scripts\ directory.
  2. Open the autostartfrdomain.cmd and autostartopadomain.cmd files.
  3. In each file, find the line PING 127.0.0.1 -n 30, and change the value from 30 to 60.
  4. Save and close the files.

Set Up Scripts to Execute Automatically at Machine Startup

Set up the Task Scheduler to start the FRDomain and OPADomain at startup:

  1. From Start, then Control Panel, then Administrative Tools, open Task Scheduler.
  2. Select Create Basic Task on the right side of the Task Scheduler.
  3. Enter the following values:

    Name: Oracle FRDomainNM Autostart

    Trigger: When the computer starts

    Action: Start a program

    Select: opa_home\config\opa_setup_scripts\autostartfrdomainNM.cmd

  4. Click Next and then Finish to complete creation of the scheduled task.
  5. Find the task Oracle Domain Autostart under the Task Scheduler Library list. Right-click on the task you just created and select Properties.
  6. On the General tab, select Run whether user is logged on or not.
  7. On the Settings tab, deselect the Stop the task if it runs longer than : check box.
  8. Click OK.
  9. When prompted, enter the user name and password.
  10. Repeat the above steps for OPADomain Node Manager, OPADomain, and FRDomain, except for step 3 enter:
    • For OPADomain Node Manager:

      Name: Oracle OPADomainNM Autostart

      Select: opa_home\config\opa_setup_scripts\autostartopadomainNM.cmd

    • For OPADomain:

      Name: Oracle OPADomainMS Autostart

      Select: opa_home\config\opa_setup_scripts\autostartOPADomain.cmd

    • For FRDomain:

      Name: Oracle FRDomainMS Autostart

      Select: opa_home\config\opa_setup_scripts\autostartfrdomain.cmd

  11. Back up the autostartfrdomainscript.py and autostartopadomainscript.py files from <OPA_HOME>\config\opa_setup_scripts\domain\lifecycle.
  12. Update both the autostartfrdomainscript.py and autostartopadomainscript.py files by replacing the upgraded Oracle home path with the old Oracle home path. For example, replace C:\\<upgraded_oracle_home> with C:\\Oracle<old_oracle_home>.

Test Autostart

To test:

  1. Restart the computer.
  2. Allow some time for the services to start.
  3. Verify that the following URL works and you can log into the application:
    • TMS: https://host/opa54/launch.htm

    If the URLs do not work after several minutes, check files in opa_home\log:

    • autostartfrdomain2.log

    • autostartfrdomain2.err

    • autostartopadomain2.log

    • autostartopadomain2.cmd