Не удалось запустить службу RAFT Orderer - PullRequest
0 голосов
/ 26 октября 2019

TLS Handshake не удалось с ошибкой TLS: первая запись не похожа на TLS сервер рукопожатия = Orderer Я пытаюсь создать службу orederer на основе RAFT, но она не работает. Узлы-заказчики запускаются, но не связываются с ними из-за ошибки рукопожатия tls. Службе узла также не удалось создать канал, так как заказчик выдает некоторую ошибку рукопожатия tls.

Я проверил пути сертификатов, и все они верны.

Организации:

 - &Orderer

    Name: Orderer
    ID: OrdererMSP
    MSPDir: crypto-config/ordererOrganizations/orderer.com/msp

- &Org1
    Name: CompanyOne
    ID: CompanyOneMSP
    MSPDir: crypto-config/peerOrganizations/companyone.com/msp
    AnchorPeers:
        - Host: 192.168.152.235
          Port: 7051

- &Org2
    Name: companytwo
    ID: companytwoMSP
    MSPDir: crypto-config/peerOrganizations/companytwo.com/msp
    AnchorPeers:
        - Host: 192.168.152.236
          Port: 7051
- &Org3
    # DefaultOrg defines the organization which is used in the sampleconfig
    Name: CompanyThree
    ID: CompanyThreeMSP
    MSPDir: crypto-config/peerOrganizations/companythree.com/msp
    AnchorPeers:
        - Host: 192.168.152.237
          Port: 7051

Приложение: & ApplicationDefaults Организации: - * Org1 - * Org2 - * Org3 Заказчик: & OrdererDefaults OrdererType: etcdraft

Addresses:
    - 192.168.152.231:7050
    - 192.168.152.232:7050
    - 192.168.152.233:7050

# Batch Timeout: The amount of time to wait before creating a batch
BatchTimeout: 2s

# Batch Size: Controls the number of messages batched into a block
BatchSize:

    # Max Message Count: The maximum number of messages to permit in a batch
    MaxMessageCount: 10

    # Absolute Max Bytes: The absolute maximum number of bytes allowed for
    # the serialized messages in a batch.
    AbsoluteMaxBytes: 98 MB

    # Preferred Max Bytes: The preferred maximum number of bytes allowed for
    # the serialized messages in a batch. A message larger than the preferred
    # max bytes will result in a batch larger than preferred max bytes.
    PreferredMaxBytes: 512 KB

EtcdRaft:

    Consenters:
        - Host: 192.168.152.231
          Port: 7050
          ClientTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/companyone.orderer.com/tls/server.crt
          ServerTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/companyone.orderer.com/tls/server.crt
        - Host: 192.168.152.232
          Port: 7050
          ClientTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/companytwo.orderer.com/tls/server.crt
          ServerTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/companytwo.orderer.com/tls/server.crt
        - Host: 192.168.152.233
          Port: 7050
          ClientTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/companythree.orderer.com/tls/server.crt
          ServerTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/companythree.orderer.com/tls/server.crt

    # Options to be specified for all the etcd/raft nodes. The values here
    # are the defaults for all new channels and can be modified on a
    # per-channel basis via configuration updates.
    Options:
        # TickInterval is the time interval between two Node.Tick invocations.
        TickInterval: 500ms

        # ElectionTick is the number of Node.Tick invocations that must pass
        # between elections. That is, if a follower does not receive any
        # message from the leader of current term before ElectionTick has
        # elapsed, it will become candidate and start an election.
        # ElectionTick must be greater than HeartbeatTick.
        ElectionTick: 10

        # HeartbeatTick is the number of Node.Tick invocations that must
        # pass between heartbeats. That is, a leader sends heartbeat
        # messages to maintain its leadership every HeartbeatTick ticks.
        HeartbeatTick: 1

        # MaxInflightBlocks limits the max number of in-flight append messages
        # during optimistic replication phase.
        MaxInflightBlocks: 5

        # SnapshotIntervalSize defines number of bytes per which a snapshot is taken
        SnapshotIntervalSize: 20 MB

# Organizations is the list of orgs which are defined as participants on
# the orderer side of the network
Organizations:
    - *Org1
    - *Org2
    - *Org3

Профили:

OrdererGenesis:
    Orderer:
        <<: *OrdererDefaults
        Organizations:
            - *Orderer
    Consortiums:
        GeneralConsortium:
            Organizations:
                - *Org1
                - *Org2
                - *Org3
ConsortiumChannel:
    Consortium: GeneralConsortium
    Application:
        <<: *ApplicationDefaults
        Organizations:
            - *Org1
            - *Org2
            - *Org3

1 Ответ

0 голосов
/ 07 ноября 2019

Как указано в комментариях, для меня звучит так, как будто вы неправильно настроили ваших заказчиков для использования сертификатов TLS, на которые есть ссылки в конфигурации вашего канала.

Посмотрите журналы заказчиков при их запуске. Скорее всего, вы увидите сообщение с предупреждением, например:

Could not find 
<pem encoded cert block>
among
<repeated PEM encoded cert blocks>

, указывающее, что TLS не был правильно настроен для локального процесса заказа в соответствии с вашим блоком генезиса.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...