0
ドッカーコンテナのネットワークの外で "composer"コマンドを実行する必要があります。 /etc/hostsファイルに発注者とピアホスト名(peer0.org1.example.comなど)を指定すると、「composer」コマンドが機能しているようです。コンポーザの接続プロファイルで正規のサーバ名を指定する方法を教えてください。
ただし、サーバーのIPアドレスを指定しても機能しません。ここにサンプルがあります。
$ composer network list -p hlfv1 -n info-share-bc -i PeerAdmin -s secret
✖ List business network info-share-bc
Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
Command succeeded
これは/ etc/hostsにホスト名を指定した場合のコマンド例です。
$ composer network list -p hlfv1 -n info-share-bc -i PeerAdmin -s secret
✔ List business network info-share-bc
name: info-share-bc
models:
- org.hyperledger.composer.system
- bc.share.info
<snip>
は、私は、サーバー名が解決できない場合、ここで説明したように、我々はSDKのNode.js、hyperledgerを「SSL-ターゲット名・オーバーライド」というオプションを指定すると確信しています。
https://jimthematrix.github.io/Remote.html
- ssl-target-name-override {string} Used in test environment only,
when the server certificate's hostname (in the 'CN' field) does not
match the actual host endpoint that the server process runs at,
the application can work around the client TLS verify failure by
setting this property to the value of the server certificate's hostname
接続プロファイル(connection.json)のホスト名を指定する任意のオプションがありますか?
回避策:接続プロファイルのhostnameOverrideオプションが接続の問題を解決しました。 "eventURL": "grpcs://:17053"、 "hostnameOverride": "peer0.org1.example.com"、 –
ibmamnt