Me mudé de Runnodos a Docker, componer con la fiesta [A / B] y Notary Nodo. Un caso de uso que funcionaba con Runnodes ya no funciona, obviamente, debe estar relacionado con la nueva configuración de red. Intenté descargar las herramientas, pero la mayoría de los enlaces de descarga no funcionan. ¿Alguien puede darme una pista, por favor, qué puedo hacer? Un servidor de descanso Llama a la Party-A a través de RPC, le arroja un error después de un tiempo así:

api-gateway    | D 17:47:23 71 RPCClientProxyHandler.artemisMessageHandler - Got message from RPC server Observation(id=99f3bc35-10ec-4b0f-8fa2-15156fec43e4, timestamp: 2019-06-25T17:47:15.587Z, entityType: Invocation, content=[rx.Notification@66fc17ad OnNext [(0, Starting), (0, Generating transaction.), (0, Verifying contract constraints.), (0, Signing transaction with our private key.), (1, Collecting signatures from counterparties.), (1, Verifying collected signatures.), (0, Gathering the counterparty's signature.), (1, Collecting signatures from counterparties.), (1, Verifying collected signatures.), (0, Obtaining notary signature and recording transaction.), (1, Requesting signature by notary service), (2, Requesting signature by Notary service), (2, Validating response from Notary service), (1, Broadcasting transaction to participants), (0, Done)]], deduplicationIdentity=fb9d4547-bd57-4b50-81e0-a6a01077b4a2)
party-a        | [ERROR] 17:47:25+0000 [nioEventLoopGroup-2-1] netty.AMQPChannelHandler.invoke - Provided certificate subject O=PartyA, L=London, C=GB not in expected set [O=Notary, L=London, C=GB] {allowedRemoteLegalNames=O=Notary, L=London, C=GB, localCert=O=PartyA, L=London, C=GB, remoteAddress=localhost/127.0.0.1:10002, remoteCert=O=PartyA, L=London, C=GB, serverMode=false}
party-a        | [ERROR] 17:47:25+0000 [nioEventLoopGroup-2-1] netty.AMQPClient.invoke - Blocking future connection attempts to localhost:10002 due to bad certificate on endpoint
party-a        | [ERROR] 17:47:26+0000 [nioEventLoopGroup-2-2] netty.AMQPClient.nextTarget - No targets have presented acceptable certificates for [O=Notary, L=London, C=GB]. Halting retries

Docker Compose:

version: '3'
services:
  notary:
    depends_on:
      - "party-a"
    container_name: notary
    image: notary
    build: build/nodes/Notary
  party-a:
    container_name: party-a
    image: party-a
    build: build/nodes/PartyA
  party-b:
    depends_on:
      - "party-a"
    container_name: party-b
    image: party-b
    build: build/nodes/PartyB
  api-gateway:
    depends_on:
      - "notary"
    container_name: api-gateway
    image: api-gateway
    build: server/
    ports:
      - 8080:8080

Implementar nodos:

task deployNodes(type: net.corda.plugins.Dockerform, dependsOn: ['jar']) {
    nodeDefaults {
        cordapp project(':contracts')
        cordapp project(':workflows')
    }
    node {
        name "O=Notary,L=London,C=GB"
        rpcUsers = rpcUsersList
        notary = [validating: false]
        useTestClock true
        p2pAddress "localhost:10002"
        rpcSettings {
            address("0.0.0.0:10003")
            adminAddress("0.0.0.0:10004")
        }
    }
    node {
        name "O=PartyA,L=London,C=GB"
        rpcUsers = [[user: "user1", "password": "test", "permissions": ["ALL"]]]
        useTestClock true
        p2pAddress "localhost:10002"
        rpcSettings {
            address("0.0.0.0:10003")
            adminAddress("0.0.0.0:10004")
        }
    }
    node {
        name "O=PartyB,L=New York,C=US"
        rpcUsers = rpcUsersList
        useTestClock true
        p2pAddress "localhost:10002"
        rpcSettings {
            address("0.0.0.0:10003")
            adminAddress("0.0.0.0:10004")
        }
    }
    new File('build/nodes').mkdir()
    new File('build/nodes/docker-compose.yml')
}

API Gateway conectando a la fiesta A:

FROM java:8
ADD build/libs/server-0.1.jar server-0.1.jar
ENV JPDA_ADDRESS="8000"
ENV JPDA_TRANSPORT="dt_socket"
ENTRYPOINT ["java", \
            "-jar", \
            "server-0.1.jar", \
            "--config.rpc.host=party-a", \
            "--config.rpc.port=10003", \
            "--config.rpc.username=user1", \
            "--config.rpc.password=test"]
0
1174 25 jun. 2019 a las 21:03

1 respuesta

La mejor respuesta

Querrá reemplazar la parte localHost con las direcciones IP de la red de Docket: https://docs.docker.com/v17.09 / Motor / UserGuide / Redes / # Predeterminado-Networks

También asegúrese de exponer los puertos derecho en cada contenedor para que puedan acceder a los otros contenedores: https://docs.docker.com/Compuestas/networking/

Sospecho que el error que está recibiendo es porque PartyA se está conectando a sí mismo, y no al contenedor que ejecuta el nodo notario

2
Chris Chabot 26 jun. 2019 a las 07:04