Getting the following error while starting explorer:
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
TypeError: Cannot read property 'size' of undefined
at Platform.initialize (/home/kp/Desktop/blockchain-explorer/app/platform/fabric/Platform.js:52:45)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Received kill signal, shutting down gracefully
Closed out connections
Using Fabric v1.2 and Explorer v0.3.6 I have replaced grpcs with grpc but that is also not helping much. Not sure on where to pass 'size' property in the config file.
{
"network-configs":{
"network-1":{
"version":"1.0",
"clients":{
"client-1":{
"tlsEnable":true,
"organization":"Org1MSP",
"channel":"mychannel",
"credentialStore":{
"path":"./tmp/credentialStore_Org1/credential",
"cryptoStore":{
"path":"./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels":{
"mychannel":{
"peers":{
"peer0.org1.example.com":{
}
},
"connection":{
"timeout":{
"peer":{
"endorser":"6000",
"eventHub":"6000",
"eventReg":"6000"
}
}
}
}
},
"organizations":{
"Org1MSP":{
"mspid":"Org1MSP",
"fullpath":false,
"adminPrivateKey":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore/"
},
"signedCert":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts/"
}
},
"Org2MSP":{
"mspid":"Org2MSP",
"adminPrivateKey":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin#org2.example.com/msp/keystore/"
}
},
"OrdererMSP":{
"mspid":"OrdererMSP",
"adminPrivateKey":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore/"
}
}
},
"peers":{
"peer0.org1.example.com":{
"tlsCACerts":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url":"grpc://localhost:7051",
"eventUrl":"grpc://localhost:7053",
"grpcOptions":{
"ssl-target-name-override":"peer0.org1.example.com"
}
},
"peer1.org1.example.com":{
"tlsCACerts":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
},
"url":"grpc://localhost:8051",
"eventUrl":"grpc://localhost:8053",
"grpcOptions":{
"ssl-target-name-override":"peer1.org1.example.com"
}
},
"peer0.org2.example.com":{
"tlsCACerts":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
},
"url":"grpc://localhost:9051",
"eventUrl":"grpc://localhost:9053",
"grpcOptions":{
"ssl-target-name-override":"peer0.org2.example.com"
}
},
"peer1.org2.example.com":{
"tlsCACerts":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt"
},
"url":"grpc://localhost:10051",
"eventUrl":"grpc://localhost:10053",
"grpcOptions":{
"ssl-target-name-override":"peer1.org2.example.com"
}
}
},
"orderers":{
"orderer.example.com":{
"url":"grpc://localhost:7050"
}
}
},
"network-2":{
}
},
"configtxgenToolPath":"/home/kp/Desktop/bct/fabric-samples/bin/",
"license":"Apache-2.0"
}
TypeError: Cannot read property 'size' of undefined
at Platform.initialize (/home/kp/Desktop/blockchain-explorer/app/platform/fabric/Platform.js:52:45)
According to Platform.js, it means to have been failed to load your config.json in some reason. You need to review with the following view points:
Check logs/app/app.log
Difference from orignal config.json
And I don't think it related to this problem, but you need to turn 'tlsEnable' in config.json into 'false' when disabling TLS.
{
"network-configs": {
"network-1": {
"clients": {
"client-1": {
"tlsEnable": false,
^^^^^
Do you have any solution for this problem?
I deployed Hyperledger Explorer Step by Step with link
https://github.com/hyperledger/blockchain-explorer and I got the same error with you
I use with fabric v1.2 and composer v0.20.0
I get the same error, on my side the tag "network-configs": was missing.
In the console log, just before this error, I get a msg saying '******* Initialization started for hyperledger fabric platform ******,',undefined
If you checked the code in platform.js you can see that the undefined variable correspond to network-configs.
I created a simple config.json file in the original folder like the following :
{
"network-configs": {
"first-network": {
"name": "firstnetwork",
"profile": "./connection-profile/first-network.json",
"enableAuthentication": false
}
},
"license": "Apache-2.0"
Than I created a full profile doc starting with
{
"name": "first-network",
"version": "1.0.0",
I am not sure if splitting the file is really necessary but anyway on my side this procedure fixed the issue.
Related
I am able to use the below JSON through POSTMAN to run my Databricks notebook.
I want to be able to give a name to the cluster that is created through the "new_cluster" options.
Is there any such option available?
{
"tasks": [
{
"task_key": "Job_Run_Api",
"description": "To see how the run and trigger api works",
"new_cluster": {
"spark_version": "9.0.x-scala2.12",
"node_type_id": "Standard_E8as_v4",
"num_workers": "1",
"custom_tags": {
"Workload": "Job Run Api"
}
},
"libraries": [
{
"maven": {
"coordinates": "net.sourceforge.jtds:jtds:1.3.1"
}
}
],
"notebook_task": {
"notebook_path": "/Shared/POC/Job_Run_Api_POC",
"base_parameters": {
"name": "Junaid Khan"
}
},
"timeout_seconds": 2100,
"max_retries": 0
}
],
"job_clusters": null,
"run_name": "RUN_API_TEST",
"timeout_seconds": 2100
}
When the above API call is done, the cluster created has a name like "job-5975-run-2" and that is not super explanatory.
I have tried to use the tag "cluster_name" inside the "new_cluster" tag but I got an error that I can't do that, like this:
{
"error_code": "INVALID_PARAMETER_VALUE",
"message": "Cluster name should not be provided for jobs."
}
Appreciate any help here
Cluster name for jobs are automatically generated and can't be changed. If you want somehow track specific jobs, use tags.
P.S. If you want to have more "advanced" tracking capability, look onto Overwatch project.
I am trying to write a chrome app that connects to a Bluetooth Low Energy device. I added "bluetooth": { "low_energy": true } to my manifest:
{
"name": "DE1",
"version": "1",
"manifest_version": 2,
"icons": {
"128": "de1icon.png"
},
"permissions": [],
"bluetooth": {
"uuids": ["A000"],
"low_energy": true
},
"app": {
"background": {
"scripts": ["chrome.js"]
}
}
}
but when I call
chrome.bluetoothLowEnergy.connect
I get the error
Error handling response: TypeError: Cannot read property 'connect' of undefined
The docs say this is what I should have been doing
https://developer.chrome.com/apps/manifest/bluetooth#reference
I filed this as a bug at the chromium project
https://bugs.chromium.org/p/chromium/issues/detail?id=980766
and they have answered. Apparently this feature is only supported on ChromeOS and I am running macOS.
I have connected Eclipse hono with Eclipse ditto using the Connectivity api. When I set it up, this works fine. However, after some time the forwarding connection fails. When I retrieve the metrics, I'm getting following response:
{
"?": {
"?": {
"type": "connectivity.responses:aggregatedResponse",
"status": 200,
"connectionId": "<connectionId>",
"responsesType": "connectivity.responses:retrieveConnectionMetrics",
"responses": {
"connectivity-7cc7b5dc4c-6nn59": {
"type": "connectivity.responses:retrieveConnectionMetrics",
"status": 200,
"connectionId": "<connectionId>",
"connectionMetrics": {
"connectionStatus": "open",
"connectionStatusDetails": "Connected at 2019-03-19T08:28:53.211Z",
"inConnectionStatusSince": "2019-03-19T08:28:53.211Z",
"clientState": "CONNECTED",
"sourcesMetrics": [],
"targetsMetrics": [
{
"addressMetrics": {
"gw/{{ thing:namespace }}/{{ thing:id }}": {
"status": "failed",
"statusDetails": "Producer closed at 2019-03-19T21:00:16.466Z",
"messageCount": 2048,
"lastMessageAt": "2019-03-19T21:00:05.361Z"
}
},
"publishedMessages": 4070
}
]
}
}
}
}
}
}
I've been checking the logs around the time mentioned, but I'm not getting any errors. The logs I'm posting here are the last one before and the first one after the mentioned timestamp (2019-03-19T21:00:16.466Z).
2019-03-19 21:00:11,771 DEBUG [ID:AMQP_NO_PREFIX:TelemetrySenderImpl-42872] o.e.d.s.c.m.a.AmqpPublisherActor akka://ditto-cluster/system/sharding/connection/7/tenant_aloxy_consumer-aloxy-forward/pa/$a/c1/amqpPublisherActor3
- Message JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade#9bc051af } sent successfully.
2019-03-19 21:01:11,733 DEBUG [ID:AMQP_NO_PREFIX:TelemetrySenderImpl-42872] o.e.d.s.c.m.a.AmqpClientActor akka://ditto-cluster/system/sharding/connection/1/tenant_aloxy_consumer-aloxy/pa/$a/c1 - Inbound message: JmsInboundMessageDispatch { sequence = 38885, messageId = TelemetrySenderImpl-42873, consumerId = ID:a4925b59-1bb4-4cd8-9151-96ad422c36df:1:1:1 }
Although the log levels for all ditto services are set to debug, I'm not getting any useful logging.
Does any of you have any idea how I can get the loggging to investigate this problem or, even better, have any idea on what the problem might be and how to fix it?
When I delete the connection and recreate it, everything works as expected again. Maybe ditto can do this under the hood automatically?
UPDATE
When retrieving the connection via the API, I'm getting following response (including the failoverEnabled property which is set to true). This also indicates that the connection uses AMQP 1.0. The broker used is Enmasse.
{
"?": {
"?": {
"type": "connectivity.responses:retrieveConnection",
"status": 200,
"connection": {
"id": "<connectionId>",
"name": null,
"connectionType": "amqp-10",
"connectionStatus": "open",
"uri": "amqp://<consumer>:<password>#<amqp-host>:5672",
"sources": [],
"targets": [
{
"address": "gw/{{ thing:namespace }}/{{ thing:id }}",
"topics": [
"_/_/things/twin/events?filter=exists(features/alp)"
],
"authorizationContext": [
"<auth-context>"
]
}
],
"clientCount": 1,
"failoverEnabled": true,
"validateCertificates": true,
"processorPoolSize": 5,
"tags": []
}
}
}
}
Eclipse Ditto does an automatic failover if configured to so do (see https://www.eclipse.org/ditto/basic-connections.html - "failoverEnabled" property in the model).
It could however be that this was improved since the release 0.8.0 you are using.
The Ditto team is currently working towards a 0.9.0-M1 release which would contain an improved reconnection behavior.
Does the connection to Eclipse Hono automatically reconnect?
You described that the "forwarding connection" fails from time to time. Which technology (broker, etc.) is as endpoint for that gw/{{ thing:namespace }}/{{ thing:id }} address?
I am new to blockchain and I am trying to run Hyperledger Explorer by using official document but I got stuck with below point in Readme file of explorer
Fabric Configure Hyperledger Explorer
point 3 :Modify "network-id.clients.client-id.channel" to your default channel for each client
I won't able to understand that in which file I need to make change for this.
Because of this I received below error.
postgres://hppoc:password#127.0.0.1:5432/fabricexplorer
(node:13952) DeprecationWarning: grpc.load: Use the #grpc/proto-loader module with grpc.loadPackageDefinition instead
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
{ Error: 12 UNIMPLEMENTED: unknown service discovery.Discovery
at Object.exports.createStatusError (/your/path/blockchain-explorer/node_modules/grpc/src/common.js:87:15)
at Object.onReceiveStatus (/your/path/blockchain-explorer/node_modules/grpc/src/client_interceptors.js:1188:28)
at InterceptingListener._callNext (/your/path/blockchain-explorer/node_modules/grpc/src/client_interceptors.js:564:42)
at InterceptingListener.onReceiveStatus (/your/path/blockchain-explorer/node_modules/grpc/src/client_interceptors.js:614:8)
at callback (/your/path/blockchain-explorer/node_modules/grpc/src/client_interceptors.js:841:24)
code: 12,
metadata: Metadata { _internal_repr: {} },
details: 'unknown service discovery.Discovery' }
Received kill signal, shutting down gracefully
Closed out connections
The file to be edited is blockchain-explorer/app/platform/fabric/config.json.
Eg:
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": true,
"organization": "UserOrg",
"channel": "mychannel",
"credentialStore": {
"path": "./tmp/credentialStore_UserOrg/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_UserOrg/crypto"
}
}
}
}
...
I went to the Functions/API Key to retrieve the user&password, but I still receive this error:
Dialog node error
Mandatory action property "credentials" missing or
invalid for server-side CloudFunctions action call. The value must be
a string that references a variable such as "$my_creds" that expands
to an object like {"user":"..", "password":".."}. Dialog node:
[GetProducts]
Any ideas why?
// IBM WATSON Dialog:
// Dialog Node Name: GetProducts
// JSON Editor:
{
"context": {
"private": {
"my_creds": {
"user": "*********",
"password:": "*********"
}
}
},
"output": {
"text": {
"values": [
"Product : "<?entities.products[0].literal?>"
],
"selection_policy": "sequential"
}
},
"actions": [
{
"name": "/*****#gmail.com_dev/getProducts2",
"type": "server",
"parameters": {
"url": "<?entities.products[0].literal?>"
},
"credentials": "$private.my_creds",
"result_variable": "context.result"
}
]
}
The credentials need to be present when that dialog node is processed. The context section defines what will be present at the end of that processing. Thus, the credentials are not known to the action.
My advise is to NOT store the credentials in the workspace. This is a security issue and bad practice, even for testing. Follow the example in the Watson Assistant documentation. It has instructions on how to add the credentials to the "Try it out" panel. For production, pass in the credentials from the app or middleware. Here are some examples on how that can be done.