Skip to content
rjrudin edited this page Jun 4, 2018 · 9 revisions

When running an ml-gradle task such as "mlDeploy", a number of things can go wrong - bad connection information, invalid username/password, malformed resource files, etc. This page intends to guide you through how to debug any errors that you run into before you have to ask for help.

Try this first

Before going any further, run the task that just failed with Gradle's info-level logging enabled - let's assume it was mlDeploy that failed:

gradle -i mlDeploy

With info-level logging enabled, ml-gradle will log a number of useful things:

  • Any overridden properties will be logged (except for passwords)
  • Every command executed by mlDeploy will be logged

mlDeploy, along with resource-specific tasks such as mlDeployUsers or mlDeployDatabases, run a series of commands, with generally one command per resource type. The logging for each command shows what directory the command looks along with each file that it processes. In the case of a malformed resource file, info-level logging should allow you to easily identify which file was unable to be processed.

Here's an example of the logging for a command - in this case, the command for deploying users:

Executing command [com.marklogic.appdeployer.command.security.DeployUsersCommand] with sort order [30]
Processing files in directory: /tmp/ml-config/security/users
Processing file: /tmp/ml-config/security/users/example-user.xml
Sending XML GET request as user with admin role 'admin' to path: /manage/v2/users
Found user with name of example-user, so updating at path /manage/v2/users/example-user/properties
Sending XML PUT request as user with admin role 'admin' to path: /manage/v2/users/example-user/properties
Updated user at /manage/v2/users/example-user/properties
Finished executing command [com.marklogic.appdeployer.command.security.DeployUsersCommand]
Clone this wiki locally