corda - 分析 Corda 应用程序
问题描述
我正在尝试针对 CorDapp 运行一些检测/分析 - 对于这个问题,这里的示例 cordapp:https ://github.com/corda/cordapp-example.git version release-3。
但是,当我尝试根据jvm runtime
corda shell 将 VisualVM 附加到正在运行的 PID 时,我收到如下错误:
(来自 VisualVM 的 Profile 选项卡)
Mon Jun 11 15:17:36 BST 2018>>> Profiler Agent: JNI OnLoad Initializing...
Profiler Agent: JNI OnLoad Initialized successfully
Profiler Agent: Waiting for connection on port 5140 (Protocol version: 18)
Profiler Agent: Established connection with the tool
Profiler Agent: Local accelerated session
Profiler Agent Error: Exception when handling command from client:
java.io.InvalidClassException: filter status: REJECTED
Profiler Agent: Connection with agent closed
或(从采样器选项卡)
CPU sampling:
Not available. Cannot access threads in target application. Check the logfile for details (use Help | About | Logfile).
日志文件给了我这个有用的错误:
WARNING [org.netbeans.modules.profiler.NetBeansProfiler]: IDEAppStatusHandler - error: {)}
*** Profiler error (Mon Jun 11 15:17:59 BST 2018): exception while trying to get response from the target JVM:
java.net.SocketException: Connection reset
INFO [com.sun.tools.visualvm.sampler.cpu.ThreadInfoProvider]: mxbeans.getThreadMXBean() returns null for Application [id: localhost-10884, pid: 10884, host: localhost]
我在 MacOS 和 Ubuntu 上都试过了,但我遇到了同样的问题——所以我不认为这是 Java 安装问题。
任何指针!?
解决方案
VisualVM 使用 Java 序列化。出于安全原因,Corda 禁止 Java 序列化。
open protected fun banJavaSerialisation(conf: NodeConfiguration) {
SerialFilter.install(if (conf.notary?.bftSMaRt != null) ::bftSMaRtSerialFilter else ::defaultSerialFilter)
}
推荐阅读
- android - 适用于 Android 的 Unity 插件中的本机库加载顺序
- php - Simplesamlphp IdP 登录后重定向到错误的 url
- chart.js - 带有chartjs的垂直打孔卡
- c# - Fluent nHibernate - 将多态属性映射到表中的单个列
- c# - LINQ Select - CS0411 无法从使用错误推断类型参数
- python - 试图理解 Python MRO,但对其解析顺序感到困惑
- python-3.x - 我需要计算两个按钮的点击次数,然后是 python 中的百分比列表
- java - 有没有办法从扫描仪输入中检索个人信息?
- python - Python中调用方法的不同方式,它们是如何工作的?
- python - 双循环python巨大矩阵 - 并行化