I have to install a bna file on fabric . I am following the link https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org.html . However when I run the command: composer runtime install -c PeerAdmin#fabric-network -n tutorial-network
I am getting the error :
Error: Error trying install composer runtime. Error: No valid
responses from any peers.
Response from attempted peer comms was an error:
Error: Failed to deserialize creator identity, err The supplied
identity is not valid, Verify() returned x509: certificate signed by
unknown authority (possibly because of "x509: ECDSA verification
failure" while trying to verify candidate authority certificate
"ca.org1.example.com").
Any help on this please
sounds like you have made an error in following the tutorial (which definitely works). Are you sure the MSP id (Org1MSP) for the peer has been setup correctly ? Have you checked that the peer has successfully joined the channel (when the Fabric was started)? Have you done a docker ps to see your Fabric docker containers are running?) Assuming you followed the steps correct and using an identity you have obtained from a fabric-ca server (per the tutorial), have you checked the fabric-ca server is running correctly (docker logs ? Also, is it possible you're restarted your Fabric docker environment at one point and now your old key information is invalid?
eg
{
"name": "fabric-network",
"type": "hlfv1",
"mspID": "Org1MSP",
"peers": [
{
"requestURL": "grpc://localhost:7051",
"eventURL": "grpc://localhost:7053"
}
],
"ca": {
"url": "http://localhost:7054",
"name": "ca.org1.example.com"
},
"orderers": [
{
"url" : "grpc://localhost:7050"
}
],
"channel": "composerchannel",
"timeout": 300
}
then re-create the card with the correct key/signcert info
composer card create -p connection.json -u PeerAdmin -c Admin#org1.example.com-cert.pem -k xxxxx_sk -r PeerAdmin -r ChannelAdmin
where the .pem file comes from signcerts directory and xxxxx is the generated value for the key filename in keystore.
Related
I am trying to install sitecore without using SIA due some proxy and firewall security issues.I am following steps mentioned in below URL.
https://naveed-ahmad.com/2019/11/28/install-sitecore-9-3-using-3-simple-commands/
But I kept getting below error even if i have changed my SQL Server name and password for sa user in XP0-SingleDeveloper file.
Don't know why it is still trying to connect to localhost server.
[---------------------------------- XConnectXP0_InstallWDP : WebDeploy -----------------------------------------------]
[WebDeploy]:[Path] C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe
msdeploy.exe : Error Code: ERROR_EXECUTING_METHOD
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.3.0\Public\Tasks\Invoke-CommandTask.ps1:31
char:13
& $Path $Arguments | Out-Default
~~~~~~~~~~~~~~~~~~
CategoryInfo : NotSpecified: (Error Code: ERROR_EXECUTING_METHOD:String) [], RemoteException
FullyQualifiedErrorId : NativeCommandError
More Information: Could not deploy package.
Unable to connect to target server 'localhost'. Please verify the connection information such as the server name,
login credentials, and firewall rules for the target server.
Login failed for user 'sa'.
Lear
n more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.
Error: Could not deploy package.
Error: Unable to connect to target server 'localhost'. Please verify the connection information such as the server
name, login credentials, and firewall rules for the target server.
Error: Login failed for user 'sa'.
Error count: 1.
Install-SitecoreConfiguration : Command C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a non-zero
exit code - (-1)
At
1.1.1-r4)\XP0-SingleDeveloper.ps1:77 char:1
Install-SitecoreConfiguration #singleDeveloperParams *>&1 | Tee-Objec ...
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
[TIME] 00:01:31
Can someone please guide if we need to update any other file for this.
Did you change the $SqlServer variable in the XP0-SingleDeveloper.ps1 ?
It is possible that localhost value comes from the default value which is defined XP0-SingleDeveloper.json parameter file and your custom value is not passed to the install script. You may can try to modify the default in the json file directly too.
"SQLServer": {
"Type": "String",
"DefaultValue": "Localhost",
"Description": "The Sql Server where databases will be installed."
}
I have tried to use docker toolbox to setup Hyperledger V1.0 in my local machines.
I according to this document:
http://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html
But when I tried to deploy chaincode.
$node deploy.js
I got an error message:
info: Returning a new winston logger with default configurations
info: [Chain.js]: Constructed Chain instance: name - fabric-client1, securityEnabled: true, TCert download batch size: 10, network mode: true
info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca
info: [Peer.js]: Peer.const - url: grpc://localhost:8055 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca
info: [Peer.js]: Peer.const - url: grpc://localhost:8056 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca
info: [Client.js]: Failed to load user "admin" from local key value store
info: [FabricCAClientImpl.js]: Successfully constructed Fabric COP service client: endpoint - {"protocol":"http","hostname":"localhost","port":8054}
info: [crypto_ecdsa_aes]: This class requires a KeyValueStore to save keys, no store was passed in, using the default store C:\Users\daniel\.hfc-key-store
[2017-04-15 22:14:29.268] [ERROR] Helper - Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:8054]
at ClientRequest.<anonymous> (C:\Users\daniel\node_modules\fabric-ca-client\lib\FabricCAClientImpl.js:304:12)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1278:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
[2017-04-15 22:14:29.273] [ERROR] DEPLOY - Error: Failed to obtain an enrolled user
at ca_client.enroll.then.then.then.catch (C:\Users\daniel\helper.js:59:12)
at process._tickCallback (internal/process/next_tick.js:103:7)
events.js:160
throw er; // Unhandled 'error' event
^
Error: Connect Failed
at ClientDuplexStream._emitStatusIfDone (C:\Users\daniel\node_modules\grpc\src\node\src\client.js:201:19)
at ClientDuplexStream._readsDone (C:\Users\daniel\node_modules\grpc\src\node\src\client.js:169:8)
at readCallback (C:\Users\daniel\node_modules\grpc\src\node\src\client.js:229:12)
Is this an question about unable to connect to ca? Or other causes?
Edit:
Environment:
OS: Windows 10 Professional Edition
Docker Toolbox: 17.04.0-ce
Go: 1.7.5
Node.js: 6.10.0
My steps:
1.Open Docker Quickstart Terminal and key commands.
$curl -L https://raw.githubusercontent.com/hyperledger/fabric/master/examples/sfhackfest/sfhackfest.tar.gz -o sfhackfest.tar.gz 2> /dev/null; tar -xvf sfhackfest.tar.gz
$docker-compose -f docker-compose-gettingstarted.yml build
$docker-compose -f docker-compose-gettingstarted.yml up -d
$docker ps
It has been confirmed that six containers have been activated
2.Download examples and install modules.
$curl -OOOOOO https://raw.githubusercontent.com/hyperledger/fabric-sdk-node/v1.0-alpha/examples/balance-transfer/{config.json,deploy.js,helper.js,invoke.js,query.js,package.json}
//This link didn't work, so I downloaded the required files from GitHub of fabric-sdk-node
$npm install --global windows-build-tools
$npm install
3.Try to deploy chaincode.
$node deploy.js
There were several problems, not the least of which that documentation was outdated and was for a preview release of Hyperledger Fabric. The docs are actually in the process of being removed as we need to update our examples / samples.
You mentioned Docker Toolbox - so are you trying to run all of this on Windows or Mac?
UPDATE:
So one of the issue with Docker Toolbox or Docker for Windows is that you cannot use localhost / 127.0.0.1 as the address when trying to communicate from apps on the host (even in the QuickStart Terminal) to the endpoints of the Docker containers. When the QuickStart Terminal first launches Docker, you'll see that it will output the IP address of the endpoint you should use when communicating with exposed ports.
I was having the same issue while following the latest "Writing Your First Application" tutorial (http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html). I had installed all the pre-requisites and the fabric-samples and started the local network.
When I got to the step of enrolling the Admin user, $ node enrollAdmin.js, I was getting the same error message as above, Error: connect ECONNREFUSED, followed by the localhost domain.
As the first answer suggests, the root cause is that I'm running Docker Toolbox. I'm developing on an older Mac, OSX v10.9.5, so I couldn't use Docker for Mac.
To fix the issue, I replaced 'localhost' in the enrollAdmin.js code with the IP from Docker Toolbox.
Here are the steps I took:
Started Docker with Applications > Docker Quickstart Terminal
Copied the IP from this sentence: docker is configured to use the default machine with IP...
Opened the copy of enrollAdmin.js from fabric-samples/fabcar directory
Found this code:
// be sure to change the http to https when the CA is running TLS enabled
fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite); // <-- This is the line to change
Replaced 'localhost' with the Docker IP, leaving the port :7054 as is.
Saved
Re-ran the command, $ node enrollAdmin.js
The script connected to the CA and successfully completed the Admin enrollment.
On to the next step!
Im getting following error when trying to deploy my meteor application in AWS.
I have selected ubuntu as my operating system with 30 Gb of HDD. i have attached my mup.json file and snap of cmd response .
My mup.json is :
{
// Server authentication info
"servers": [
{
"host": "ec2-XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.compute.amazonaws.com",
"username": "ubuntu",
//"password": "password"
// or pem file (ssh based authentication)
"pem": "D:/abcUbuntu.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.36",
// Install PhantomJS in the server
"setupPhantom": true,
// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,
// Application name (No spaces)
"appName": "Qxmedics",
// Location of app (local directory)
"app": "D:/abc/version1",
// Configure environment
"env": {
"PORT":80,
"ROOT_URL": "ec2-XXXXXXXXXXXXXXXXXXXXX.compute.amazonaws.com",
"MONGO_URL": "mongodb://localhost:27017/meteor"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
I tried alot... please help me out with this thanks.
For me the solution was making the wait time 45. If the rest is correct, it should confirm and deploy.
"deployCheckWaitTime": 45
It says there is a problem with your URL so, make sure it is a correct one with http or https.
Running Kubernetes on CoreOS on an AWS EC2 instance, I am unable to execute apiserver via a hyperkube Docker container successfully. The problem is that the etcd server refuses connections due to a bad certificate.
What happens is this:
$ docker run -v /etc/ssl/etcd:/etc/ssl/etcd:ro gcr.io/google_containers/hyperkube:v1.1.2 /hyperkube apiserver --bind-address=0.0.0.0 --insecure-bind-address=127.0.0.1 --etcd-servers=https://172.31.29.111:2379 --allow-privileged=true --service-cluster-ip-range=10.3.0.0/24 --secure-port=443 --advertise-address=172.31.29.111 --admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota --tls-cert-file=/etc/ssl/etcd/master1-master-client.pem --tls-private-key-file=/etc/ssl/etcd/master1-master-client-key.pem --client-ca-file=/etc/ssl/etcd/ca.pem --kubelet-certificate-authority=/etc/ssl/etcd/ca.pem --kubelet-client-certificate=/etc/ssl/etcd/master1-master-client.pem --kubelet-client-key=/etc/ssl/etcd/master1-master-client-key.pem --kubelet-https=true
I0227 17:07:34.117098 1 plugins.go:71] No cloud provider specified.
I0227 17:07:34.549806 1 master.go:368] Node port range unspecified. Defaulting to 30000-32767.
[restful] 2016/02/27 17:07:34 log.go:30: [restful/swagger] listing is available at https://172.31.29.111:443/swaggerapi/
[restful] 2016/02/27 17:07:34 log.go:30: [restful/swagger] https://172.31.29.111:443/swaggerui/ is mapped to folder /swagger-ui/
E0227 17:07:34.659701 1 cacher.go:149] unexpected ListAndWatch error: pkg/storage/cacher.go:115: Failed to list *api.Pod: 501: All the given peers are not reachable (failed to propose on members [https://172.31.29.111:2379] twice [last error: Get https://172.31.29.111:2379/v2/keys/registry/pods?quorum=false&recursive=true&sorted=true: remote error: bad certificate]) [0]
The certificate should be good though. If I execute an interactive shell within that Docker image, I can get the etcd URL via curl without any issues. So, what is going wrong in this case and how do I fix it?
I found I could solve this by using --etcd-config instead of --etcd-servers:
docker run -p 443:443 -v /etc/kubernetes:/etc/kubernetes:ro -v /etc/ssl/etcd:/etc/ssl/etcd:ro gcr.io/google_containers/hyperkube:v1.1.2 /hyperkube apiserver --bind-address=0.0.0.0 --insecure-bind-address=127.0.0.1 --etcd-config=/etc/kubernetes/etcd.client.conf --allow-privileged=true --service-cluster-ip-range=10.3.0.0/24 --secure-port=443 --advertise-address=172.31.29.111 --admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota --kubelet-certificate-authority=/etc/ssl/etcd/ca.pem --kubelet-client-certificate=/etc/ssl/etcd/master1-master-client.pem --kubelet-client-key=/etc/ssl/etcd/master1-master-client-key.pem --client-ca-file=/etc/ssl/etcd/ca.pem --tls-cert-file=/etc/ssl/etcd/master1-master-client.pem --tls-private-key-file=/etc/ssl/etcd/master1-master-client-key.pem
etcd.client.conf:
{
"cluster": {
"machines": [ "https://172.31.29.111:2379" ]
},
"config": {
"certFile": "/etc/ssl/etcd/master1-master-client.pem",
"keyFile": "/etc/ssl/etcd/master1-master-client-key.pem"
}
}
I want to deploy my website using meteor-up. I want to deploy it to a EC2 instance on AWS. I have created my mup.json file and configured it as follows:
{
// Server authentication info
"servers": [
{
"host": "ec2-52-24-95-147.us-west-2.compute.amazonaws.com",
"username": "ubuntu",
//"password": "password"
// or pem file (ssh based authentication)
"pem": "C:/Users/username/meteor.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.35",
// Install PhantomJS in the server
"setupPhantom": false,
// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,
// Application name (No spaces)
"appName": "Homepage",
// Location of app (local directory)
"app": "C:/website",
// Configure environment
"env": {
"ROOT_URL": "ec2-52-24-95-147.us-west-2.compute.amazonaws.com",
"PORT": 80,
"METEOR_ENV": "production"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
Unfortunately this is not working and I am getting the following error:
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT {public IP from AWS}:22
at Object.exports._errnoExcpetion (util.js:837:11)
at exports._excpetionWithHostPort (util.js:860:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)
Per the https://github.com/arunoda/meteor-up, try setting the DEBUG environment variable:
Verbose Output
If you need to see the output of meteor-up (to see more precisely where it's failing or hanging, for example), run it like so:
DEBUG=* mup <command>
where is one of the mup commands such as setup, deploy, etc.