hyperledger / bevel-operator-fabric

Hyperledger Fabric Kubernetes operator - Hyperledger Fabric operator for Kubernetes (v2.3, v2.4 and v2.5)
https://hyperledger.github.io/bevel-operator-fabric/
Apache License 2.0
265 stars 89 forks source link

Support for Hyperledger Explorer #215

Open knagware9 opened 3 months ago

knagware9 commented 3 months ago

What would you like to be added?

Hyperledger explorer is available in hyperledger ecosystem. I need HLF operator to support hyperledger explorer.

Why is this needed?

Customer need to see blockchain explorer.

SergioGCarvalho commented 3 months ago

I dont know if there is a easier way but you can start by following Quick start (using codebase) from explorer repo, i was able to connect my fabric network to it, is not good as a helm chart but is a start

abecko47 commented 1 month ago

I dont know if there is a easier way but you can start by following Quick start (using codebase) from explorer repo, i was able to connect my fabric network to it, is not good as a helm chart but is a start

Hi @SergioGCarvalho , could you please help with the connection? I've followed HLF getting started and mounted connection profiles volumes to hyperledger explorer deployment. However, I am circuling around the issues with certificates, will send an error below. Could you please advice which secrets did you use for the connection?

[2024-05-29T07:08:12.713] [ERROR] FabricClient - Error: 14 UNAVAILABLE: Connection dropped
    at Object.callErrorFromStatus (/opt/explorer/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
    at Object.onReceiveStatus (/opt/explorer/node_modules/@grpc/grpc-js/build/src/client.js:195:52)
    at Object.onReceiveStatus (/opt/explorer/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141)
    at Object.onReceiveStatus (/opt/explorer/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
    at /opt/explorer/node_modules/@grpc/grpc-js/build/src/call-stream.js:188:78
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
for call at
    at ServiceClientImpl.makeUnaryRequest (/opt/explorer/node_modules/@grpc/grpc-js/build/src/client.js:163:34)
    at ServiceClientImpl.<anonymous> (/opt/explorer/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
    at /opt/explorer/node_modules/fabric-common/lib/Discoverer.js:73:17
    at new Promise (<anonymous>)
    at Discoverer.sendDiscovery (/opt/explorer/node_modules/fabric-common/lib/Discoverer.js:54:10)
    at DiscoveryService.send (/opt/explorer/node_modules/fabric-common/lib/DiscoveryService.js:318:30)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async NetworkImpl._initializeInternalChannel (/opt/explorer/node_modules/fabric-network/lib/network.js:300:13)
    at async NetworkImpl._initialize (/opt/explorer/node_modules/fabric-network/lib/network.js:250:9)
    at async Gateway.getNetwork (/opt/explorer/node_modules/fabric-network/lib/gateway.js:352:9) {
  code: 14,
  details: 'Connection dropped',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} },
  connection: {
    type: 'Discoverer',
    name: 'org1-peer0',
    url: 'grpc://org1-peer0:7051',
    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,
      'grpc-wait-for-ready-timeout': 3000,
      'request-timeout': 45000,
      clientCert: '-----BEGIN CERTIFICATE-----\r\n' +
        'MIIBVDCB+6ADAgECAgEEMAoGCCqGSM49BAMCMBgxFjAUBgNVBAMMDWZhYnJpYy1j\r\n' +
        'b21tb24wIhgPMjAyNDA1MjkwNTQzNTJaGA8yMDI0MDUyOTIzNDcxMlowGDEWMBQG\r\n' +
        'A1UEAwwNZmFicmljLWNvbW1vbjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABP0H\r\n' +
        'TonCHWL5mmF+KXVm1bVgt4jh41XnuBmvD9qP2ypYvc8/uHo85+VFOzWobjX3gMcM\r\n' +
        'jqq6VkxI/MsmofSR4pyjMjAwMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgbAMBMG\r\n' +
        'A1UdJQQMMAoGCCsGAQUFBwMCMAoGCCqGSM49BAMCA0gAMEUCIAziXCDcWJsQ8GG0\r\n' +
        '5HwOv/bGVvu3z+9pgsty9negwMnYAiEA1qqq+tdNASpKKtVSR9852WOjHh3lE6K5\r\n' +
        'FXeBF8yckt4=\r\n' +
        '-----END CERTIFICATE-----\r\n',
      url: 'grpc://org1-peer0:7051',
      pem: '-----BEGIN CERTIFICATE-----\n' +
        'MIICZTCCAgygAwIBAgIQeV+i7rB8RvvQjNBL2kUNDzAKBggqhkjOPQQDAjBSMRMw\n' +
        'EQYDVQQGEwpDYWxpZm9ybmlhMQkwBwYDVQQHEwAxCTAHBgNVBAkTADEUMBIGA1UE\n' +
        'ChMLSHlwZXJsZWRnZXIxDzANBgNVBAsTBkZhYnJpYzAeFw0yNDA1MjMxMDIyMTBa\n' +
        'Fw0zNDA1MjQxMDIyMTBaMFIxEzARBgNVBAYTCkNhbGlmb3JuaWExCTAHBgNVBAcT\n' +
        'ADEJMAcGA1UECRMAMRQwEgYDVQQKEwtIeXBlcmxlZGdlcjEPMA0GA1UECxMGRmFi\n' +
        'cmljMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7Cd6Wotva+ucBtmvhF67MmAt\n' +
        'Md54z/DND5bosPwWOURMmR7ftA/MbeJNprDNbmTqZY1KkngbPxfoxuNKnsZ2GaOB\n' +
        'wzCBwDAOBgNVHQ8BAf8EBAMCAaYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUF\n' +
        'BwMBMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIOb90rh7l0fADsOwQ6AH8dFp\n' +
        'E0mh84L7CMLqW+ZQb3XGMFMGA1UdEQRMMEqCCWxvY2FsaG9zdIIHb3JnMS1jYYIP\n' +
        'b3JnMS1jYS5kZWZhdWx0ghdvcmcxLWNhLWVvLWRldi4zaXBrLmNvbYcEfwAAAYcE\n' +
        'rBArMDAKBggqhkjOPQQDAgNHADBEAiAk8nL064Y4FAGHBSnU3tEfNIrtUkm8cUJo\n' +
        'huCDLUgAjAIgBsEjOTzz6VFL7j+mrsaSEvhrNfSNU1cnGXfurVL0M2w=\n' +
        '-----END CERTIFICATE-----\n',
      requestTimeout: 3000
    }
  },
  peer: 'org1-peer0'
}
[2024-05-29T07:07:12.721] [ERROR] main - <<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
[2024-05-29T07:07:12.722] [ERROR] main - Error :  [
  'Default client peer is down and no channel details available database'
]
SergioGCarvalho commented 1 month ago

Have you tried connect your hyperledger network to an application/api with sdk ?

abecko47 commented 1 month ago

Have you tried connect your hyperledger network to an application/api with sdk ?

Yes, I've successfully connected my own node.js app with Fabric Gateway API (not SDK). I believe I have problems with understanding which certs I should use in Hyperledger explorer connection profile, GRPC connection looks to be working

SergioGCarvalho commented 1 month ago

I will look into my connection profile used to connect to explorer, you can contact me to not extend this thread. Another way to get info about your network is using grafana, you can find examples on dashboards folder