Error: Invalid JSON RPC response: "" #3370
Description
I have a set of simple contracts that I am trying to deploy via truffle migrate --reset
to a private PoA chain running on geth 1.9.10 (amd64/Win10). I have the node with the RPC API open running in one terminal window and am running the migrate command in another window (in addition to other network nodes running elsewhere). I am using Truffle's HDWalletProvider and referencing the server by IP 127.0.0.1 with port as appropriate to the RPC-running node.
The migration deploys several contracts and has a 20 second gap between them, which is considerably greater than the 5 second gap between blocks on the running chain.
The account the contracts are being deployed from is richly prefunded in the genesis block.
The first 2-3 contracts reliably deploy successfully, and in the node terminal I see a line saying "Submitted contract creation" with fullhash and contract values matching the transaction hash and contract address reported by Truffle.
However, soon after, I get a large group of errors reporting Invalid JSON RPC response: ""
The stack trace says the following (where dir
is actually much longer):
at Object.InvalidResponse (dir\node_modules\web3-core-helpers\src\errors.js:42:16)
at XMLHttpRequest.request.onreadystatechange (dir\node_modules\web3-providers-http\src\index.js:92:32)
at XMLHttpRequestEventTarget.dispatchEvent (dir\node_modules\xhr2-cookies\xml-http-request-event-target.ts:44:13)
at XMLHttpRequest._setReadyState (dir\node_modules\xhr2-cookies\xml-http-request.ts:219:8)
at XMLHttpRequest._onHttpRequestError (dir\node_modules\xhr2-cookies\xml-http-request.ts:379:8)
at ClientRequest.<anonymous> (dir\node_modules\xhr2-cookies\xml-http-request.ts:266:37)
at ClientRequest.emit (events.js:159:13)
at Socket.socketErrorListener (_http_client.js:389:9)
at Socket.emit (events.js:159:13)
at emitErrorNT (internal/streams/destroy.js:64:8)
at process._tickCallback (internal/process/next_tick.js:152:19)
Versions
Solidity ^0.5.0 in contracts and in truffle-config.js
truffle version
:
Truffle v5.1.12 (core: 5.1.12)
Solidity - ^0.5.0 (solc-js)
Node v9.3.0
Web3.js v1.2.1
I don't think it's an issue where Truffle can't reach the server at all, because the first few contracts seem to deploy fine. Also it doesn't seem like this traffic with the 20 second gaps should be enough to overwhelm the RPC server. The server console does not indicate any problems.