Error with truffle deploy command - truffle

I want to deploy a smart contract to a private network.
I start the network like this
geth --datadir="~/truffle" --port 30303 --rpc --rpcport 8545 --rpcaddr
localhost --networkid 27441 --rpccorsdomain="*" --minerthreads "1"
--mine --rpcapi "eth,web3" --maxpeers 4 --unlock=0
then I run ’truffle deploy'
I get the message:
Error deploying SimpleStorage:
Account does not exist or account balance too low Deploy failed.
See above."
Could you please give me some ideas about this?

Make sure:
1. You are typing password after starting geth, to unlock your account.
2. You have enough ether in your selected account.

Related

Dapr service invocation between VMs over DNS-SD/Bonjour

I have two VMs (same host machine) running Windows Server 2019. One of them is running a sample .NET server via dapr (slim init)
dapr run --app-id weather-service --app-port 5001 -- .\WeatherService.exe
Invoking some endpoint from the same VM seems to work perfectly fine
dapr invoke --app-id weather-service --method weatherforecast --verb GET
The issue is, dapr cannot find the service when issuing the exact same invoke command from the other VM:
error invoking app weather-service: app ID weather-service not found
I checked that the two VMs are in a virtual network (ping works fine), Bonjour is installed on both of them and the second VM seems to recognize the dapr service running:
dns-sd -B _services._dns-sd._udp
Browsing for _services._dns-sd._udp
Timestamp A/R Flags if Domain Service Type Instance Name
8:50:48.331 Add 2 3 . local.local. weather-service
Any ideas what I might be doing wrong here? Any hints as for how to diagnose this issue?

Connecting to Azure Container Services from Windows 8.1 Docker

I've been following this tutorial to set up an Azure container service. I can successfully connect to the master load balancer via putty. However, I'm having trouble connecting to the Azure container via docker.
~ docker -H 192.168.33.400:2375 ps -a
error during connect: Get https://192.168.33.400:2375/v1.30/containers/json?all=1: dial tcp 192.168.33.400:2375: connectex: No connection could be made because the target machine actively refused it.
I've also tried
~ docker -H 127.0.0.1:2375 ps -a
This causes the docker terminal to hang forever.
192.168.33.400 is my docker machine ip.
My guess is I haven't setup the tunneling correctly and this has something to do with how docker runs on Windows 8.1 (via VM).
I've created an environment variable called DOCKER_HOST with a value of 2375. I've also tried changing the value to 192.168.33.400:2375.
I've tried the following tunnels in putty,
1. L2375 192.168.33.400:2375
2. L2375 127.0.0.1:2375
3. L22375 192.168.33.400:2375
4. L22375 127.0.0.1:2375 (as shown in the video)
Does anyone have any ideas/suggestions?
Here are some screenshots of the commands I ran:
We can follow this steps to setup tunnel:
1.Add Azure container service FQDN to Putty:
2.Add private key(PPK) to Putty:
3.Add tunnel information to Putty:
Then we can use cmd to test it:

Azure Hyperledger Fabric Single Member Blockchain setup

I'm starting to use Azure to host a multi node Hyperledger network. I've previously been running on a local environment, but would like to use Azure. I've deployed the 'Hyperledger Fabric Single Member Blockchain' template, which creates five VM's (one each for a CA, orderer and three peers). My local environment uses a CLI, but this doesn't seem to be in the Azure template. How do i interact with the blockchain network without the CLI?
Are there any tuturials for how to use the deployed environment after its been setup?
I've SSH'd to all of the three VM's that are hosting the peers, there seems to be an error with the docker container that has been automatically setup by deploying the Azure template. Running 'docker ps' shows that they are restarting reguarly, and i can't connect using the command docker exec -it bash (i get an error saying that its restarting). Eg:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
817bbb256e5b hyperledger/fabric-peer:x86_64-1.0.0-alpha "peer node start -..." 7 hours ago Restarting (2) 6 seconds ago sad_clarke
Does anyone have the Hyperledger Fabric Single Member Blockchain template working?
Thanks
Paul
To interact with Hyperledger on Azure, you may indeed ssh into one of the VMs. Once there, you can use docker exec -it <container-name> bash to get a prompt in the the docker image running on that VM (ca, peer or orderer). In there you can issue commands.
I got the docker restarting error you mentioned after rebooting the VMs (but not immediately after deployment). I believe there is a bug in the MS deployment script. The configure-fabric-azureuser.sh uses cacert="/etc/hyperledger/fabric-ca-server-config/${PEER_ORG_DOMAIN}-cert.pem" but after replacing with cacert="/etc/hyperledger/fabric-ca-server-config/ca.${PEER_ORG_DOMAIN}-cert.pem" all my problems with docker image restarting or running Hyperledger Composer tutorial were gone. I posted a fix on https://github.com/fabienpe/azure-hyperledger-artifacts
Have you checked the config.log files on each VM?

Unable to connect with Azure Container Services - Kubernetes

I am working on setting up environment for deploying microservices.
I have gotten as far as building my code and deploying to a registry but having problem running it in Azure Container Services.
I am following this guide to connect to ACS: https://learn.microsoft.com/en-us/azure/container-service/container-service-connect
But i fail on the step: Download Cluster Credentials
Using the given command
az acs kubernetes get-credentials --resource-group=<cluster-resource-group> --name=<cluster-name>
Ofc changing the reseource group and clustername to the correct names from my portal. I get an error:
[WinError 10049] The requested address is not valid in its context
(if i change resource group or clustername to something else I get other errors so seems it can find those at least)
When i try to search for the error it seems to be some IP adress problem but can't figure out what to do. Tried running same command from other network (from home) to make sure work firewall is not blocking something.. but I get the same error
Any help appriciated!
This command copy the cluster credentials to your machine. Background processes are ssh to your cluster VM and copy the credentials.
So, you should ensure you could ssh to the master VM manual. If you could not ssh to master VM manual, az command also could not do it. You could get your master-dns-name on Azure Portal.
ssh -i id_rsa <user>#<master-dns-name>
Notes: If az command does not work and you could ssh to master VM, you could download credentials to your machine. They are same. You could check your link about this.
You also need check your azure cli version. You could use the following commands
az --version
My version is 2.02. It works for me.

Cannot get node hello world app to deploy on GCloud

I cannot for the life of me the the hello world app that google provides to work. I am following the tutorial here: https://cloud.google.com/nodejs/getting-started/hello-world
I have followed all the steps and the hello world code runs perfectly on my local machine. However, when I try to run
gcloud preview app deploy app.yaml --promote
I get the following output:
You are about to deploy the following modules:
- empirical-lens-111022/default (from [C:\Users\zakpt\Downloads\nodejs-getting-started-1-hello-world\nodejs-getting-started-1-hello-world\app.yaml])
Deployed URL: [https://empirical-lens-111022.appspot.com]
Do you want to continue (Y/n)? y
Beginning deployment...
Verifying that Managed VMs are enabled and ready.
Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH keypair.
ERROR: (gcloud.preview.app.deploy) Couldn't connect to the Docker daemon.
I have no idea what to do, since the Docker isn't mentioned at all in the tutorial, and googling has only shown solutions for OSX. I am on Windows 10

Resources