Я создал кластер (1-master & 2-slaves (slave1, slave2)) на основе учебника http://pingax.com/install-apache-hadoop-ubuntu-cluster-setup. Когда я побежал в первый раз, оба сервиса HDFS
& YARN
запущены без проблем. Но когда я остановился, побежал за ними снова, я получил следующее: YARN
сервис (start-yarn.sh
) от мастера.Hadoop - Недостаточно памяти для Java Runtime Environment при запуске службы YARN
# starting yarn daemons
# starting resourcemanager, logging to /local/hadoop/logs/yarn-dev-resourcemanager-login200.out
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 168 bytes for AllocateHeap
# An error report file with more information is saved as: /local/hadoop/hs_err_pid21428.log
Compiler replay data is saved as: /local/hadoop/replay_pid21428.log
slave1: starting nodemanager, logging to /local/hadoop/logs/yarn-dev-nodemanager-login198.out
slave2: starting nodemanager, logging to /local/hadoop/logs/yarn-dev-nodemanager-login199.out
slave2: #
slave2: # There is insufficient memory for the Java Runtime Environment to continue.
slave2: # Native memory allocation (malloc) failed to allocate 168 bytes for AllocateHeap
slave2: # An error report file with more information is saved as:
slave2: # /local/hadoop/hs_err_pid27199.log
slave2: #
slave2: # Compiler replay data is saved as:
slave2: # /local/hadoop/replay_pid27199.log
На основе предложений от out of Memory Error in Hadoop и "Java Heap space Out Of Memory Error" while running a mapreduce program, я изменял предел heap memory
размера 256, 512, 1024 & 2048 во всех 3-х файлах ~/.bashrc
, hadoop-env.sh
и mapred-site.sh
, но ничего не получалось.
Примечание: Я не специалист по Linux и JVM.
содержимое файла протокола из одного из узлов:
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32784 bytes for Chunk::new
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:390), pid=16375, tid=0x00007f39a352c700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode linux-amd64 compressed oops)
# Core dump written. Default location: /local/hadoop/core or core.16375 (max size 1 kB). To ensure a full core dump, try "ulimit -c unlimited" before starting Java again
CPU:total 1 (1 cores per cpu, 1 threads per core) family 6 model 45 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, tsc, tscinvbit, tscinv
Memory: 4k page, physical 2051532k(254660k free), swap 1051644k(1051324k free)
Это произойдет, если достаточно места для кучи, но не для остальной памяти, которую должна выполнить программа. Я бы посмотрел на дамп использования памяти в файле журнала. –
Сколько физической памяти у вас есть на каждом узле? –
2Gigs памяти на каждом сервере. Если это так, если я увеличиваю память, если она исправит проблему? – DhiwaTdG