hadoop集群报错日志整理和总结

CentOS7.0做集群,发现了许多问题,主要总结如下:

    1.配置文件的配置参数有错误。

    2.操作系统的环境没有设置好。

    3.文件的权限没有分配好。

常见的错误如下:

1.环境问题

centos7关闭防火墙

   当时一直认为关闭防火墙的命令是:systemctl  iptables stop

  直接命令:service firewalld stop

  CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙

  firewall
      systemctl start firewalld.service#启动firewall
      systemctl stop firewalld.service#停止firewall
      systemctl disable firewalld.service#禁止firewall开机启动

 可以替换为iptables

firewall
systemctl start iptables.service

总结:

     CentOS7firewall命令“替代”了iptables。在这里我们需要区分“iptables服务”和“iptables命令”。虽然firewalld是替代提供的防火墙管理iptables服务,但是它仍然使用iptables对内核命令动态通信包过滤。所以它只是iptables服务代替,而不是iptables命令。

1. Disable Firewalld Service.

[root@rhel-centos7-linux ~]# systemctl mask firewalld

2. Stop Firewalld Service.

[root@rhel-centos7-linux ~]# systemctl stop firewalld

3. Install iptables service related packages.

[root@rhel-centos7-linux ~]# yum -y install iptables-services

4. Make sure service starts at boot:

[root@rhel-centos7-linux ~]# systemctl enable iptables

# If you do not want ip6tables, You can skip following command.

[root@rhel-centos7-linux ~]# systemctl enable ip6tables

5. Now, Finally Let’s start the iptables services.

[root@rhel-centos7-linux ~]# systemctl start iptables

# If you do not want ip6tables, You can skip following command.

[root@rhel-centos7-linux ~]# systemctl start ip6tables

Firewalld Service is now disabled and stop, You can use iptables.

检查防火墙状态

firewall-cmd --stat

临时开放ftp服务

firewall-cmd --add-service=ftp

永久开放ftp服务

firewall-cmd --add-service=ftp --permanent

关闭ftp服务

firewall-cmd --remove-service=ftp --permanent

配置防火墙在public区域永久开放http服务

firewall-cmd --permanent --zone=public --add-service=http

加入指定开放端口

firewall-cmd --add-port=1324/tcp

为了让之前的设定生效当然要重启服务咯

systemctl restart firewalld

或者使用下面的命令免去重启服务(防火墙策略配置后重新载入)

firewall-cmd --complete-reload

firewall-cmd --reload   (这两句功能相同)

检查ftp服务的21端口是否开放

iptables -L -n | grep 21

ACCEPT     tcp  --  0.0.0.0/0

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值