チュートリアルhttp://pingax.com/install-apache-hadoop-ubuntu-cluster-setupに基づいてクラスタ(1マスター& 2スレーブ(スレーブ1、スレーブ2))をセットアップしました。私が最初に走ったときには、両方ともHDFS
& YARN
のサービスが問題なく実行されました。しかし、私がもう一度それらを走らせるのを止めた時、マスターからYARN
サービス(start-yarn.sh
)を実行している間、私は以下を得ました。Hadoop - YARNサービスの開始時にJava Runtime Environmentのメモリが不足しています
# 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からの提案に基づいて、私はすべての3つのファイル~/.bashrc
、hadoop-env.sh
と 2048、512、256にheap memory
サイズ制限を変化させたが、何も働きました。
注:私は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)
これは、プログラムが実行する必要がある残りのメモリではなく、ヒープのための十分な領域がある場合に発生します。ログファイルのメモリ使用量のダンプを調べます。 –
各ノードにはどのくらいの物理メモリがありますか? –
各サーバー上に2GIGのメモリがあります。それは問題を解決する必要があります私はメモリを増やす場合ですか? – DhiwaTdG