2017-11-16 8 views
0

나는 이것을 Tutorial에 따르며 작성이 완료되었습니다. 나는 기존 참가자에게 새로운 정체성을 발행하고 나는 다음과 같은 명령이 아이덴티티에 대한 비즈니스 카드 작성 : 다음하이 펄저 작성기 오류 발행 된 신분증은 한번 등록되지 않았습니다.

composer identity issue --card [email protected] -f [email protected] -u usr001 -a "resource:org.acme.biznet.Trader#usr001" -x true

을, 나는 POST /wallet/import를 통해 그 명함을 가져오고 나는 다른 REST를 호출 할 수 있어요 API 작업. 그 후, composer-rest-server를 멈추고 몇 분 후에 다시 composer-rest-server를 명령으로 시작합니다. composer-rest-server -c [email protected] -m true -a true

그런 다음 구성된 인증 메커니즘을 사용하여 REST API에 인증합니다 passport-github 전략). REST API를 사용하여 하나의 작업을 호출하려고 시도하면 A business network card has not been specified 오류 메시지가 표시되고 POST /wallet/import을 통해 이전 명함을 가져오고 올바른 것으로 가정 된 no content을 가져옵니다.

마지막으로, 나는 다음과 같은 오류 얻을 다른 REST API의 동작을 호출하려고하면

{ 
    "error": { 
"statusCode": 500, 
"name": "Error", 
"message": "Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity has not been registered: usr001)", 
"stack": "Error: Error trying to ping. Error: Error trying to query business network. Error: chaincode error (status: 500, message: Error: The current identity has not been registered: usr001)\n at _checkRuntimeVersions.then.catch (/home/username/.npm-global/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:679:34)\n at <anonymous>" 
    } 
} 

이 주요 문제, 나도 몰라 내 정체성은 REST API에 의해 recongized되지 않는 이유 이전에 일부 작업을 호출하는 데 사용한 경우 >https://hyperledger.github.io/composer/integrating/enabling-multiuser.html하고 (즉, 지침) ID를 지속에 대한 링크가 여기 캡처 - - 여기 포착

답변

0

문제는 지속성 중 하나입니다>https://hyperledger.github.io/composer/integrating/deploying-the-rest-server.html

모든 사용자 정보가 루프백을 사용하여 루프백 데이터 소스에 유지됩니다 커넥터. 기본적으로 REST 서버는 LoopBack "메모리"커넥터를 사용하여 사용자 정보를 유지합니다.이 정보는 REST 서버가 종료 될 때 손실됩니다. REST 서버는 고 가용성 데이터 소스 (예 : 데이터베이스)에 데이터를 저장하는 루프백 커넥터로 구성해야합니다.

+0

감사합니다. 귀하의 의견을 기억합니다. – HernandezRamiro