nikita6187 / NEC

Our blockchain practical for the NEC challenge
2 stars 0 forks source link

add blockchain explorer feature #14

Closed danut13 closed 4 years ago

nikita6187 commented 4 years ago

Looks very interesting! I tried running the Fabcar setup (as in the readme), and got an error in the browser saying "Please verify your network configuration, database configuration and try again". Does it work for you using fabcar steps?

danut13 commented 4 years ago

@nikita68 Yes, it does work for me, something like that should pop up in your browser: Screenshot from 2020-06-15 15-31-36 I don't know why it does not work for you, we can figure it out in the call tomorrow

nikita6187 commented 4 years ago

Sounds good :+1:

stefko3z commented 4 years ago

I'm also getting an error, here are my logs from the explorer.mynetwork.com

root@emuntu:/home/svladov_dev/NEC/fabric/blockchainExplorer# docker logs explorer.mynetwork.com 
[2020-06-16T08:53:52.415] [INFO] PgService - SSL to Postgresql disabled
[2020-06-16T08:53:52.417] [INFO] PgService - connecting to Postgresql postgres://hppoc:******@explorerdb.mynetwork.com:5432/fabricexplorer
[2020-06-16T08:53:54.740] [INFO] Platform -  client_configs.name  first-network  client_configs.profile  ./connection-profile/first-network.json
[2020-06-16T08:53:54.741] [INFO] Platform - FabricUtils.createFabricClient 
[2020-06-16T08:53:54.749] [INFO] FabricConfig - config.client.tlsEnable  true
[2020-06-16T08:53:54.749] [INFO] FabricGateway - peer0.org1.example.com
[2020-06-16T08:53:54.750] [INFO] FabricGateway - /etc/data/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem  
adminPrivateKeyPath  /etc/data/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
[2020-06-16T08:53:54.750] [INFO] FabricConfig - FabricConfig, this.config.channels  mychannel
[2020-06-16T08:53:54.753] [INFO] FabricGateway - admin
2020-06-16T08:53:55.392Z - error: [Channel.js]: Error: 14 UNAVAILABLE: DNS resolution failed
[2020-06-16T08:53:55.393] [ERROR] FabricClient - { Error: 14 UNAVAILABLE: DNS resolution failed
    at Object.exports.createStatusError (/opt/explorer/node_modules/grpc/src/common.js:91:15)
    at Object.onReceiveStatus (/opt/explorer/node_modules/grpc/src/client_interceptors.js:1209:28)
    at InterceptingListener._callNext (/opt/explorer/node_modules/grpc/src/client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (/opt/explorer/node_modules/grpc/src/client_interceptors.js:618:8)
    at callback (/opt/explorer/node_modules/grpc/src/client_interceptors.js:847:24)
  code: 14,
  metadata: Metadata { _internal_repr: {}, flags: 0 },
  details: 'DNS resolution failed',
  peer:
   { url: 'grpcs://peer0.org1.example.com:7051',
     name: 'peer0.org1.example.com',
     options:
      { 'grpc.max_receive_message_length': -1,
        'grpc.max_send_message_length': -1,
        'grpc.keepalive_time_ms': 120000,
        'grpc.http2.min_time_between_pings_ms': 120000,
        'grpc.keepalive_timeout_ms': 20000,
        'grpc.http2.max_pings_without_data': 0,
        'grpc.keepalive_permit_without_calls': 1,
        name: 'peer0.org1.example.com',
        'request-timeout': 300000,
        clientCert:
         '-----BEGIN CERTIFICATE-----\nMIICKDCCAc+gAwIBAgIQfPkjUNpQFenybUJZvLG7zjAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0yMDA2MTYwODI2MDBaFw0zMDA2MTQwODI2MDBa\nMGsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMQ4wDAYDVQQLEwVhZG1pbjEfMB0GA1UEAwwWQWRtaW5Ab3Jn\nMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIn7yzRRhb1z\nhwvU7UYXv0nS8Qo4+nMwboG8Z4xEJH141ZLzGz8ZaC98+UHi0B85Eo8odd3K/0gr\nsi4XizLwvw+jTTBLMA4GA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1Ud\nIwQkMCKAIBUa7+4mh9mRYoHJQMvQcYyno5S/y4KdJmxeqBxkuLqLMAoGCCqGSM49\nBAMCA0cAMEQCIH1j2IXE3FT92xe1chQI20q2ivIGyu0/neOTtDBReTA2AiB36FI2\nOcsfOjH9a7okxbIpJ3Oc6YaoUgshncZdzupypg==\n-----END CERTIFICATE-----\n',
        'grpc.ssl_target_name_override': 'peer0.org1.example.com',
        'grpc.default_authority': 'peer0.org1.example.com' } } }
[2020-06-16T08:53:55.417] [ERROR] FabricClient - { Error: 14 UNAVAILABLE: DNS resolution failed
    at Object.exports.createStatusError (/opt/explorer/node_modules/grpc/src/common.js:91:15)
    at Object.onReceiveStatus (/opt/explorer/node_modules/grpc/src/client_interceptors.js:1209:28)
    at InterceptingListener._callNext (/opt/explorer/node_modules/grpc/src/client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (/opt/explorer/node_modules/grpc/src/client_interceptors.js:618:8)
    at callback (/opt/explorer/node_modules/grpc/src/client_interceptors.js:847:24)
  code: 14,
  metadata: Metadata { _internal_repr: {}, flags: 0 },
  details: 'DNS resolution failed' }
[2020-06-16T08:53:55.419] [INFO] FabricClient - ********* call to initializeDetachClient **********
[2020-06-16T08:53:55.421] [INFO] FabricClient - initializeDetachClient, network config)  { name: 'first-network',
  version: '1.0.0',
  license: 'Apache-2.0',
  client:
   { tlsEnable: true,
     adminUser: 'admin',
     adminPassword: 'adminpw',
     enableAuthentication: false,
     organization: 'Org1',
     connection: { timeout: [Object] } },
  channels: { mychannel: { peers: [Object], connection: [Object] } },
  organizations:
   { Org1MSP:
      { mspid: 'Org1MSP',
        fullpath: true,
        adminPrivateKey: [Object],
        signedCert: [Object] } },
  peers:
   { 'peer0.org1.example.com':
      { tlsCACerts: [Object],
        url: 'grpcs://peer0.org1.example.com:7051',
        eventUrl: 'grpcs://peer0.org1.example.com:7053',
        grpcOptions: [Object] } } }
[2020-06-16T08:53:55.422] [INFO] FabricClient - ************************************* initializeDetachClient *************************************************
[2020-06-16T08:53:55.422] [INFO] FabricClient - Error : Failed to connect client peer, please check the configuration and peer status
[2020-06-16T08:53:55.422] [INFO] FabricClient - Info :  Explorer will continue working with only DB data
[2020-06-16T08:53:55.423] [INFO] FabricClient - ************************************** initializeDetachClient ************************************************
[2020-06-16T08:53:55.429] [INFO] Platform - initializeListener, client_name, client  first-network { name: 'first-network',
  profile: './connection-profile/first-network.json' }
[2020-06-16T08:53:55.432] [INFO] main - Please open web browser to access :http://localhost:8080/
[2020-06-16T08:53:55.433] [INFO] main - pid is 7
[2020-06-16T08:53:55.436] [INFO] FabricConfig - FabricConfig, this.config.channels  mychannel
[2020-06-16T08:53:55.439] [ERROR] main - <<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
[2020-06-16T08:53:55.439] [ERROR] main - Error :  [ 'Default client peer is down and no channel details available database' ]
[2020-06-16T08:53:57.441] [INFO] main - Received kill signal, shutting down gracefully
[2020-06-16T08:53:57.443] [INFO] Platform - <<<<<<<<<<<<<<<<<<<<<<<<<< Closing explorer  >>>>>>>>>>>>>>>>>>>>>
[2020-06-16T08:53:57.443] [INFO] main - Closed out connections