MySQL学习笔记(三)— MySQL异常解决办法

MySQL常用配置

By timebusker on June 25, 2018

MySQL学习笔记(二)—MySQL常用配置

(内存信息超过限制额)Container is running beyond memory limits

# 异常信息:
Application application_1545595549057_0003 failed 2 times due to AM Container for appattempt_1545595549057_0003_000002 exited with exitCode: -103
Failing this attempt.Diagnostics: Container [pid=22012,containerID=container_1545595549057_0003_02_000001] is running beyond virtual memory limits.
 Current usage: 102.4 MB of 1 GB physical memory used; 2.8 GB of 2.1 GB virtual memory used. Killing container.

The NodeManager is killing your container. It sounds like you are trying to use hadoop streaming which is running as a child process of the map-reduce task. 
The NodeManager monitors the entire process tree of the task and if it eats up more memory than the maximum set in mapreduce.map.memory.mb or mapreduce.reduce.memory.mb respectively,
we would expect the Nodemanager to kill the task, otherwise your task is stealing memory belonging to other containers, which you don't want.

# 原因:内存信息超过限制额
# 解决办法:一下配置项全是1024有最小与最大的冲突
yarn.scheduler.minimum-allocation-mb
yarn.scheduler.maximum-allocation-mb
yarn.nodemanager.resource.memory-mb
yarn.nodemanager.vmem-pmem-ratio
yarn.scheduler.increment-allocation-mb
mapreduce.map.memory.mb
mapreduce.reduce.memory.mb
mapreduce.map.java.opts
mapreduce.reduce.java.opts

mapreduce任务10020端口错误

# 异常信息:
0.0.0.0:10020
java.net.ConnectException: Connection refused; For more details see: 

# 原因:未启动jobhistory服务
# 解决办法:
# 在检查配置文件mapred-site.xml关于jobhistory配置项,要指定到特定服务器上存储
<property>
    <name>mapreduce.jobhistory.address</name>
    <value>主机名:10020</value>
</property>
<property>
    <name>mapreduce.jobhistory.webapp.address</name>
    <value>主机名:19888</value>
</property>
# 启动服务
$HADOOP_HOME/sbin/mr-jobhistory-daemon.sh start historyserver