If the server does not start, then there are a number of potential causes.
The server or other administrative tool is already running
Only a single instance of the server can run at any time from the same installation root. Other administrative operations can prevent the server from being started. In such cases, the attempt to start the server should fail with a message like:
The <server> could not acquire an exclusive lock on file /ds/PingData<server>/locks/server.lock: The exclusive lock requested for file /ds/PingData<server>/locks/ server.lock was not granted, which indicates that another process already holds a shared or exclusive lock on that file. This generally means that another instance of this server is already running.
If the server is not running (and is not in the process of starting up or shutting down), and there are no other tools running that could prevent the server from being started, it is possible that a previously held lock was not properly released. Try removing all of the files in the locks directory before attempting to start the server.
There is not enough memory available
When the server is started, the Java Virtual Machine (JVM) attempts to allocate all memory that it has been configured to use. If there is not enough free memory available on the system, the server generates an error message indicating that it could not be started.
There are a number of potential causes for this:
- If the amount of memory in the underlying system has changed, the server might need to be re-configured to use a smaller amount of memory.
- Another process on the system is consuming memory and there is not enough memory to start the server. Either terminate the other process, or reconfigure the server to use a smaller amount of memory.
- The server just shut down and an attempt was made to immediately restart it. If the server is configured to use a significant amount of memory, it can take a few seconds for all of the memory to be released back to the operating system. Run the vmstat Installation and maintenance issues command and wait until the amount of free memory stops growing before restarting the server.
- If the system is configured with one or more memory-backed file systems (such as /tmp), determine if any large files are consuming a significant amount of memory. If so, remove them or relocate them to a disk-based file system.
An invalid Java environment or JVM option was used
If an attempt to start the server fails with 'no valid Java environment could be found,' or 'the Java environment could not be started,' and memory is not the cause, other causes may include the following:
- The Java installation that was previously used to run the server no longer exists. Update the config/java.properties file to reference the new Java installation and run the bin/dsjavaproperties command to apply that change.
- The Java installation has been updated, and one or more of the options that had worked with the previous Java version no longer work. Re-configure the server to use the previous Java version, and investigate which options should be used with the new installation.
- If an
UNBOUNDID_JAVA_BINenvironment variable is set, its value may override the path to the Java installation used to run the server (defined in the config/java.properties file). Similarly, if an
UNBOUNDID_JAVA_ARGSenvironment variable is set, then its value might override the arguments provided to the JVM. If this is the case, explicitly unset the
UNBOUNDID_JAVA_ARGSenvironment variables before starting the server.
Any time the config/java.properties file is updated, the bin/dsjavaproperties tool must be run to apply the new configuration. If a problem with the previous Java configuration prevents the bin/dsjavaproperties tool from running properly, remove the lib/set-java-home script (or lib\set-java-home.bat file on Microsoft Windows) and invoke the bin/dsjavaproperties tool with an explicitly-defined path to the Java environment, such as:
$ env UNBOUNDID_JAVA_HOME=/ds/java bin/dsjavaproperties
An invalid command-line option was used
There are a small number of arguments that can be provided when running the bin/start-server command. If arguments were provided and are not valid, the server displays an error message. Correct or remove the invalid argument and try to start the server again.
The server has an invalid configuration
If a change is made to the server configuration using dsconfig or the administrative console, the server will validate the change before applying it. However, it is possible that a configuration change can appear to be valid, but does not work as expected when the server is restarted.
In most cases, the server displays (and writes to the error log) a message that explains the problem. If the message does not provide enough information to identify the problem, the logs/config-audit.logfile provides recent configuration changes, or the config/archived-configs directory contains configuration changes not made through a supported configuration interface. The server can be started with the last valid configuration using the -- useLastKnownGoodConfig option:
$ bin/start-server --useLastKnownGoodConfig
To determine the set of configuration changes made to the server since the installation, use the config-difftool with the arguments --sourceLocal --targetLocal --sourceBaseline. The dsconfig --offline command can be used to make configuration changes.
Proper permissions are missing
The server should only be started by the user or role used to initially install the server. However, if the server was initially installed as a non-root user and then started by the root account, the server can no longer be started as a non-root user. Any new files that are created are owned by root.
If the user account used to run the server needs to change, change ownership of all files in the installation to that new user. For example, if the server should be run as the "ds" user in the "other" group, run the following command as root:
$ chown -R ds:other /ds/PingData<server>