【补遗】搭建见证人节点中遇到的问题

in #cn7 years ago (edited)

继上一篇《如何搭建见证人节点》,这篇的目的主要是补遗。由于教程中使用的那个一键脚本我也第一次用,所以难免有疏漏的问题。下面就说一下,我用那个一键脚本这两天测试发现的问题。

见证人节点容器不能自动重启

由于这个一键脚本是把见证人服务封装在 Docker 容器里,因此你需要对 Docker 的操作多少了解下,至少 常用命令 需要了解。

目前使用一键脚本启动的容器,在 Docker 服务重启或者主机重启的时候不能自启动。

解决方法:

1.获取目前正在运行的容器的id

2.停止容器

docker stop 1d979d0198ac

3.删除容器

docker rm 1d979d0198ac

4.修改 run.sh 脚本,增加 --restart always 参数

增加restart参数

5.重新执行 ./run.sh replay

/dev/shm 的容量在重启后还原

我们教程中,提到把 /dev/shm 的容量改到了接近内存实际大小,而重启的时候,发现容量又变回了真是内存大小的一半。

解决方法:

/etc/fstab 中增加如下一行

tmpfs /dev/shm tmpfs defaults,size=30G     0     0

其中 size 就是你想要设定的具体容量值。这样每次启动的时候,/dev/shm 就会按照预设的值挂载。

关于小内存

关于小内存,我在一台 6G 内存的 VPS 上没测完,实在是等不下去了,重建索引的太慢了,整个见证人程序没看到耗多少资源,但就是把整台服务器的其他服务也拖慢了,可能跟我用的是 HDD 有关。如果你执意用小内存设备,建议硬盘至少要是 SSD。

Sort:  

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by ETY001 from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Coin Marketplace

STEEM 0.16
TRX 0.16
JST 0.030
BTC 57694.11
ETH 2446.73
USDT 1.00
SBD 2.38