При запуске узла шнура в докере я получаю сообщение об ошибке ActiveMQ:
Pulling node ... done
Recreating node_1 ... done
Attaching to node_1
node_1 |
node_1 | ______ __
node_1 | / ____/ _________/ /___ _
node_1 | / / __ / ___/ __ / __ `/ There are two rules for financial success:
node_1 | / /___ /_/ / / / /_/ / /_/ / 1) Don't tell everything you know.
node_1 | \____/ /_/ \__,_/\__,_/
node_1 |
node_1 | --- Corda Open Source 3.3-corda (c834162) -----------------------------------------------
node_1 |
node_1 |
node_1 | Logs can be found in : /opt/corda/logs
node_1 | Database connection url is : jdbc:h2:tcp://172.23.0.2:35117/node
node_1 | Advertised P2P messaging addresses : 0.0.0.0:10002
node_1 | RPC connection address : 0.0.0.0:10003
node_1 | RPC admin connection address : 0.0.0.0:10004
node_1 | [ERROR] 10:35:37+0000 [main] internal.Node.run - Exception during node startup
node_1 | org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException: AMQ119007: Cannot connect to server(s). Tried with all available servers.
node_1 | at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:787) ~[artemis-core-client-2.2.0.jar:2.2.0]
node_1 | at net.corda.nodeapi.internal.ArtemisMessagingClient.start(ArtemisMessagingClient.kt:39) ~[corda-node-api-3.3-corda.jar:?]
node_1 | at net.corda.node.services.messaging.RPCMessagingClient.start(RPCMessagingClient.kt:19) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.Node.startMessagingService(Node.kt:308) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.AbstractNode$start$4.invoke(AbstractNode.kt:256) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.AbstractNode$start$4.invoke(AbstractNode.kt:105) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.AbstractNode$initialiseDatabasePersistence$2.invoke(AbstractNode.kt:700) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.AbstractNode$initialiseDatabasePersistence$2.invoke(AbstractNode.kt:105) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.nodeapi.internal.persistence.CordaPersistence.inTopLevelTransaction(CordaPersistence.kt:152) ~[corda-node-api-3.3-corda.jar:?]
node_1 | at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:138) ~[corda-node-api-3.3-corda.jar:?]
node_1 | at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:124) ~[corda-node-api-3.3-corda.jar:?]
node_1 | at net.corda.nodeapi.internal.persistence.CordaPersistence.transaction(CordaPersistence.kt:131) ~[corda-node-api-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.AbstractNode.initialiseDatabasePersistence(AbstractNode.kt:699) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.Node.initialiseDatabasePersistence(Node.kt:347) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.AbstractNode.start(AbstractNode.kt:207) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.Node.start(Node.kt:361) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.NodeStartup.startNode(NodeStartup.kt:203) ~[corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.internal.NodeStartup.run(NodeStartup.kt:126) [corda-node-3.3-corda.jar:?]
node_1 | at net.corda.node.Corda.main(Corda.kt:13) [corda-node-3.3-corda.jar:?]
node_1 exited with code 1
Узел нормально работает на локальном компьютере вне докера.Кто-нибудь может дать мне некоторую информацию о том, почему возникает эта ошибка?
Один репозиторий содержит файлы узлов корды, и этот Dockerfile:
FROM openjdk:8-jre
RUN mkdir -p /opt/corda/
COPY corda.jar /opt/corda/
COPY corda-webserver.jar /opt/corda/
RUN chmod +x /opt/corda/*.jar
EXPOSE 8080
EXPOSE 10002
EXPOSE 10003
EXPOSE 10004
WORKDIR /opt/corda/
CMD ["java", "-Xmx512m", "-jar", "corda.jar"]
Другой репозиторий содержит файлы конфигурации, специфичные для узлов, и docker-compose.yml
version: '2.1'
services:
node:
image: private/repository/with/above/docker:latest
ports:
- "8080:8080"
- "10002:10002"
- "10003:10003"
- "10004:10004"
volumes:
- ./config/certificates/:/opt/corda/certificates/
- ./config/node.conf:/opt/corda/node.conf
- ./logs/:/opt/corda/logs/
- ~/cordapps/:/opt/corda/cordapps/
Извлечь из node.conf
"p2pAddress" : "0.0.0.0:10002",
"rpcSettings" : {
"address" : "0.0.0.0:10003",
"adminAddress" : "0.0.0.0:10004"
},
Узлы работают и работают без докера, но мы действительно предпочли бы запускать их в док-контейнере.