Keep OpenDJ Windows Service running 24/7 with Service Protector

How to Keep your OpenDJ Windows Service Running 24/7 with Service Protector

Automatically restart OpenDJ whenever it hangs, crashes or stops for any reason. Ensure that your LDAP server is always available.

OpenDJ is a popular open source implementation of the Lightweight Directory Access Protocol (LDAP).

The Java-based server can be installed as a Windows Service, to start automatically whenever your computer boots. We have installed OpenDJ Community Edition version 4.4 for this tutorial:


To monitor & protect OpenDJ with Service Protector:

  1. If necessary, download and install OpenDJ. We recommend using the Windows MSI installer, which has the option to set up OpenDJ as a Windows Service:

    After installation, make sure everything works as you expect.

  2. Download and install Service Protector, if necessary.

  3. Start Service Protector.

  4. Select Protector > Add to open the Add Protector window:

    Add Protector

  5. On the General tab, in the Service to protect dropdown, select the OpenDJ Server entry:

    OpenDJ Windows Service: General Tab

  6. One of our customers experienced a problem where the OpenDJ Java process would grow larger and larger, eventually failing with a hang or an out of memory error. To avoid this, we suggest recycling the service once a week during a scheduled maintenance window or at a "quiet" time.

    To set up a weekly restart, check the At the following times box, click the Add button and specify the time to restart.

    Every Sunday at 1 AM works for us:

    OpenDJ Windows Service: Monitor Tab

  7. Click the Save button to record your settings. In a few seconds, a new entry will appear in the Service Protector window.

    The green shield indicates that Service Protector is already actively monitoring OpenDJ to detect failures:

    OpenDJ Windows Service: Protected

  8. That's it! Next time your computer boots, OpenDJ will start automatically and Service Protector will babysit the service to promptly restart it if it stops for any reason.

    We encourage you to edit your OpenDJ entry in Service Protector and browse through the many other settings that may be appropriate for your environment. For example, send an email when the service fails, run a batch file to clear log files whenever the service stops, and much more.



Trouble protecting the OpenDJ Windows Service?