Unlock account using code not working

Category: azure blockchain

Question

TS_Prasanna on Thu, 20 Jul 2017 15:49:47

I am able to deploy and run fully tested on local geth solidity code to Ethereum and execute my methods (with events etc). Only problem is unlock method throws error, for every transaction methods I had to unlock the account by hand on the SSH client of ehtereum.

Error I am getting is: The method personal_unlockAccount does not exist/is not available

On the SSH console I have attempted executing following recommendation:

geth –rpcapi ",eth,web3,private,net,miner,admin,debug", (with –rpc as well).

However with Ethereum the geth has already commenced so these guideline gives error that database is not available.

I0720 15:49:03.822513 knot/config.go:445] Failed to commence Ledger hub, disabling: libusb: unknown error [code -99]

I0720 15:49:03.822653 ethdb/database.go:83] Allotted 128MB cache and 1024 file treats to /home/gethadmin/.ethereum/geth

Fatal: Could not open database: resource temporarily unavailable

What is the way to get unlock to work programmatically?

PS: I am using nethereum to work with Ethereum.

Replies

TS_Prasanna on Fri, 21 Jul 2017 03:37:21

Ok, got it to work.

*it has security risk opening this service when public ip is exposed*

  • Open the SSH console for transaction knot.
  • Use editor to open the ",start-private-blockchain.sh",
  • Navigate to the line where Geth instruction is setup
  • Add the services that the geth to be embarked with. ",–rpcapi ",eth,web3,individual",
  • Restart the tx VM using azure portal.

salmanprk on Tue, 25 Jul 2017 07:47:34

I am facing a similar problem albeit I am not sure if it is the exact similar. I am using Ethereum Consortium Leader template. Whenever, I log into my tx-node and go inwards geth console by typing ",geth link",, I am incapable to unlock the default ethereum account using ",individual.unlockAccount(eth.coinbase)",. I am prompted for a passphrase but whenever I come in the passphrase that I used when I deployed the Ethereum Consortium Leader, it doesn’t accept it.

I have attempted this Five times, as well several times by redeploying the template. I am indeed stuck

Microsoft Azure Blockchain Team on Fri, 01 Sep 2017 07:08:Nineteen

In the multi-member solution the passphrase is different for the coinbase account from what you specified at deployment time. We are looking into addressing this. Our guidance is to create a fresh account that you are able to sign transactions from (i.e. you have the private key or create it directly on the geth knot – then transfer ether to this account via the admin page and then use this account for creating brainy contracts etc.

Microsoft Azure Blockchain Team

Latest posts in the category

windows phone development_ja

Related movie: How To Buy Bitcoin With Coinbase | Adding Funds to Coinbase


Leave a Reply

Your email address will not be published. Required fields are marked *

*