Corda 5 Developer Preview 2 is now available.

Resetting the CSDE

The CSDE creates temporary files to store data required to generate and upload Corda Package Installer (CPI) files and manage the Corda cluster. If these files are modified, deleted, or otherwise get out of sync with the actual state of the Corda cluster, the CSDE Gradle tasks may not function correctly.
For example:

  • A Corda cluster is started without using the startCorda task or by running startCorda from a different CSDE repository.
  • A CPI file is uploaded without using the CSDE Gradle task.

This section describes how to reset the CSDE to handle these situations or other occasions when the CSDE tasks are not working as expected. This process does the following:

  • Stops any processes related to the Corda cluster.
  • Removes the existing Corda cluster software (but not Corda CLI).
  • Deletes all of the temporary files that the CSDE creates and uses.
  • Runs the Gradle clean task to remove any CPI build artifacts.

The instructions in this section use the following terms:

  • project-root-dir — the project directory of the IntelliJ project contained in the repo. For example, if you git-cloned the corda/CSDE-cordapp-template-kotlin repo to /Users/charlie.smith/DevWork/DevExWork, <project-root-dir> is /Users/charlie.smith/DevWork/DevExWork/CSDE-cordapp-template-kotlin.
  • user-home — the user home directory.
    • On Windows, this is typically something like C:\Users\Charlie.Smith.
    • On macOS, this is typically something like /Users/charlie.smith.
    • On Linux, this typically something like /home/charlie.smith.

To rest the CSDE:

  1. Stop any running combined worker processes:

    • On Linux/macOS:
      1. To find the process ID (pid), run:
        ps | grep corda-combined-worker
        
      2. To stop the process, run:
        kill <pid-for-corda-combined-worker>
        
    • On Windows, run in PowerShell:
      Invoke-CimMethod -Query "SELECT * from Win32_Process WHERE name LIKE 'java.exe' and Commandline like '%corda-combined-worker%'" -MethodName "Terminate"
      
  2. Check if the above commands were successful:

    • On Linux/macOS, run:
      ps | grep corda-combined-worker
      
    • On Windows, run:
      Get-CimInstance -Query "SELECT * from Win32_Process WHERE name LIKE 'java.exe' and Commandline like '%corda-combined-worker%'"
      
  3. To stop any CSDEpostgresql containers, run:

    docker stop CSDEpostgresql
    

    You can check which containers are running using:

    docker ps
    
  4. Run the Gradle clean task:

    <project-root-dir>/gradlew clean
    
  5. Delete the <user-home>/.corda/corda5 directory and its contents.

  6. Delete the <project-root-dir>/workspace directory and its contents.

    You should now be able to run all CSDE Gradle tasks again. These download the Corda cluster software and recreate all of the temporary files, as required.

Was this page helpful?

Thanks for your feedback!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.

We're sorry this page wasn't helpful. Let us know how we can make it better!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Create an issue

Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.