2017-12-26 56 views
0

피어를 로컬 컴퓨터의 주문자와 연결하려고합니다. 여기까지 내가 지금까지 한 일이 있습니다. 주문 처리자와의 원단 연결 피어 연결 오류

나는 그런 다음이 명령을 사용하여 직물 피어를 시작하려고 패브릭 CA 서버를

export ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp 
export ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block 
export ORDERER_GENERAL_LOCALMSPID=OrdererMSP 
export ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] 
export ORDERER_GENERAL_LISTENADDRESS=192.168.2.103 
export ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key 
export ORDERER_GENERAL_LOGLEVEL=debug 
export ORDERER_GENERAL_GENESISMETHOD=file 
export ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt 
export FABRIC_CFG_PATH=/etc/hyperledger/fabric 
export ORDERER_GENERAL_TLS_ENABLED=true 
orderer 

를 시작한 후 발주자을 시작했다. 그 후 나는 peer node start 이 명령을 주시는 명령을 실행 위에

export CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt 
export CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key 
export CORE_PEER_GOSSIP_ORGLEADER=false 
export CORE_PEER_PROFILE_ENABLED=true 
export CORE_PEER_LOCALMSPID=Org1MSP 
export CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt 
export CORE_PEER_TLS_ENABLED=true 
export CORE_PEER_ID=peer0.org1.example.com 
export CORE_LOGGING_LEVEL=DEBUG 
export CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 
export FABRIC_CFG_PATH=/etc/hyperledger/fabric 
export CORE_PEER_ADDRESS=peer0.org1.example.com:7051 
export CORE_PEER_GOSSIP_USELEADERELECTION=true 

은 이미 나를 주문자 측 나는이 ​​

무엇입니까에

2017-12-26 18:22:47.613 IST [deliveryClient] connect -> DEBU 32e Connected to 2017-12-26 18:22:47.613 IST [deliveryClient] connect -> ERRO 32f Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] 2017-12-26 18:22:47.614 IST [deliveryClient] try -> WARN 330 Got error: Could not connect to any of the endpoints: [orderer.example.com:7050] ,at 8 attempt. Retrying in 2m8s

에러 experter로 필요한 디렉토리에 필요한 파일을 복사

2017-12-26 18:24:55.617 IST [grpc] Printf -> DEBU 191 grpc: Server.Serve failed to complete security handshake from "192.168.2.103:56580": EOF

누구든지 내가 뭘 잘못하고있는 걸까요?

감사합니다.

+0

env를 실행하고 있습니까? 도커 안쪽에? –

+0

아니요, 로컬 컴퓨터에서 실행 중입니다. –

답변

0

나는 그것이 잘못된 certs했다 언제든지. 지난 번에 반나절 정도 걸려서 peer1.org1 인증서를 주문자의 peer1.org2 폴더에 복사했습니다. (저에게있어서, org2는 다른 CA 서버입니다). 일단 내가 채널 블록을 만드는 데 사용 configtx.yaml에서 1 잘못된 MSPDir 경로를했다.

1

귀하의 경우에 문제가 귀하의 로컬 컴퓨터를 실행하는 동안 orderer.example.com:7050 될 주문 서비스 끝점을 인코딩 fabric-sample에 대한 생산 된 구성 트랜잭션을 사용하려고하는 것입니다 생각이 주소는 도달 할 수 없습니다. 따라서이 간단한 솔루션으로 /etc/hosts 파일을 확장하고 orderer.example.com 도메인 이름이 로컬 호스트를 가리 키도록 할 수 있습니다. 두 번째 옵션은 구성 트랜잭션 내에서 주문 서비스 엔드 포인트를 변경하는 것입니다. configtx.yaml :

################################################################################ 
# 
# SECTION: Orderer 
# 
# - This section defines the values to encode into a config transaction or 
# genesis block for orderer related parameters 
# 
################################################################################ 
Orderer: &OrdererDefaults 

    # Orderer Type: The orderer implementation to start 
    # Available types are "solo" and "kafka" 
    OrdererType: solo 

    Addresses: 
     - localhost: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 

    Kafka: 
     # Brokers: A list of Kafka brokers to which the orderer connects 
     # NOTE: Use IP:port notation 
     Brokers: 
      - 127.0.0.1:9092 

    # Organizations is the list of orgs which are defined as participants on 
    # the orderer side of the network 
    Organizations: 

은 기본적으로 당신이 행 다음에 변경해야

Addresses: 
     - PUT_HERE_CORRECT_IP_ADDRESS:7050 

다음은 업데이트 된 구성 트랜잭션 블록을 얻기 위해 configtxgen 도구를 실행해야합니다.

+0

안녕하세요. 답변이 너무 많습니다 만 이미 동일한/etc/hosts 파일을 업데이트했습니다. 'Principal deserialization failure (제공되는 ID는입니다.) 이제는 congs를 업데이트 한 후이 오류가 발생합니다. 유효하지 않음, Verify()가 반환 됨 x509 : 알려지지 않은 기관이 서명 한 인증서 (후보 기관 인증서 "ca.org1.example.com"을 검증하는 중 "x509 : ECDSA 검증 실패"로 인한 것일 수 있음)) 신원 확인 용 봐? –

+0

구성에서 모든 피어 crypto material (예 : password)으로 MSP 폴더를 설정하지 않았습니다. 올바른 위치를 가리 키기 위해서는'CORE_PEER_MSPCONFIGPATH'가 필요합니다. –