Canton Manual Start Failing in Kubernetes Pod

I’m trying to run Canton in manual start mode in a Kubernetes pod to do a migration. Running into the following error. Any help is appreciated!

{“timeStamp”:“2022-10-04T16:26:54.896Z”,“message”:“Running CoordinatedShutdown with reason [ActorSystemTerminateReason]”,“logger”:“akka.actor.CoordinatedShutdown”,“thread”:“canton-env-execution-context-17”,“level”:“INFO”}

{“timeStamp”:“2022-10-04T16:27:14.845Z”,“message”:“Starting Canton version 2.3.4”,“logger”:“com.digitalasset.canton.CantonEnterpriseApp$”,“thread”:“main”,“level”:“INFO”}

{“timeStamp”:“2022-10-04T16:27:15.787Z”,“message”:“Can not determine user home directory using the java system property user.home \n (is set to /home/app). Please set it \non jvm startup using -Duser.home=…”,“logger”:“com.digitalasset.canton.console.AmmoniteConsoleConfig$”,“thread”:“main”,“level”:“WARN”}

{“timeStamp”:“2022-10-04T16:27:16.410Z”,“message”:“Deriving 2 as number of threads from ‘sys.runtime.availableProcessors()’. Please use ‘-Dscala.concurrent.context.numThreads’ to override.”,“logger”:“com.digitalasset.canton.environment.EnterpriseEnvironment”,“thread”:“main”,“level”:“INFO”}

{“timeStamp”:“2022-10-04T16:27:16.763Z”,“message”:“Slf4jLogger started”,“logger”:“akka.event.slf4j.Slf4jLogger”,“thread”:“canton-env-execution-context-17”,“level”:“INFO”}

{“timeStamp”:“2022-10-04T16:27:18.246Z”,“message”:“Manual start requested.”,“logger”:“com.digitalasset.canton.environment.EnterpriseEnvironment”,“thread”:“main”,“level”:“INFO”}

Compiling (synthetic)/ammonite/predef/ArgsPredef.sc

Compiling /(console)

sh: /dev/tty: No such device or address

Nonzero exit value: 1

1 Like

In case anyone runs into the same issue, the solution is to start the pod with “-i --tty” options. In a deployment yaml, this would be under the spec → containers section. Hope this helps!

2 Likes

Good find, @stephenwsun :+1: Another option is to pass the --no-tty CLI argument when starting Canton which allows running the binary without an owner terminal.

1 Like