0

Node 1(Desktop) deployed a contract on private blockchain. From node2(Laptop),I want to interact with the contract.

But I failed at 'web3.version.getNetwork(err, netId)' function.This function throws json-rpc server error.

I am getting Network id value as undefined.But when i tried this on Node1 itself, it is working. To access json-rpc server from Node2, Do I have to configure anything on My Node2?

1

Deploying a contract on the network by any node in that network makes it accessible by all the nodes in the network. The JSON-RPC error is probably due to the second node (laptop) not being properly configured or lacking synchronization with the first node.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.