虚拟机开机黑屏和zk启动报磁盘满错误

1、虚拟机开机黑屏

无法进入登录linux,提示the configuration defaults for gnome power manager have not been installed correctly

可能是磁盘满造成的

使用命令

find / -size +200M -exec du -h {} \;查看大于200M的文件(首选删除日志文件)。

查询出来大文件删除即可,测试可用,如果不是太多大文件导致磁盘满,可以使用下一种方式

以管理员身份运行CMD-输入netsh winsock reset 重启即可,

2中方式大家可以试试

2、启动zk报错

he accepted epoch, d4 is less than the current epoch, d5

可能是内存不足:部署zookeeper的服务器磁盘满了,引起服务异常,

2018-05-07 10:33:58,556 [myid:3] - INFO  [main:FileSnap@83] - Reading snapshot /opt/data/zookeeper/version-2/snapshot.1900356f19
2018-05-07 10:33:58,966 [myid:3] - ERROR [main:Util@239] - Last transaction was partial.
2018-05-07 10:33:58,968 [myid:3] - ERROR [main:QuorumPeer@648] - Unable to load database on disk
java.io.IOException: The accepted epoch, 19 is less than the current epoch, 3a
    at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:645)
    at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:591)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:164)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
2018-05-07 10:33:58,970 [myid:3] - ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally
java.lang.RuntimeException: Unable to run quorum server 
    at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:649)
    at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:591)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:164)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: java.io.IOException: The accepted epoch, 19 is less than the current epoch, 3a
    at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:645)
    ... 4 more

经过网上查询,得到解决方法:
将zookeeper的version-2目录备份一份,再重新创建一个新的version-2目录,然后重新启动zookeeper。

mv version-2.tmp

mkdir version-2

重启即可,

希望可以帮助到大家

 

 

 

你可能感兴趣的:(zookeeper,linux)