Repair command is currently disabled, enable-repair-commands = yes

I am assembling a demo of Migrating Party to Another Participant Node but was getting a runtime exception.

participant=participant1 -
The command is currently disabled.
You need to enable it explicitly by setting
`canton.features.enable-repair-commands = yes`
in your Canton configuration file (`.conf`)

That was confusing because my participant1.conf did have the command enabled:

canton {
  features.enable-preview-commands = yes
  features.enable-repair-commands = yes
  participants {
    participant1 {
      storage.type = memory
      ledger-api.port = 5003
      ledger-api.address = participant1
      admin-api.port = 5004
      admin-api.address = participant1
    }
  }
}

What was I doing wrong?

In my case, I was running the Canton script (*.canton file) using Remote Administration and a remote.conf file. It was the remote.conf file that needed the the repair commands enabled, not the participant1.conf.

So the modified and correct remote.conf file was/is?

// Include TLS configuration
include required("../tls/mtls-admin-api.conf")
include required("../tls/tls-ledger-api.conf")
canton {
    features.enable-preview-commands = yes <- Entry here
    features.enable-repair-commands = yes <- Entry here
    remote-participants.participant {
        ledger-api {
            address = localhost
            port = 10001
            tls = ${?_shared.ledger-api-client-tls}
        }
        admin-api {
            address = localhost
            port = 10002
            tls = ${?_shared.admin-api-client-mtls}
        }
    }
}

With the relevant REPAIR commands commented out in the participant1.conf file?

Removal of duplicate line in Canton primary code block.

Thanks @WallaceKelly

@Ben_M Yes, that works for me in my soon-to-be-published example.

1 Like