I'm trying to edit the test network script and I'm getting this error:
Error: error getting endorser client for channel: endorser client failed to connect to localhost:7051: failed to create new connection: context deadline exceeded
I have confirmed that the port is open and that the docker containers running perfectly matches what the unedited (and working) test network scripts create.
I didn't find the issue until setting VERBOSE=true in the script, and it became apparent that the environment variable CORE_PEER_TLS_ENABLED was not set to true like in the test script. Even though I had set it, I did not do export CORE_PEER_TLS_ENABLED=true which is necessary to make it available when the peer command is running.
Related
I'm currently trying to get the example for hyperledger fabric working. I get as far as starting the chaincode successfully using the deployCC script, and get the expected printout of all the cars after running the script. However, when I get to the next step of manually querying the network, I run into issue. I've run the exports for org1 as specified, and verified that the paths match and the tls cert and mspconfig exist in those locations. However, when I try to run the query command:
peer chaincode query -C mychannel -n fabcar -c '{"Args":["queryAllCars"]}'
I get the following error printout:
Error: error getting endorser client for query: endorser client failed to connect to 0.0.0.0:7051: failed to create new connection: context deadline exceeded
I would expect to get the same printout as at the end of the deployCC script, and I can't figure out why that isn't happening. Any help in diagnosing this is appreciated!
If it matters, I'm running this in a VM with Ubuntu 20.04. All the prerequisites are fresh installations of the latest versions from the last couple of days.
Liam, if you are able to see all the cars at the end of deployCC, then it might be an environment variables issue. Remember that you have to execute the peer chaincode query -C mychannel -n fabcar -c '{"Args":["queryAllCars"]}' command in the same terminal where you ran deployCC because the environment variables are all set in that window.
We can do a couple of things to confirm:
Paste the output from DeployCC at the end, right after (and including)
Querying chaincode on peer0.org1...
Using organization
Print the following environment variables from the terminal window where you are executing deployCC and from the terminal window where you are executing the peer chaincode query -C mychannel -n fabcar -c '{"Args":["queryAllCars"]}' command
CORE_PEER_LOCALMSPID,
CORE_PEER_TLS_ROOTCERT_FILE,
CORE_PEER_MSPCONFIGPATH,
CORE_PEER_ADDRESS.
See if they match?
I’m trying to run browser testing on CircleCi using TestCafe. I have followed this documentation. The major problem is that the chrome browser isn't able to open. CircleCi is able to successfully download the image because the spin environment is passed.
I am facing problem in the next step (Container circleci/node:11.6.0-browsers) on CircleCi which throws an error :
$ _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Job was canceled
And later on the UI test step throws this error:
$ testcafe chrome:headless uitests/tests/* -r xunit:/tmp/test-results/res.xml -e
ERROR Was unable to open the browser "chrome:headless" due to an error.
Error: Unable to run the browser. The browser path or command template is not specified.
at checkBrowserPath$ (/rp-web/node_modules/testcafe-browser-tools/lib/api/open.js:47:23)
at tryCatch (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:72:40)
at Generator.invoke [as _invoke] (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:334:22)
at Generator.prototype.(anonymous function) [as next] (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:105:21)
at tryCatch (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:72:40)
at invoke (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:146:20)
at /rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:191:11
at new Promise (<anonymous>)
at new F (/rp-web/node_modules/core-js/library/modules/$.export.js:30:36)
at callInvokeWithMethodAndArg (/rp-web/node_modules/testcafe-browser-tools/node_modules/babel-runtime/regenerator/runtime.js:190:16)
Type "testcafe -h" for help.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1
this is how my yml looks like:
jobs:
build-and-test:
working_directory: /repo
docker:
- image: node:10.5.0
- image: circleci/node:11.6-browsers
Also, tried the run command with no sandbox but got the same error:
testcafe chrome:headless uitests/tests/* -r xunit:/tmp/test results/res.xml -e --no-sandbox
I'm successfully able to run things locally but unable to run on CircleCi. Can anyone help with this on how to fix this?
I think removing the "- image: node:10.5.0" line from your config will fix these errors. I've created an example project (https://github.com/AndreyBelym/testcafe-example-circle-ci) and configured CircleCI builds (https://circleci.com/gh/AndreyBelym/testcafe-example-circle-ci) to test my assumption.
If you specify multiple container images in a build job configuration, the first image will be considered as a primary container and all other images as secondary containers. All build steps are executed in the primary container, and secondary containers are started in the background and accessible to the build steps only via the shared network. You can read more about it in Choosing an Executor Type - Using Multiple Docker Images.
Your build job configuration:
jobs:
build-and-test:
working_directory: /repo
docker:
- image: node:10.5.0
- image: circleci/node:11.6-browsers
means that you try to run TestCafe in the node:10.5.0 that doesn't have any browsers installed. That's why TestCafe can't find a browser and gives you the "Error: Unable to run the browser. The browser path or command template is not specified." error.
Also because the node:10.5.0 uses a special user account with reduced privileges, the node:11.6.0-browsers gives you the "_XSERVTransmkdir: ERROR: euid != 0" error because it needs administrator privileges to start Xvfb - a virtual X11 server (i.e. virtual desktop).
./createPeerAdminCard.sh
Development only script for Hyperledger Fabric control
Running 'createPeerAdminCard.sh'
FABRIC_VERSION is set to 'hlfv11'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Using composer-cli at v0.19.5
Successfully created business network card file to
Output file: /tmp/PeerAdmin#hlfv1.card
Command succeeded
Error: No connection type provided, probably because the connection profile has no 'x-type' property defined.
Command failed
You might be using an older version of the card (Source:- https://github.com/hyperledger/composer/issues/4007)
Code
Currently I followed this article to develop my BNA to IBM blockchain cloud platform (started plan). Unluckily, I got the error when I try to run this line of code:
composer network start -c admin#mynetwork-fabric -A admin -C ./creds/admin-pub.pem -f delete.card -n my_network -V 0.0.4
Error
I am very sure that all parameters are good, the full errors are:
Error: Error trying to start business network. Error: No valid responses
from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN:
premature execution - chaincode (my_network:0.0.4) launched and
waiting for registration
Or sometimes the error is:
Error: Error trying to start business network. Error: No valid responses
from any peers.
Response from attempted peer comms was an error: Error:
REQUEST_TIMEOUT
I understand sometimes maybe there is a timeout, but I do not really got the launched and waiting for registration error.
P.S.
My hyperledger composer version is 0.19.
I also view this deploying tutorial, there might be some different commands, because of the different versions of Hyperledger Composer. I checked the composer hep to transfer the commands to running on composer 0.19.
Solution:
down grade composer-cli to 0.18.1
change your package.json, composer-cli to 0.18.1
npm install to create new bna
reinstall
restart
If you are using IBM Cloud Starter Plan, then you need to be using v0.18.1 of Composer not v0.19.
Also, this is the doc you should be following:
https://console.bluemix.net/docs/services/blockchain/develop_starter.html#deploying-a-business-networks-on-starter-plan
Logstash 5.1.1 on Windows 7 32bit, trying without success to install logstash-filter-elapsed. Below the method I tried.
Before running plugin installer, I run:
set DEBUG=1
to show debug output.
Then I run:
logstash-plugin install logstash-filter-elapsed
This fails both when I'm in my corporate network (with proxy) and when using a network without proxy, with the following error:
Looking if package named: logstash-filter-elapsed exists at https://artifacts.elastic.co/downloads/logstash-plugins/logstash-filter-elapsed/logstash-filter-elapsed-5.1.1.zip
Errno::ECONNREFUSED: Connection refused - Connection refused
initialize at org/jruby/ext/socket/RubyTCPSocket.java:126
open at org/jruby/RubyIO.java:1197
connect at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:763
timeout at org/jruby/ext/timeout/Timeout.java:98
connect at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:763
do_start at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:756
start at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:745
start at C:/tools/logstash-5.1.1/vendor/jruby/lib/ruby/1.9/net/http.rb:557
start at C:/tools/logstash-5.1.1/lib/pluginmanager/utils/http_client.rb:13
remote_file_exist? at C:/tools/logstash-5.1.1/lib/pluginmanager/utils/http_client.rb:23
get_installer_for at C:/tools/logstash-5.1.1/lib/pluginmanager/pack_fetch_strategy/repository.rb:27
create at C:/tools/logstash-5.1.1/lib/pluginmanager/install_strategy_factory.rb:15
each at org/jruby/RubyArray.java:1613
create at C:/tools/logstash-5.1.1/lib/pluginmanager/install_strategy_factory.rb:14
execute at C:/tools/logstash-5.1.1/lib/pluginmanager/install.rb:27
run at C:/tools/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
execute at C:/tools/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11
run at C:/tools/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
run at C:/tools/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132
(root) at C:\tools\logstash-5.1.1\lib\pluginmanager\main.rb:46
It seems that there's a timeout in contacting the url "https://artifacts.elastic.co/downloads/logstash-plugins/logstash-filter-elapsed/logstash-filter-elapsed-5.1.1.zip".
Opening this url in a browser returns an xml with an error message (seems like the xml you when trying to access a not existing object from a AWS S3 bucket).
Adding the --no-verify flag yelds the same result.
EDIT
I tried to bypass this problematic "Looking if package named:..." step: I edited logstash-5.1.1\lib\pluginmanager\pack_fetch_strategy\repository.rb, adding a return nil at the beginning of the def get_installer_for(plugin_name).
Running the installation, I get another error:
Installing logstash-filter-elapsed
Error Bundler::HTTPError, retrying 1/10
Could not fetch specs from https://rubygems.org/
Error Bundler::HTTPError, retrying 2/10
Could not fetch specs from https://rubygems.org/
...