[Ethereum] Metamask Unable to send transactions to Ethereum private network

contract-developmentmetamaskremixsolidity

I'm using Metamask.io extension on Google Chrome.
Correctly connected Metamask.io to Private network hosted on AWS EC2 instance using the socket address (IP:port number).
Basic Contract has been deployed on the blockchain using Remix IDE for solidity programming. I am able to fetch the information (getInstructor function). However, unable to set the new instructor information.

Steps –

  1. On Remix IDE, I call the function.
  2. It opens the Metamask pop-up and I use the default gas price.
  3. Transaction never gets executed.

On the ethereum private blockchain node, I tried to find pending transactions and there wasn't any.
As shown by,

> eth.pendingTransactions
[]

However upon trying this,

web3.eth.getBlock("pending")
{
  difficulty: 25082169,
  extraData: "0xd583010701846765746885676f312e39856c696e7578",
  gasLimit: 4712388,
  gasUsed: 0,
  hash: null,
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  miner: null,
  mixHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
  nonce: null,
  number: 1557557,
  parentHash: "0xf84ce5ff7845f399eb698bfc33abeb24a8e459096d7ad9c097de3eb6130a6360",
  receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  size: 537,
  stateRoot: "0x017184c9d24daab688c39468af064cd3ab748f5adc9c5b1fd3c5bcc2f3a318a0",
  timestamp: 1523753000,
  totalDifficulty: 0,
  transactions: [],
  transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  uncles: []
}

Few days back I was able to perform this basic transaction but now I am not. Unable to understand what's the issue.

Possible errors –

According to these discussions

miner nodes and
transaction not being sent, I tried creating another personal account and letting it mine (that failed).

Best Answer

The "usual" setup for development is not to connect Metamask to your AWS node because you don't want to expose APIs to that node. I'm guessing you're using POA right ?

Just get a local node running on your computer and connect metamask to localhost.

By default the node will only accept connections from localhost. You can change this to accept connections from anyone with: --rpcaddr "0.0.0.0".

Please note that anytime a private key is unlocked, anyone on the Internet can use this key by querying your rpc server and send transactions.

Related Topic