权限被拒绝通过systemctl启动Cordapp

时间:2018-04-25 19:40:40

标签: corda

在Ubuntu上启动示例cordapp作为服务:https://docs.corda.net/releases/release-V3.1/deploying-a-node.html

在运行节点时,我收到以下错误:

Apr 25 17:48:04 single-node-marketplace-master systemd[1]: Started Cordapp Example - party B.
Apr 25 17:48:22 single-node-marketplace-master java[99477]: Exception in thread "main" java.io.IOException: Permission denied
Apr 25 17:48:22 single-node-marketplace-master java[99477]:         at java.io.UnixFileSystem.createFileExclusively(Native Method)
Apr 25 17:48:22 single-node-marketplace-master java[99477]:         at java.io.File.createNewFile(File.java:1012)
Apr 25 17:48:22 single-node-marketplace-master java[99477]:         at net.corda.node.internal.NodeStartup.enforceSingleNodeIsRunning(NodeStartup.kt:226)
Apr 25 17:48:22 single-node-marketplace-master java[99477]:         at net.corda.node.internal.NodeStartup.run(NodeStartup.kt:53)
Apr 25 17:48:22 single-node-marketplace-master java[99477]:         at net.corda.node.Corda.main(Corda.kt:13)

1 个答案:

答案 0 :(得分:0)

Cordapp正在作为“corda”用户启动。确保您已创建用户并在/opt/<cordapp name>

中设置权限
sudo adduser --system --no-create-home --group corda
sudo chown corda:corda /opt/partyB