Re: error when following tutorial


Kamal R. Prasad
 

hello,

 I was getting this error because the default nodes is not the latest, but an older one. After fixing this, I ran 
#./runApp.sh  on 1 terminal and 

#./testApis.sh -l gaoling in another terminal and hit this error. Can someone tell me what this error means or how to fix it? I can see in terminal 2 that barry has been added, but there is an error in creating a channel.

thanks
-kamal
——————————————————

Signature {
  r: <BN: bb6958aa6d2192e1b07e0264a7c7fae2ce483443be3f42cbc6d05081b7939b63>,
  s: <BN: 29554bcdbdc81db7ab60dd14a2ffbebef4d0ad36244270ec103e340b6362bc42>,
  recoveryParam: 1 }
[2018-05-12 17:40:42.376] [DEBUG] Helper - [NetworkConfig101.js]: getChannel - name mychannel
[2018-05-12 17:40:42.377] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org1.example.com
[2018-05-12 17:40:42.377] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer1.org1.example.com
[2018-05-12 17:40:42.378] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer0.org2.example.com
[2018-05-12 17:40:42.378] [DEBUG] Helper - [NetworkConfig101.js]: getPeer - name peer1.org2.example.com
[2018-05-12 17:40:42.379] [DEBUG] Helper - [NetworkConfig101.js]: getOrderer - name orderer.example.com
[2018-05-12 17:40:42.399] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature:  Signature {
  r: <BN: 94c325034cbbff81642a858e9c4942eeb1be0f8f2d8113c81db26c9b5044a2c7>,
  s: <BN: 2e7cd6cbd463965bfc974fb67d049e5069eb830678869016b85018462cc43bfb>,
  recoveryParam: 0 }
E0512 17:40:42.479610623   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
error: [Orderer.js]: sendBroadcast - on error: "Error: 14 UNAVAILABLE: Connect Failed\n    at createStatusError (/home/kamal/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:64:15)\n    at ClientDuplexStream._emitStatusIfDone (/home/kamal/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:270:19)\n    at ClientDuplexStream._readsDone (/home/kamal/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:236:8)\n    at readCallback (/home/kamal/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:296:12)"
[2018-05-12 17:40:42.483] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE
    at ClientDuplexStream.<anonymous> (/home/kamal/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:136:21)
    at ClientDuplexStream.emit (events.js:182:13)
    at ClientDuplexStream._emitStatusIfDone (/home/kamal/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:271:12)
    at ClientDuplexStream._readsDone (/home/kamal/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:236:8)
    at readCallback (/home/kamal/fabric-samples/balance-transfer/node_modules/grpc/src/client.js:296:12)
(node:15629) UnhandledPromiseRejectionWarning: Error: Failed to initialize the channel: Error: SERVICE_UNAVAILABLE
    at Object.createChannel (/home/kamal/fabric-samples/balance-transfer/app/create-channel.js:65:9)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:15629) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:15629) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
E0512 17:40:43.426011206   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
E0512 17:40:45.050714780   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
E0512 17:40:47.640724763   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
E0512 17:40:52.099385221   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
E0512 17:40:57.427516749   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
E0512 17:41:08.849937823   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
E0512 17:41:26.425395615   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
E0512 17:41:53.992461558   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.
E0512 17:42:40.409525709   15629 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed.


On 09-May-2018, at 4:56 PM, Kamal R. Prasad <kamalp@...> wrote:

hello,

 when I execute this as option 1 in the tutorial at

I get this error. Can someone tell me what to check for/fix in my environment?

thanks
-kamal
—————————————————————————————
oot@kamal-VirtualBox:~/fabric-samples/balance-transfer# PORT=4000 node app
/home/kamal/fabric-samples/balance-transfer/app.js:109
app.post('/users', async function(req, res) {
                   ^^^^^

SyntaxError: missing ) after argument list
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3


Join fabric@lists.hyperledger.org to automatically receive all group messages.