EOS问题汇总


(码不停蹄) #1
运行nodeos时候报错

Q:下边代码是用于异常停止服务的恢复

A:

nodeos --data-dir /opt/eosio/bin/data-dir --hard-replay-blockchain --truncate-at-block [有问题的区块编号] -e

Q:nodeos启动失败

:std::exception::what: unrecognised option '--resync-blockchain'

A:删除block,重新同步

 nodeos --replay-blockchain --hard-replay-blockchain --delete-all-blocks

Q:部分版本插件名称错误

std::exception::what: unable to find plugin: eosio::account_history_api_plugin

A:

plugin = eosio::account_history_api_plugin
替换为
plugin = history_api_plugin

Q:get_actions和get_transaction接口使用后没有返回值?

A:启动的时候添加–filter-on "*"或者在config.ini中添加filter-on = *


Q:发布交易失败

Error 3090003: provided keys, permissions, and delays do not satisfy declared authorizations

A:将私钥导入钱包中或者私钥错误


Q:公网同步区块失败,报错如下图

A:修改genesis.json,将这个修改为"initial_key": “EOS7EarnUhcyYqmdnPon8rm7mBCTnBoot6o7fE2WzjvEX2TdggbL3”,保证genesis.json文件中的公钥和主网一致。


Q:交易超时

Error 3040005: Expired Transaction
Please increase the expiration time of your transaction!

A:注意服务器系统时间是否准确,并且可以修改config.ini中max-transaction-time = 30000。如果是连接主链,则先确认是否同步区块到最新高度或者解决于最新高度。两者的时间差小于最大的超时时间。


Q:自动化部署失败

Beginning build version: 1.2
Thu Jul 12 06:33:42 UTC 2018
User: root
git head id: f947a6daa6fac1891bd5bb5b2c88a08025c6e740
Current branch: HEAD

ARCHITECTURE: Linux

OS name: CentOS Linux
OS Version: 7
CPU speed: 2397Mhz
CPU cores: 4
Physical Memory: 16048 Mgb
Disk install: /dev/mapper/rootvg-root
Disk space total: 62G
Disk space available: 57G

Checking Yum installation
Yum installation found at /bin/yum.

Checking installation of Centos Software Collections Repository.
Centos Software Collections Repository found.


Enabling Centos devtoolset-7.

Unable to enable Centos devtoolset-7 at this time.

Exiting now

A:
参考网址:https://blog.csdn.net/lizhengjava/article/details/80269484

//现在依赖
sudo yum -y --enablerepo=extras install centos-release-scl

sudo yum install -y devtoolset-7

sudo yum install -y python33.x86_64

//配置系统环境
source /opt/rh/devtoolset-7/enable 

Q:交易时提示

A:config.ini文件中修改http-validate-host属性,关闭主机验证,并且重新启动nodeos

"http-validate-host = 1" 改成 "http-validate-host = false"

Q:编译abi文件失败

A:找不到相关依赖,需要在build/中执行sudo make install。


Q:遇到kill nodeos导致数据错误,无法在进行同步区块,需要删除全部区块,重新开始同步的问题。

A:kill nodeos的时候选择kill -2 $(pid),而不是kill -9 $(pid),强制中断会导致数据错误问题。


Q:


A:在genesis.json文件中,max_transaction_cpu_usage必须max_block_cpu_usage



(yinhaiquan) #2

你好,我的docker安装的eos钱包节点,缺少wallet等插件,怎么办?
eos/libraries/appbase/application.cpp(309): Throw in function appbase::abstract_plugin &appbase::application::get_plugin(const string &) const
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::runtime_error >
std::exception::what: unable to find plugin: eosio::wallet_api_plugin


(码不停蹄) #3

请注明说下docker的镜像地址和启动指令


(yinhaiquan) #4

docker 镜像是eosio/eos-dev
启动指令
docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/work -v /tmp/eosio/data:/mnt/dev/data -v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev /bin/bash -c “nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin -d /mnt/dev/data --config-dir /mnt/dev/config --http-server-address=0.0.0.0:8888 --access-control-allow-origin=* --contracts-console --http-validate-host=false”


(ameqixaffe) #5


学习了


(dj) #6

你好 解决了吗