daml - 为 DAML 快速入门教程启动沙盒时出错
问题描述
当我尝试启动 DAML SDK 快速入门教程的沙箱时,我收到了错误消息。任何人都可以帮忙吗?请参阅下面的错误。
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
解决方案
如果您碰巧遇到堆栈跟踪如下所示的错误,这可能是一个繁忙的端口
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)
要诊断和解决问题,您可以使用以下命令找到罪魁祸首
ss -ptan | grep 7600 | awk '{print $6}'
输出应如下所示
users:(("java",pid=8686,fd=131))
将pid
指向使用该端口的进程。您现在可以使用以下命令获取有关它的更多信息
ps -o pid,command -p 8686 # replace the pid with the one you found before
输出应如下所示
PID COMMAND
8686 java -jar /path/to/sandbox-6.0.0.jar --port 7600 /path/to/some.dar
根据此信息,您可以决定是否kill
处理并开始一个新的或保持这个运行。
推荐阅读
- python - 在某些索引中更改 numpy.array 中的字符串值
- android - Android:在 PIN EditText 上显示键盘
- reactjs - tinymce react - 清除编辑器内容
- php - Laravel 获取相关模型中用户的最后一行
- laravel - Laravel 自定义守卫记住我功能不适用于 AuthenticateUser 特征
- java - Oracle/Hibernate 插入 - java.lang.ArrayIndexOutOfBoundsException: 8
- python - 从 Python 签署 S/MIME 内容
- javascript - JavaScript 焦点:如何专注并留在那里?
- javascript - 您如何在您的网站中实施 quickblox?
- java - 如何在关机前触发点火检查点?