0

好吧,我的 BigInsights Image 似乎遇到了我的第一个问题,这不是一个大问题,而是需要考虑的问题。在我的 Ambari 浏览器服务页面上,它显示 Kafka 服务没有运行,我尝试了多次重启,但这似乎一直失败。所以我认为我最好进一步研究一下。在这种情况下,问题出在运行最多服务的 Ambari Master 服务器上。因此,第一个行动呼吁是看看 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.
4

1 回答 1

1

因此,让我们正确查看日志:

[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 仅用于在系统上运行已安装的服务,甚至在您开始加载数据库和运行查询之前。

于 2015-08-11T14:43:54.800 回答