I just started my hyperledger composer network. Now I need to start hyperledger explorer for this network. I already download the hyperledger explorer github repository using the link https://github.com/hyperledger/blockchain-explorer. I just try to start the explorer. But get the error in every time that
enter Please open web browser to access :http://localhost:9048/
pid is 31931
[31merror[39m: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND
[31merror[39m: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND
[31merror[39m: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND
(node:31931) UnhandledPromiseRejectionWarning: Error: Invalid results returned ::NOT_FOUND
at ClientDuplexStream.<anonymous> (/home/myname/Pictures/blockchain-explorer-Production/node_modules/fabric-client/lib/Orderer.js:229:22)
at ClientDuplexStream.emit (events.js:180:13)
at addChunk (_stream_readable.js:274:12)
at readableAddChunk (_stream_readable.js:261:11)
at ClientDuplexStream.Readable.push (_stream_readable.js:218:10)
at readCallback (/home/myname/Pictures/blockchain-explorer-Production/node_modules/grpc/src/client.js:312:14)
(node:31931) 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: 1)
(node:31931) [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.
(node:31931) UnhandledPromiseRejectionWarning: Error: Invalid results returned ::NOT_FOUND
at ClientDuplexStream.<anonymous> (/home/myname/Pictures/blockchain-explorer-Production/node_modules/fabric-client/lib/Orderer.js:229:22)
textProperty config.syncStartDate set to 2018/10/01
I think the error is due to orderer service.
I fully checked my orderer port in config.json file of hyperledger explorer.
{
"network-config": {
"org1": {
"name": "Org1",
"mspid": "Org1example",
"peer0": {
"requests": "grpc://192.168.1.49:7051",
"events": "grpc://192.168.1.49:7053",
"server-hostname": "peer0.org1.example.com",
"tls_cacerts": "/home/myname/Pictures/Kafka-Fabric-Network-master-3peer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"peer1": {
"requests": "grpc://192.168.1.49:9051",
"events": "grpc://192.168.1.49:9053",
"server-hostname": "peer1.org1.example.com",
"tls_cacerts": "/home/myname/Pictures/Kafka-Fabric-Network-master-3peer/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
},
"admin": {
"key": "/home/myname/Pictures/Kafka-Fabric-Network-master-3peer/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore",
"cert": "/home/myname/Pictures/Kafka-Fabric-Network-master-3peer/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
}
},
"channel": "examplechannel",
"orderers":[
{
"mspid": "OrdererOrg",
"server-hostname":"orderer0.example.com",
"requests":"grpc://192.168.1.49:7050",
"tls_cacerts":"/home/myname/Pictures/Kafka-Fabric-Network-master-3peer/crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/tls/ca.crt"
}
],
"keyValueStore": "/tmp/fabric-client-kvs",
"configtxgenToolPath": "/home/myname/Pictures/Kafka-Fabric-Network-master-3peer/bin",
"SYNC_START_DATE_FORMAT":"YYYY/MM/DD",
"syncStartDate":"2018/08/01",
"eventWaitTime": "30000",
"license": "Apache-2.0",
"version": "1.1"
}
Fabric:1.1.0
Composer:0.19.16
OS: Ubuntu 16.04
Explorer: 0.3.4
How it solve. Please give me an idea to solve this issue. Thanks in advance
Related
I have deployed a Node.js app as a Web Application in Digitalocean using the standard build & deploy process. Within this app I'm attempting to connect to the Discord Voice API (#discord/voice)
Code
const { createAudioPlayer, createAudioResource ... } = require('#discordjs/voice');
player = createAudioPlayer({
behaviors: {
noSubscriber: NoSubscriberBehavior.Pause
}
});
...
let resource = createAudioResource(source.stream, {
inputType: source.type
});
player.play(resource);
const connection = joinVoiceChannel({
guildId: guild.id,
channelId: channel.id,
adapterCreator: guild.voiceAdapterCreator
})
connection.subscribe(player);
Error
/workspace/node_modules/#discordjs/voice/dist/index.js:353
this.socket.once("close", () => reject(new Error("Cannot perform IP discovery - socket closed")));
^
Error: Cannot perform IP discovery - socket closed
at Socket.<anonymous> (/workspace/node_modules/#discordjs/voice/dist/index.js:353:46)
at Object.onceWrapper (node:events:641:28)
at Socket.emit (node:events:539:35)
at socketCloseNT (node:dgram:746:8)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on VoiceConnection instance at:
at VoiceConnection2.onNetworkingError (/workspace/node_modules/#discordjs/voice/dist/index.js:1531:10)
at Networking.emit (node:events:527:28)
at /workspace/node_modules/#discordjs/voice/dist/index.js:689:32
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I think this is a problem with port forwarding or NAT between the host and the container, does anyone know how to resolve?
I installed in my Electron-React-Typescript-Webpack app sqlite3 via yarn: yarn add sqlite3#latest
and rebuilt everything with yarn electron-rebuild -f -w sqlite3
In webpack.config.js I've put:
const webpack = require('webpack');
externals: [
{
'sqlite3': sqlite3,
}
],
If in main.ts I put:
import sqlite3 from 'sqlite3';
let db = new sqlite3.Database(
path.join(app.getPath('userData'),'/infopiecesleveldb'),
(err) => {
if (err) {
return console.error(err.message);
}
console.log('Connected to the in-memory SQlite database.');
});
I get this error: sqlite3_1.default.database is not a constructor
(node:2679) UnhandledPromiseRejectionWarning: TypeError: sqlite3_1.default.database is not
a constructor
at App.<anonymous> (/home/marco/webMatters/electronMatters/Raphy-Template/dist/main
/main.js:60:32)
at App.emit (events.js:315:20)
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:2679) 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(). To terminate the node process on
unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see
https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2679) [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.
mainWindow loaded
Any ideas about how to solve it?
With
import sqlite3 from 'sqlite3';
//let db = new sqlite3.Database(':memory:', (err) => {
let db = new sqlite3.Database(
path.join(app.getPath('userData'),'/infopiecessql3db'),
(err) => {
if (err) {
return console.error(err.message);
}
console.log('Connected to the in-memory SQlite database.');
});
db.close();
now I get this message Connected to the in-memory SQlite database
My Protractor test randomly fails with error . :
Failed: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:32572
at ClientRequest.<anonymous> (C:\jenkins\workspace\QA-E2E\automation\SeleniumFramework\node_modules\selenium-webdriver\http\index.js:238:15)
at ClientRequest.emit (events.js:223:5)
at Socket.socketErrorListener (_http_client.js:406:9)
at Socket.emit (events.js:223:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
From: Task: WebDriver.navigate().to(data:text/html,<html></html>)
at Driver.schedule (C:\jenkins\workspace\QA-E2E\automation\SeleniumFramework\node_modules\selenium-webdriver\lib\webdriver.js:807:17)
at Navigation.to (C:\jenkins\workspace\QA-E2E\automation\SeleniumFramework\node_modules\selenium-webdriver\lib\webdriver.js:1133:25)
at Driver.get (C:\jenkins\workspace\QA-E2E\automation\SeleniumFramework\node_modules\selenium-webdriver\lib\webdriver.js:988:28)
at C:\jenkins\workspace\QA-E2E\automation\SeleniumFramework\node_modules\protractor\built\browser.js:675:32
at ManagedPromise.invokeCallback_ (C:\jenkins\workspace\QA-E2E\automation\SeleniumFramework\node_modules\selenium-webdriver\lib\promise.js:1376:14)
Node version : v12.14.1,
npm version : 6.13.4,
protractor version: 5.4.2,
webdriver-manager version: 12.1.6
Note : I am also using async/await in my test.
This was happening to me when I have more chromedriver.exe processes in background.
Terminate all processes in background or restart the computer and you should not see this error.
There used to be a problem some time ago when this error was specific to a some chromedriver, which had to resolved from selenium side. Since chromedriver 80 is a brand new version, I assume it's just a temporary bug which will be fixed some time soon
Meanwhile, you can try the solution that I used for a while. All you need is just to mute the error, by adding this code before exporting you config file
//////////////////////////////////////////////////////////////////////////////
// temporary work around to avoid 'ECONNREFUSED' error, preferably to find another solution
// remove the block when https://github.com/SeleniumHQ/selenium/pull/5759 will be merged && released
let httpIndexFile = "node_modules/selenium-webdriver/http/index.js";
fs.readFile(httpIndexFile, "utf8", function (err, data) {
if (err) {
throw err;
}
let result = data.replace(/\(e.code === 'ECONNRESET'\)/g, "(e.code === 'ECONNRESET' || e.code === 'ECONNREFUSED')");
console.log(`Patching ${httpIndexFile}`);
fs.writeFileSync(httpIndexFile, result, "utf8");
});
let chromeFile = "node_modules/selenium-webdriver/chrome.js";
fs.readFile(chromeFile, "utf8", function (err, data) {
if (err) {
throw err;
}
let result = data.replace(/new http.HttpClient\(url\)/g, "new http.HttpClient(url, new (require('http').Agent)({ keepAlive: true }))");
console.log(`Patching ${chromeFile}`);
fs.writeFileSync(chromeFile, result, "utf8");
});
//////////////////////////////////////////////////////////////////////////////
exports.config = {
Again, this was another problem, but the tweak should work the same
I have situation where I want to create large number of entities on orion. I am using docker version of Orion and mongo with this docker-compose.
version: "3"
services:
mongo:
image: mongo:3.4
volumes:
- /data/docker-mongo/db:/data/db
- /data/docker-mongo/log/mongodb.log:/var/log/mongodb/mongod.log
command: --nojournal
orion:
image: fiware/orion
volumes:
- /data/docker-mongo/log/contextBroker.log:/tmp/contextBroker.log
links:
- mongo
ports:
- "1026:1026"
command: -dbhost mongo
Now problems happens when I want to upload 2000 entities (opening new connection for each, I know it can be done different but for now this is request), I successfully create no more than 600 (or less never exact number) of them rest fail to create with error:
"error": {
"errno": "ECONNRESET",
"code": "ECONNRESET",
"syscall": "read"
},
So I assume this issue has something to do with maxConnections, reqPoolSize etc settings in Orion. But in docker I failed to locate Orion config file, I have no way of knowing when I type commands like contextBroker -maxConnections 123456 that setting is being accepted by Orion and docker container.
Also log of Orion is empty, and i cannot determined what is causing this issue when Orion is running on docker.
So main questions:
Can Orion running on docker be used in same manner as Orion running on VM (are there some fallbacks)
And how do I check this problem when Orion is running in docker, because I read a lot of docs/issues but no luck (or I missed something).
If you have some advice/soultion it would really help.
Thanks
{
"orion" : {
"version" : "1.13.0-next",
"uptime" : "2 d, 15 h, 46 m, 34 s",
"git_hash" : "ae72acf9e8eeaacaf4eb138f7de37bfee4514c6b",
"compile_time" : "Fri May 4 10:12:18 UTC 2018",
"compiled_by" : "root",
"compiled_in" : "1901fd6bb51a",
"release_date" : "Fri May 4 10:12:18 UTC 2018",
"doc" : "https://fiware-orion.readthedocs.org/en/master/"
}
}
{ Error: socket hang up
at createHangUpError (_http_client.js:313:15)
at Socket.socketOnEnd (_http_client.js:416:23)
at Socket.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1090:12)
at process._tickCallback (internal/process/next_tick.js:63:19) code: 'ECONNRESET' }
error:
{ Error: connect ECONNREFUSED ipofvirtualm:1026
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'read',
address: 'ipofvm',
port: 1026 },
options:
{ method: 'POST',
uri: 'http://ip:1026/v2/entities?options=keyValues',
headers:
{ 'Fiware-Service': 'some service',
'Fiware-ServicePath': 'some servicepath' },
body:
{ id: 'F0B935',
type: 'Transaction',
refEmitter: 'F0B935',
refReceiver: '7501JXG',
refCapturer: 'testtdata',
date: '12/12/2017 13:25',
refTransferredResources: 'testtdata',
transferredLoad: 92 },
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false },
I am using request promise library for making calls, i try others they had same issue. Now since i cannot send u all 2000 responses i will try to describe. So it when i start to send this it behave. It create like 30 entities then next few or more return response saying ECONNRESET then it start creating again and so on.
What confuse me is that it is not failing totally meaning it works but not as intended. Also it seem that Orion close socket or hang it up some period then he is open again and create as normal and so on. If u need any more info ask, and thanks for quick answer.
instead of opening a new connection per entity why don't you use
POST /v2/op/update
and create all entities in just one batch? or a couple of batches
See some code at
https://github.com/Fiware/dataModels/blob/master/Weather/WeatherObserved/harvest/spain_weather_observed_harvest.py#L235
With regards to CLI argument passing to CB running inside docker, use the command line in docker compose file, eg:
command: -dbhost mongo -maxConnections 123456
However, I'm not sure that would help to solve the problem, as Orion should deal with your use case without any special customization. Looking to the error message (which seems to be about some problema at TCP layer) I wonder if docker networking layer is acting as bottleneck in some way...
In addition, the suggestion done by Jose Manuel Cantera about using POST /v2/op/update would be a good idea. It would reduce connection stress at network layer and may help to alleviate the problem.
If you cannot change your update strategy, maybe using an inter-request delay (100-200ms) could also help.
I am trying to deploy my Cordova app to my iPhone using Visual Studio 2015 RC by Remote Agent > Local Device. I have successfully installed, ran and connect the remote agent to my Visual Studio. According to this link, when I run Local Device, iTunes should pop up on my Windows PC and install the app to my iPhone:
https://msdn.microsoft.com/en-us/library/dn757056.aspx
New build request submitted:
/build/tasks?command=build&vcordova=4.3.0&cfg=debug&options=--device
{ 'accept-language': 'en-US',
host: '192.168.0.9:3000',
connection: 'keep-alive',
'transfer-encoding': 'chunked' }
New build request submitted for cordovaVersion: 4.3.0; buildCommand: build; configuration: debug
Build will be executed under: /Users/JP/remote-builds/builds/3563
Saving build request payload to : /Users/JP/remote-builds/builds/3563
Saved upload to /Users/JP/remote-builds/builds/3563/upload_3563.tgz
Extracting /Users/JP/remote-builds/builds/3563/upload_3563.tgz to /Users/JP/remote-builds/builds/3563/cordovaApp...
POST /build/tasks?command=build&vcordova=4.3.0&cfg=debug&options=--device 202 5123ms - 487b
GET /build/tasks/3563 200 0ms - 487b
Extracted app contents from uploaded build request to /Users/JP/remote-builds/builds/3563/cordovaApp. Requesting build.
Taking 3563 as current build
Building cordova app CordovaApp2 at appDir /Users/JP/remote-builds/builds/3563/cordovaApp
Opened build log file /Users/JP/remote-builds/builds/3563/build.log
Done building 3563 : error CordovaModuleLoadError [ '4.3.0' ]
Done with currentBuild. Checking for next build in queue.
GET /build/tasks/3563 200 4ms - 142.31kb
GET /build/tasks/3563/log 200 1ms
Additionally, from Visual Studio I get the error:
EACCES, open '/Users/JP/.npm/_locks/cordova-46ce3f50013cb5f4.lock' CordovaApp2 C:\Users\J\Documents\Visual Studio 2015\Projects\CordovaApp2\CordovaApp2\MDAVSCLI 1
Remote build error from the build server undefined: {1} CordovaApp2 C:\Users\J\Documents\Visual Studio 2015\Projects\CordovaApp2\CordovaApp2\MDAVSCLI 1
When running remote test:
$ vs-mda-remote test --device
Initializing self test for https
downloading cert for pin 360583
Downloading client cert for selftest from https://Jamess-Mac-mini.local:3000/certs/360583 to /Users/JP/remote-builds/selftest/selftest-client.pfx
pfxPath: /Users/JP/remote-builds/selftest/selftest-client.pfx
serverUrl: https://Jamess-Mac-mini.local:3000
buildUrl: https://Jamess-Mac-mini.local:3000/build/tasks?vcordova=4.3.0&cfg=release&command=build&options=--device
Response statusCode: 202
{ 'x-powered-by': 'Express',
'content-type': 'application/json',
'content-location': 'https://jamess-mac-mini.local:3000/build/tasks/3570',
'content-length': '489',
date: 'Tue, 09 Jun 2015 22:05:58 GMT',
connection: 'close' }
Response: {
"buildNumber": 3570,
"status": "uploaded",
"cordovaVersion": "4.3.0",
"buildCommand": "build",
"configuration": "release",
"options": "--device",
"buildDir": "/Users/JP/remote-builds/builds/3570",
"serverDir": "/Users/JP/remote-builds",
"submissionTime": "2015-06-09T22:05:58.691Z",
"changeList": null,
"tgzFilePath": "/Users/JP/remote-builds/builds/3570/upload_3570.tgz",
"statusTime": "2015-06-09T22:05:58.763Z",
"message": "Uploaded build request payload."
}
buildingUrl: https://Jamess-Mac-mini.local:3000/build/tasks?vcordova=4.3.0&cfg=release&command=build&options=--device
[1] Response: {
"buildNumber": 3570,
"status": "error",
"cordovaVersion": "4.3.0",
"buildCommand": "build",
"configuration": "release",
"options": "--device",
"buildDir": "/Users/JP/remote-builds/builds/3570",
"serverDir": "/Users/JP/remote-builds",
"submissionTime": "2015-06-09T22:05:58.691Z",
"changeList": null,
"tgzFilePath": "/Users/JP/remote-builds/builds/3570/upload_3570.tgz",
"messageId": "CordovaModuleLoadError",
"statusTime": "2015-06-09T22:05:59.752Z",
"appDir": "/Users/JP/remote-builds/builds/3570/cordovaApp",
"appName": "HelloCordova",
"messageArgs": [
"4.3.0"
]
}
You are likely encountering the following Known Issue. Basically there's a file somewhere in your npm cache that was added while running as an administrator (sudo). As a result, vs-mda-remote cannot access it. The commands below resolve that issue (and in fact this is what recent versions of npm do by default).
iOS Build Related Known Issues
After installing the latest version of vs-mda-remote package, you may need to run the following commands before you start up the remote agent. These commands ensure your user has permissions to the contents of the npm package cache in your home directory when using older versions of Node.js and npm. Newer versions of Node.js and npm will do this for you automatically.
sudo npm cache clear
sudo chown -R `whoami` ~/.npm