ambari biginsights kafka未启动

vuktfyat  于 2021-06-08  发布在  Kafka
关注(0)|答案(1)|浏览(419)

好吧,看来我用我的biginsights形象击中了我的第一个问题,不是一个大问题,而是一些需要思考的问题。在我的ambari浏览器服务页面上,它显示kafka服务没有运行,我多次尝试重新启动,但似乎一直失败。所以我想我最好再深入一点。在本例中,问题出在运行服务最多的ambari主服务器上。因此,第一个行动要求是看看Ambari是否没有正确地做出决定:

[root@master ~]# kafka
Usage: /usr/bin/kafka {start|stop|status|clean}
[root@master ~]# kafka status
Kafka is not running.
[root@master ~]# kafka start
Starting Kafka succeeded with PID=15815.
[root@master ~]# kafka status
Kafka is not running.

接下来,我开始了一个干净的开始,并不是说我认为它会有很大的不同,但可能是日志不允许它重新启动的问题:

[root@master ~]# kafka clean
Removed the Kafka PID file: /var/run/kafka/kafka.pid.
Removed the Kafka OUT file: /var/log/kafka/kafka.out.
Removed the Kafka ERR file: /var/log/kafka/kafka.err.
[root@master ~]# kafka status
Kafka is not running. No pid file found.
[root@master ~]# kafka start
Starting Kafka succeeded with PID=15875.
[root@master-01 ~]# kafka status
Kafka is not running.
tquggr8v

tquggr8v1#

让我们仔细看看日志:

[root@master ~]# ls -ltr /var/log/kafka/
-<cut>-
-rw-r--r-- 1 kafka hadoop  6588 Aug 11 13:55 controller.log.2015-08-11-13
-rw-r--r-- 1 kafka hadoop  6000 Aug 11 13:59 server.log.2015-08-11-13
-rw-r--r-- 1 kafka hadoop  6588 Aug 11 14:55 controller.log
-rw-r--r-- 1 kafka hadoop  5700 Aug 11 14:56 server.log
-rw-r--r-- 1 root  root     284 Aug 11 15:09 kafka.err
-rw-r--r-- 1 root  root     522 Aug 11 15:09 kafka.out
-rw-r--r-- 1 kafka hadoop   707 Aug 11 15:09 kafkaServer-gc.log

让我们看看错误和输出文件:

[root@master ~]# cat /var/log/kafka/kafka.err
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c5330000, 986513408, 0) failed; error='Cannot allocate memory' (errno=12)
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c5330000, 986513408, 0) failed; error='Cannot allocate memory' (errno=12)
[root@master ~]# cat /var/log/kafka/kafka.out

# 

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (mmap) failed to map 986513408 bytes for committing reserved memory.

# An error report file with more information is saved as:

# /root/hs_err_pid15875.log

# 

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (mmap) failed to map 986513408 bytes for committing reserved memory.

# An error report file with more information is saved as:

# /root/hs_err_pid16305.log

啊,这很奇怪,因为我要求我的虚拟机至少有4gb的内存,让我们检查一下:

[root@master ~]# cat /proc/meminfo
MemTotal:        1922260 kB
MemFree:          278404 kB
Buffers:            8600 kB
Cached:            43384 kB

最好多分配一些内存!通常,按照ibm支持页面的建议,安装biginsights的最小值应该是8gb,因此您可以更深入地了解其原因。至少2gb的内存仅用于在系统上运行已安装的服务,甚至在您开始加载数据库和运行查询之前。

相关问题