纵有疾风起
人生不言弃

Hadoop 错误归档库

在hive中操作任意mapreduce相关语句

The size of Container logs revealed the below error:

2015-04-24 11:41:41,858 WARN [main] org.apache.hadoop.mapred.MapTask: Unable to initialize MapOutputCollector org.apache.hadoop.mapred.MapTask$MapOutputBufferjava.io.IOException: Invalid "mapreduce.task.io.sort.mb": 2048at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:975)at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:401)

Solution:

Set the value of mapreduce.task.io.sort.mb < 2048MB 

Reason
“无法初始化任何输出收集器”表示工作未能启动容器,可以有多个相同的原因。然而,一个必须检查容器日志在hdfs识别导致错误。在这个特定的实例,mapreduce.task.io.sort.mb内存值输入大于2047 mb,但是它允许的最大值是2047 mb,因此任何高于其导致工作失败标记为无效。

解决方案: 
设置mapreduce.task.io.sort.mb < 2048 mb 
mapred-site.xml

        <property>                <name>mapreduce.task.io.sort.mb</name>                <value>1024</value>        </property>

Linux内核事故,一直输出syslog日志

Message from syslogd@ at Thu Mar 17 22:58:28 2011 …
localhost last message repeated 2 times

Message from syslogd@ at Thu Mar 17 22:58:28 2011 …
localhost kernel: EDAC MC0: UE page 0x0, offset 0x0, grain 1073741824, row 2, labels “:”: i3200 UE

无论是ssh上,还是本机的终端窗口统统都报警,而没有办法打字。

Solution:

[root@localhost ~]#  /etc/init.d/syslog stop    //先停止syslog:
[root@localhost init.d]# lsmod | grep edac
i3200_edac              9545  0 
edac_mc                26513  1 i3200_edac
[root@localhost init.d]# rmmod i3200_edac
[root@localhost init.d]# rmmod edac_mc
[root@localhost ~]#  /etc/init.d/syslog stop    //再开启syslog:
卸载 i3200_edac  edac_mc 两个模块

yum进程被占用

在install.sh过程中
Another app is currently holding the yum lock; waiting for it to exit…
The other application is: yum
Memory : 55 M RSS (352 MB VSZ)
Started: Thu Apr 9 18:45:48 2015 – 06:13 ago
State : Sleeping, pid: 31018

Solution: 
检查每个节点,运行:yum list & yum clean all
若出现问题,则表示yum进程被占用
rm -rf /var/run/yum.pid 或者直接pkill yum  

 

postgresql-libs.rpm from updates: [Errno 256] No more mirrors to try.

在安装ambari的过程中,出现以下错误
error :
### Step 4:Begin configure Web-server …………
————————————————-
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package ambari-server.noarch 0:1.4.4.23-1 will be installed
–> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.4.4.23-1.noarch
–> Running transaction check
—> Package postgresql-server.x86_64 0:8.4.20-2.el6_6 will be installed
–> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-2.el6_6 for package: postgresql-server-8.4.20-2.el6_6.x86_64
–> Processing Dependency: postgresql(x86-64) = 8.4.20-2.el6_6 for package: postgresql-server-8.4.20-2.el6_6.x86_64
–> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-2.el6_6.x86_64
–> Running transaction check
—> Package postgresql.x86_64 0:8.4.20-2.el6_6 will be installed
—> Package postgresql-libs.x86_64 0:8.4.20-2.el6_6 will be installed

Error Downloading Packages:
postgresql-8.4.20-2.el6_6.x86_64: failure: Packages/postgresql-8.4.20-2.el6_6.x86_64.rpm from updates: [Errno 256] No more mirrors to try.
postgresql-server-8.4.20-2.el6_6.x86_64: failure: Packages/postgresql-server-8.4.20-2.el6_6.x86_64.rpm from updates: [Errno 256] No more mirrors to try.
postgresql-libs-8.4.20-2.el6_6.x86_64: failure: Packages/postgresql-libs-8.4.20-2.el6_6.x86_64.rpm from updates: [Errno 256] No more mirrors to try.

cp: cannot create regular file `/var/lib/ambari-server/resources/’: No such file or directory
cp: cannot create regular file `/var/lib/ambari-server/resources/’: No such file or directory
./install.sh.x: line 232: ambari-server: command not found

Reason:
没有安装jdk的缘故,虽然之后再ambari配置的过程中,会重新再安装jdk,所以安装什么版本都没关系

Solution:
检查jdk:java -version查看已经在使用的jdk版本,如果没有,yum安装方式: yum install java ,如果不行则离线安装jdk。 系统自带jdk默认目录在/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64,验证方法为在/usr/lib/jvm/下运行 ls -l /usr/lib/jvm/

 

hive 元数据库安装出错

hive mysql的设置
update user set password =password(‘hive’) where user =’hive’;
select host,user from user;
insert into user(host,user,password)values(‘%’,’hive’,’hive’);
grant all privileges on *.* to hive’%’ identified by ‘hive’;
flush privileges

在用ambari安装HDP的过程中,装hive的节点不能事先安装mysql,有些配置可能不是默认的,导致元数据库配置不成功 。当然。源码安装恰好相反

 

当ambari意外宕机时,再重启出现以下错误
error:
cannot open Packages database in /var/lib/rpm E: could not open RPM database
solution:
rm -rf /var/lib/rpm/__db*

当ambari配置hdp时安装不成功,在命令行下运行:
ambari-server reset ambari-server restart
重启机器重新在浏览器配置HDP, 并注意保证时间同步

 

error:

Another MySQL daemon already running with the same unix socket.

solution:
yum remove mysql mysql-server mysql-libs mysql-devel
service mysql stop
mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

 

HbaseRegionServer自动停止:

Solution:
hbase regionserver process connection refused 把该机器127.0.0.1去掉

或者

时间同步问题!

 

Spark 磁盘占满

问题1

由于Spark在计算的时候会将中间结果存储到/tmp目录,而目前linux又都支持tmpfs,其实说白了就是将/tmp目录挂载到内存当中。

那么这里就存在一个问题,中间结果过多导致/tmp目录写满而出现如下错误

No Space Left on the device

解决办法就是针对tmp目录不启用tmpfs,修改/etc/fstab

  • spark.local.dir:Spark 运行时的临时目录,例如 map 的输出文件,保存在磁盘的 RDD 等都保存在这里。默认是 /tmp 这个目录,而一开始我们搭建的小集群上 /tmp 这个目录的空间只有2G,大数据量跑起来就出 Exception (”No space left on device”)了。

如果是archlinux,仅修改/etc/fstab是不够的,还需要执行如下指令:

systemctl mask tmp.mount

 

默认安装的CentOS,已经开启了tmpfs。tmpfs会使用内存,如果内存用完,会用swap空间。调整tmpfs大小,别超过内存+swap的大小。如果系统资源紧张,用完了内存,用到swap时,tmpfs的效率就大幅度降低了。所以不妨多安装些内存,反正内存价格也没多贵。tmpfs是内存文件系统,类似于DOS年代的ramdisk,mount上去就能用了,不需要用mkfs之类的命令来初始化。

# cat /etc/fstab

LABEL=/                 /                        ext3    defaults        1 1
LABEL=/home         /home                ext3    defaults        1 2
LABEL=/boot1        /boot                  ext3    defaults        1 2
tmpfs                    /dev/shm             tmpfs   defaults        0 0
devpts                   /dev/pts              devpts  gid=5,mode=620  0 0
sysfs                      /sys                    sysfs   defaults        0 0
proc                      /proc                  proc    defaults        0 0
LABEL=SWAP-sda3  swap                  swap    defaults        0 0

 

其中tmpfs那一行,就是开启tmpfs。在tmpfs里存放的文件,读写非常快,毕竟直接读取内存,当然比读取磁盘快多了。tmpfs里的文件,重启后就没了。适合存放session,或其他临时性的文件。可以大幅度提供读写速度。

 

文章转载于:https://www.cnblogs.com/kxdblog/p/4565132.html

原著是一个有趣的人,若有侵权,请通知删除

未经允许不得转载:起风网 » Hadoop 错误归档库
分享到: 生成海报

评论 抢沙发

评论前必须登录!

立即登录