---
title: The server will not run setup
description: Resolve PingDirectory setup tool failures caused by a missing Java environment, unavailable Berkeley DB Java Edition, or a server that is already configured.
component: pingdirectory
version: 10.2
page_id: pingdirectory:troubleshooting_the_pingdirectory_suite_of_products:pd_ds_server_will_not_run_setup
canonical_url: https://docs.pingidentity.com/pingdirectory/11.1/troubleshooting_the_pingdirectory_suite_of_products/pd_ds_server_will_not_run_setup.html
llms_txt: https://docs.pingidentity.com/pingdirectory/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2024-08-14T00:00:00Z
page_aliases: ["pd_ds_suitable_java_env_not_available.adoc", "pd_ds_oracle_berkeley_db_java_ed_not_avail.adoc", "pd_ds_unexpected_args_provided_jvm.adoc", "pd_ds_server_already_config_used.adoc"]
superseded_by: https://docs.pingidentity.com/pingdirectory/11.1/troubleshooting_the_pingdirectory_suite_of_products/pd_ds_server_will_not_run_setup.html
section_ids:
  a-suitable-java-environment-is-not-available: A suitable Java environment is not available
  oracle-berkeley-db-java-edition-is-not-available: Oracle Berkeley DB Java Edition is not available
  unexpected-arguments-provided-to-the-jvm: Unexpected arguments provided to the JVM
  the-server-has-already-been-configured-or-used: The server has already been configured or used
---

# The server will not run setup

If the `setup` tool does not run properly, some of the most common reasons include the following.

## A suitable Java environment is not available

The server requires that Java be installed on the system and made available to the server, and it must be installed before running `setup`. If the `setup` tool does not detect that a suitable Java environment is available, it will refuse to run.

To ensure that this does not happen, the `setup` tool should be invoked with an explicitly-defined value for the `JAVA_HOME` environment variable that specifies the path to the Java installation that should be used. For example:

```
env JAVA_HOME=/ds/java ./setup
```

If this still does not work for some reason, then it can be that the value specified in the provided `JAVA_HOME` environment variable can be overridden by another environment variable. If that occurs, try the following command, which should override any other environment variables that can be set:

```
env UNBOUNDID_JAVA_HOME="/ds/java" UNBOUNDID_JAVA_BIN="" ./setup
```

## Oracle Berkeley DB Java Edition is not available

|   |                                                      |
| - | ---------------------------------------------------- |
|   | This topic applies only to the PingDirectory server. |

If the version of the server that you are using was not provided with the Oracle Berkeley DB Java Edition library, then it must be manually downloaded and the appropriate JAR file placed in the `lib` directory before running setup. See the `lib/downloading-je.txt` file for instructions on obtaining the appropriate library.

## Unexpected arguments provided to the JVM

If the `setup` script attempts to launch the java command with an invalid set of Java arguments, it might prevent the JVM from starting. By default, no special options are provided to the JVM when running setup, but this might not be the case if either the `JAVA_ARGS` or `UNBOUNDID_JAVA_ARGS` environment variable is set. If the `setup` tool displays an error message that indicates that the Java environment could not be started with the provided set of arguments, then invoke the following command before trying to re-run `setup`:

```
unset JAVA_ARGS UNBOUNDID_JAVA_ARGS
```

## The server has already been configured or used

The `setup` tool is only intended to provide the initial configuration for the server. It refuses to run if it detects that the `setup` tool has already been run, or if an attempt has been made to start the server before running the `setup` tool. This protects an existing server installation from being inadvertently updated in a manner that could harm an existing configuration or data set.

If the server has been previously used and if you want to perform a fresh installation, it is recommended that you first remove the existing installation, create a new one and run `setup` in that new installation. However, if you are confident that there is nothing of value in the existing installation (for example, if a previous attempt to run `setup` failed to complete successfully for some reason but it will refuse to run again), the following steps can be used to allow the `setup` program to run:

* Remove the `config/config.ldif` file and replace it with the `config/update/config.ldif.{revision}` file containing the initial configuration.

* If there are any files or subdirectories below the `db` directory, then remove them.

* If a `config/java.properties` file exists, then remove it.

* If a `lib/setup-java-home` script (or `lib\set-java-home.bat` file on Microsoft Windows) exists, then remove it.
