Issue: I fail to migrate(connect) a ethereum private chain on cloud server.
Actual Results
Will:dragon zhuangweiming$ truffle migrate --network development
Using network 'development'.
Running migration: 1_initial_migration.js
Could not connect to your Ethereum client. Please check that your Ethereum client:
- is running
- is accepting RPC connections (i.e., "--rpc" option is used in geth)
- is accessible over the network
- is properly configured in your Truffle configuration file (truffle.js)
Environment
truffle.js
module.exports = {
networks: {
development: {
host: "47.92.53.158", //this is the IP of ethereum server running on cloud
port: 8545, //
network_id: "15", // test server.
from: "0xbe2c0def75c0257f1a9968d2d373febf849d6603", // account created on ethereum 47.92.53.158.
gas: 4712388, //default 4712388
gasPrice: 100000000000 //default 100000000000(100 Shannon)
}
}
};
1_initial_migration.js
var Migrations = artifacts.require("./Migrations.sol");
module.exports = function(deployer) {
deployer.deploy(Migrations);
};
2_deploy_contracts.js
var Dragon = artifacts.require("./Dragon.sol");
module.exports = function(deployer) {
deployer.deploy(Dragon);
};
I tried geth command as below:
geth --networkid 15 --datadir data --rpc --rpcapi 'web3,eth,net' --rpccorsdomain '*' --rpcaddr 0.0.0.0 --rpcport 8545 --port 30303 console