I am trying to use hyperledger composer alongside hyperledger explorer. I've deployed a simple business network on fabric-dev-servers. On the composer side it is working fine and I am able to interact with the network perfectly but when I am trying to integrate it with hyperledger explorer I am getting the following error while starting it.
console log
postgres://hppoc:password#127.0.0.1:5432/fabricexplorer
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
TypeError: Cannot read property 'size' of undefined
at Platform.initialize (/home/paradox/hyperledger/fabric/blockchain-explorer/app/platform/fabric/Platform.js:54:48)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:23248) DeprecationWarning: grpc.load: Use the #grpc/proto-loader module with grpc.loadPackageDefinition instead
Received kill signal, shutting down gracefully
Closed out connections
App log:
[2018-10-29 22:14:30.719] [DEBUG] Platform - ******* Initialization started for hyperledger fabric platform ******
[2018-10-29 22:14:30.719] [DEBUG] Platform - Setting admin organization enrolment files
db log:
[2018-10-29 22:14:22.055] [INFO] pgservice - Please set logger.setLevel to DEBUG in ./app/helper.js to log the debugging.
Following is my config.json
config:
{
"network-config": {
"org1": {
"name": "Org1",
"mspid": "Org1MSP",
"peer1": {
"requests": "grpcs://127.0.0.1:7051",
"events": "grpcs://127.0.0.1:7053",
"server-hostname": "peer0.org1.example.com",
"tls_cacerts": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"admin": {
"key": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore",
"cert": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
}
},
"channel": "composerchannel",
"orderers": [
{
"mspid": "OrdererMSP",
"server-hostname": "orderer.example.com",
"requests": "grpcs://127.0.0.1:7050",
"tls_cacerts": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
}
],
"keyValueStore": "/tmp/fabric-client-kvs",
"configtxgenToolPath": "/home/playground/fabric-samples/bin",
"SYNC_START_DATE_FORMAT": "YYYY/MM/DD",
"syncStartDate": "2018/9/01",
"eventWaitTime": "30000",
"license": "Apache-2.0",
"version": 1.0
}
I have faced similar kind of issue and solved it using following steps.
Download Explorer 3.5 from given url.
https://github.com/hyperledger/blockchain-explorer/tree/v0.3.5.1
Hyperledger Composer Setup(Update config.json)
Build Hyperledger Explorer
Run Hyperledger Explorer
Finally it work for Fabric 1.2 and Composer#0.20.
I hope it will help you !
Looking at the format of your config.json file, it looks like you might be either using an old version of Explorer, or an old config.json. Support for Fabric 1.2 (which it looks like you are using) was only added in Explorer 3.7, along with changes to the structure of config.json.
So, I would recommend the following:
Update to Explorer 3.7 (branch release-3.7).
Follow the instructions here.
Related
I was using emr 6.7 with the software configuration:
[
{
"Classification": "spark",
"Properties": {
"maximizeResourceAllocation": "true"
}
},
{
"Classification": "spark-log4j",
"Properties": {
"log4j.rootCategory": "ERROR, console"
}
}
]
but for some reason when I shifted to emr 6.9.
The was website started throwing error
Classification 'spark-log4j' is not valid for parent classification
'null'.
If I remove this spark-log4j then it works but starts giving unnecessary INFO and DEBUG logs
How can I configure spark-log4j in EMR 6.9?
Change the classification to 'spark-log4j2' from 'spark-log4j' in your configuration as newer EMR versions use log4j2 for spark now.
Here is the documentation for valid classifications: https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-690-release.html#emr-690-class.
I have express.js REST API server on Heroku.
I am trying to debug an error remotely. But, I receive below exception. The steps I tried to debug remote server are mentioned after this exception section.
Can someone please help me how can I debug remote node.js/express.js server?
The exception I receive:
events.js:291
throw er; // Unhandled 'error' event
^
Error: connection not allowed by ruleset
at Parser._onData (/usr/local/Cellar/heroku/7.47.11/lib/client/7.59.1/node_modules/#heroku/socksv5/lib/client.parser.js:122:21)
at Socket.Parser.__onData (/usr/local/Cellar/heroku/7.47.11/lib/client/7.59.1/node_modules/#heroku/socksv5/lib/client.parser.js:33:10)
at Socket.emit (events.js:314:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:272:9)
at Socket.Readable.push (_stream_readable.js:213:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
Emitted 'error' event on Client instance at:
at Parser.<anonymous> (/usr/local/Cellar/heroku/7.47.11/lib/client/7.59.1/node_modules/#heroku/socksv5/lib/client.js:132:10)
at Parser.emit (events.js:314:20)
at Parser._onData (/usr/local/Cellar/heroku/7.47.11/lib/client/7.59.1/node_modules/#heroku/socksv5/lib/client.parser.js:126:16)
at Socket.Parser.__onData (/usr/local/Cellar/heroku/7.47.11/lib/client/7.59.1/node_modules/#heroku/socksv5/lib/client.parser.js:33:10)
[... lines matching original stack trace ...]
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
code: 'EACCES'
}
This is what I am trying:
On my local Terminal, I run heroku ps:forward 9229 --app MY_EXPRESS_APP command.
On my local Visual Code, I have the below launch.json configuration. I tried with both the configurations mentioned in it. (I understand I need only one. But I checked other Stackoverflow articles. So, I tried both the suggestions).
"configurations": [
{
"address": "TCP/IP address of process to be debugged",
"localRoot": "${workspaceFolder}",
"name": "ONE: Attach to Remote",
"port": 9229,
"remoteRoot": "/app",
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"type": "node",
"request": "attach",
"name": "TWO: Remote Heroku: Debug Remote Server",
"address": "localhost",
"port": 9229,
"protocol": "inspector",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/app"
}
]
I try to run below command. When I start Debug with above one of configuration... the debugger tries to connect and pauses. And, after 2 or 3 minutes, I see the above exception on Terminal under this command.
$ heroku ps:forward 9229 --app MY_EXPRESS_APP
heroku ps:forward 9229 --app MY_EXPRESS_APP
Establishing credentials... done
SOCKSv5 proxy server started on port 1080
Listening on 9229 and forwarding to web.1:9229
Use CTRL+C to stop port fowarding
Im trying to upgrade my Azure AKS cluster from version 1.8.1 to 1.8.6.
Deployment failed. Correlation ID: 09312a25-04f3-4e35-8f79-6b2337bb7f19. Operation failed with status: 200. Details: Resource state Failed
The output of command az aks upgrade --name myaks --resource-group myresourcegr --kubernetes-version 1.8.6
More output az aks show --name myaks --resource-group myresourcegr --output table
Name Location ResourceGroup KubernetesVersion ProvisioningState Fqdn
------- ---------- --------------- ------------------- ------------------- -----------------------------------------
myaks westeurope myresourcegr 1.8.6 Failed myaks-81cf39b1.hcp.westeurope.azmk8s.io
Retrying the upgrade action I get always the same error
Edit
Output of command az aks get-versions -g myresourcegr -n myaks
{
"agentPoolProfiles": [
{
"kubernetesVersion": "1.8.6",
"name": null,
"osType": "Linux",
"upgrades": [
"1.8.6"
]
}
],
"controlPlaneProfile": {
"kubernetesVersion": "1.8.6",
"name": null,
"osType": "Linux",
"upgrades": [
"1.8.6"
]
},
"id": "/subscriptions/xxx-98ec-4db6-bfed-946d93a62a7c/resourcegroups/myresourcegr/providers/Microsoft.ContainerService/managedClusters/myaks/upgradeprofiles/default",
"name": "default",
"resourceGroup": "myresourcegr",
"type": "Microsoft.ContainerService/managedClusters/upgradeprofiles"
}
When we consider for AKS upgrade, Always try with creating a new nodepool with the decided upgrade version to the cluster first and then drain the nodes of old nodepools . It will help you t identify the related issues and will be considered for the production upgrade process.
I am deploying a Service Fabric Cluster on Nano Server using the secure-cluster-5-node template (https://github.com/Azure/azure-quickstart-templates/tree/master/service-fabric-secure-cluster-5-node-1-nodetype)
I get the following error:
Operation xxx
Tracking xxx
StatusConflict
Provisioning StateFailed
Timestamp6/22/2017 13:05:14
Duration6 minutes 11 seconds
TypeMicrosoft.Compute/virtualMachineScaleSets
Resource Id/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Compute/virtualMachineScaleSets/nt1vm
StatusMessage{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionHandlerNonTransientError",
"message": "Handler 'Microsoft.Azure.ServiceFabric.ServiceFabricNode' has reported failure for VM Extension 'ServiceFabricNodeVmExt_vmNodeType0Name' with terminal error code '1007' and error message: 'Install failed for plugin (name: Microsoft.Azure.ServiceFabric.ServiceFabricNode, version 1.0.0.35). Exception:\nSystem.ComponentModel.Win32Exception: The subsystem needed to support the image type is not present\r\n at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)\r\n at Microsoft.Azure.Agent.StateMachine.HandlerStateMachine.InvokeCommand(String command, PluginArtifacts pluginArtifact, String pluginVersion, String pluginFolder, String pluginLogFolder, Int32 processWaitTimeout, PluginEventType startType, PluginEventType endType)\r\n at Microsoft.Azure.Agent.StateMachine.HandlerStateMachine.InstallHandler(PluginArtifacts artifact)'"
}
]
}
}
The settings are using in the ARM template for the os is:
"vmImagePublisher": {
"value": "MicrosoftWindowsServer"
},
"vmImageOffer": {
"value": "WindowsServer"
},
"vmImageSku": {
"value": "2016-Nano-Server"
},
"vmImageVersion": {
"value": "latest"
},
Any idea on how to troubleshoot this?
For now, Nano Server is not supported by Service Fabric Cluster. Please refer to this link.
You are able to create clusters on VMs running these operating
systems:
Windows Server 2012 R2
Windows Server 2016
Linux Ubuntu 16.04(in public preview)
You also could check it on Azure Portal. 2016-Nano-Server could not be selected.
Seems only a module's missing, but I've wrote the in the package.jsonfile, and others seems fine.
I've debugged this little app locally many times, there is a version of browserid module here...
The browserid-verifier module can be found here:
https://github.com/lloyd/node-browserid
and, `package.jsonq file:
{
"name": "daily_bookmarks",
"subdomain": "daily_bookmarks",
"scripts": {
"start": "server.coffee"
},
"version": "0.0.0-9",
"engines": {
"node": "0.6.x"
},
"main": "server.js",
"dependencies": {
"mongodb": "0.9.9",
"socket.io": "0.9.3",
"ezcrypto": "0.0.3",
"browserid-verifier": "0.0.4"
}
}
the version on my laptop:
$ npm list -g | grep browser
├─┬ browserid-verifier#0.0.4
│ ├─┬ browserify#1.8.1
ERROR:
$ jitsu deploy
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in server.coffee
warn: Local version appears to be old.
warn: Your package.json version will be incremented for you automatically.
warn: About to write /home/chen/code/home/git/docview/projects/daily_bookmarks/package.json
data:
data: {
data: engines: { node: '0.6.x' },
data: dependencies: {
data: socket.io: '0.9.3',
data: browserid-verifier: '0.0.4',
data: mongodb: '0.9.9',
data: ezcrypto: '0.0.3'
data: },
data: subdomain: 'daily_bookmarks',
data: version: '0.0.0-9',
data: name: 'daily_bookmarks',
data: main: 'server.js',
data: scripts: { start: 'server.coffee' }
data: }
data:
prompt: Is this ok? (yes):
warn: Creating new snapshot for version 0.0.0-9
info: Done creating snapshot 0.0.0-9
info: Updating application daily_bookmarks
info: Activating snapshot 0.0.0-9 for daily_bookmarks
info: Stopping app daily_bookmarks
info: App daily_bookmarks is now stopped
info: Starting app daily_bookmarks
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
info: Nodejitsu not ok
npm ERR! error installing jwcrypto#0.1.1
npm ERR! error installing browserid-verifier#0.0.4
npm ERR! ...SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:683:
This is what I got while I was trying to install browserid-verifier locally. It seems that there is some problem while trying to npm install it. You can bundle it in your app.
"bundleDependencies": [
"browserid-verifier"
]