简体   繁体   中英

Truffle migrate Server Error (on truffle init demo)

I'm a DAPP beginner, and am trying to get up and running with the Truffle framework. I've been walking through the Truffle docs, but it doesn't work out of the box for me.

  • Create directory, cd into it, and run 'truffle init'
  • Run 'truffle compile'
  • Run testrpc in a second terminal window, same project directory
  • Run 'truffle migrate'

This is the error I get from truffle:

Running migration: 1_initial_migration.js


Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: Server error
    at Object.module.exports.InvalidResponse (/usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/errors.js:35:16)
    at /usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/requestmanager.js:86:36

I get this with Node v5 & v6. Truffle v2.1.1. Web3 and ether-pudding are installed as truffle dependencies. TestRPC/0.8.7/darwin/python2.7.12.

Thanks for the help-

Are you sure you did run testrpc in a second window and let it run? This is important as testrpc in that case is yoir blockchain. If it does not run you will get similar errors as what you describe. To keep it simple, I also suggest as a start that you do not run another client while running testrpc (geth, parity, mist, ... )

So in short, do a reboot, start testrpc, make sure it does not display errors, then run the truffle migrate command while testrpc still runs in the background.

Truffle migrate does run correctly. I've reposted my issue with testrpc here: Testrpc error: 'no loggers could be found for logger 'jsonrpc.manager'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM