Error with Starting the Sandbox for the DAML Quickstart Tutorial

感情迁移 提交于 2020-01-06 08:43:37

问题


I am getting an error when I try to launch the sandbox for the DAML SDK Quickstart tutorial. Can anyone help? Please see the error below.

Cecils-MacBook-Pro:quickstart cezjah$ da run sandbox -- --port 7600 --scenario Main:setup target/daml/*
   ____             ____
  / __/__ ____  ___/ / /  ___ __ __
 _\ \/ _ `/ _ \/ _  / _ \/ _ \\ \ /
/___/\_,_/_//_/\_,_/_.__/\___/_\_\

Initialized sandbox version 6.0.0 with ledger-id = sandbox-e6f662a6-c492-4ca7-a3ab-5514eb897f50, port = 7600, dar file = DamlPackageContainer(List(target/daml/iou.dar),List(target/daml/ghc-prim.dalf)), time mode = Static, daml-engine = {}
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/Users/cezjah/.da/packages/sandbox/6.0.0/lib/protobuf-java-3.5.1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Initialized Static time provider, starting from 1970-01-01T00:00:00Z
DAML LF Engine supports LF versions: 1.0, 0; Transaction versions: 1; Value versions: 1
Starting plainText server
Shutting down Sandbox application because of initialization error

回答1:


It's probably a busy port if you happen to have experienced an error whose stack trace looks like the following

Shutting down Sandbox application because of initialization error
java.io.IOException: Failed to bind
at io.grpc.netty.NettyServer.start(NettyServer.java:231)
at io.grpc.internal.ServerImpl.start(ServerImpl.java:161)
at io.grpc.internal.ServerImpl.start(ServerImpl.java:76)
at com.digitalasset.platform.sandbox.SandboxApplication$SandboxServer.buildAndStartServer(SandboxApplication.scala:102)
at com.digitalasset.platform.sandbox.SandboxApplication$SandboxServer.start(SandboxApplication.scala:116)
at com.digitalasset.platform.sandbox.SandboxMain$.delayedEndpoint$com$digitalasset$platform$sandbox$SandboxMain$1(SandboxMain.scala:26)
at com.digitalasset.platform.sandbox.SandboxMain$delayedInit$body.apply(SandboxMain.scala:12)
at scala.Function0.apply$mcV$sp(Function0.scala:34)
at scala.Function0.apply$mcV$sp$(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App.$anonfun$main$1$adapted(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:389)
at scala.App.main(App.scala:76)
at scala.App.main$(App.scala:74)

To diagnose and solve the issue you can find the culprit with the following command

ss -ptan | grep 7600 | awk '{print $6}'

The output should look like the following

users:(("java",pid=8686,fd=131))

The pid will point you to the process that is using the port. You can now use the following command to gain more information about it

ps -o pid,command -p 8686 # replace the pid with the one you found before

The output should look like the following

 PID COMMAND
8686 java -jar /path/to/sandbox-6.0.0.jar --port 7600 /path/to/some.dar

Based on this information you can decide whether to kill the process and start a new one or to keep this one running.



来源:https://stackoverflow.com/questions/54756467/error-with-starting-the-sandbox-for-the-daml-quickstart-tutorial

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!