Hadoop 2.2HA配置问题说明
1、启动服务顺序 ##在每个节点上把zookeeper服务启动zkServer.sh start##在某一namenode节点上执行如下命令,创建命名空间hdfs zkfc -formatZK##在每个节点用如下命令启日志程序hadoop-daemon.sh start journalnode##在主namenode节点格式化namenode和journa
1、启动服务顺序
##在每个节点上把zookeeper服务启动 zkServer.sh start ##在某一namenode节点上执行如下命令,创建命名空间 hdfs zkfc -formatZK ##在每个节点用如下命令启日志程序 hadoop-daemon.sh start journalnode ##在主namenode节点格式化namenode和journalnode目录 hadoop namenode -format mycluster ##在主namenode节点启动namenode进程 hadoop-daemon.sh start namenode ##如下命令是把备namenode节点的目录格式化并把元数据从主namenode节点拷贝过来 hdfs namenode -bootstrapStandby ##启动备节点的namenode hadoop-daemon.sh start namenode ##在两个namenode节点都启动zkfc服务 hadoop-daemon.sh start zkfc ##在所有的datanode节点上启动datanode hadoop-daemon.sh start datanode
2、当把两个Namenode都处于standby时需要将一个namenode激活
hdfs haadmin -transitionToActive namenode1
3、yarn的UI端口默认为8088
4、当用stop-all.sh不能关掉Hadoop相关进程时,可以到系统根目录(/tmp)找对应的pid文件,然后打开如下文件,看里面的内容与在命令行运行的jps出来的内容是否一致,如果不一直把对应的pid文件里的进程号改成正在运行的进程号,然后再stop-all.sh就可以正常关闭了。
18726 HMaster 29320 JournalNode 18927 QuorumPeerMain 21288 DataNode 21051 NameNode 22221 ResourceManager 23618 Jps 22368 NodeManager 29651 DFSZKFailoverController 23961 GStartKeeper 24283 Bootstrap
hadoop-root-datanode.pid hadoop-root-journalnode.pid hadoop-root-namenode.pid ...
[root@S1SF001 tmp]# cat hadoop-root-namenode.pid 21051
错误汇总
1、java.io.IOException: Cannot start an HA namenode with name dirs that need recovery. Dir: Storage Directory /app/hadoop/hdfs/name state: NOT_FORMATTED
当在standby节点启动namenode时报以上错误,解决办法:
(1)执行:hadoop namenode -bootstrapStandby
(2)再次启动standby节点上的Namenode:hadoop-daemon.sh start namenode

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Title: The working principle and configuration method of GDM in Linux systems In Linux operating systems, GDM (GNOMEDisplayManager) is a common display manager used to control graphical user interface (GUI) login and user session management. This article will introduce the working principle and configuration method of GDM, as well as provide specific code examples. 1. Working principle of GDM GDM is the display manager in the GNOME desktop environment. It is responsible for starting the X server and providing the login interface. The user enters

WPS is a very widely used office software, including documents, forms and PPT, and supports multi-terminal synchronization. If the prompt "The source application for this object cannot be launched" appears when editing wps, how to solve it? This problem may occur because you are trying to open a link or file, but its source application no longer exists or has been deleted. Here are some fixes: 1. Reinstall WPS software: Try reinstalling WPSOffice to fix the problem and make sure you are using the latest version. 2. Manually change the default program: Try to change the default program to WPS. You can right-click the file you want to open, select "Open with", and then

When wallpaperengine starts, there are 4 different options. Many users don't know which one to choose when starting wallpaperengine. Generally, when wallpaperengine starts, choose the first one: start 32-bit. Which one to choose when starting wallpaperengine? Answer: Start 32-bit. 1. Generally, when wallpaperengine starts, select the first one: start 32-bit. 2. When wallpaperengine starts, there are 4 different options: start 32-bit; start 64-bit. 3. Start 32-bit: This is a generally recommended option and suitable for most users. 4. Start 64-bit: If the system supports 64-bit, you can choose this option

Understanding Linux Bashrc: Function, Configuration and Usage In Linux systems, Bashrc (BourneAgainShellruncommands) is a very important configuration file, which contains various commands and settings that are automatically run when the system starts. The Bashrc file is usually located in the user's home directory and is a hidden file. Its function is to customize the Bashshell environment for the user. 1. Bashrc function setting environment

What is the correct way to restart a service in Linux? When using a Linux system, we often encounter situations where we need to restart a certain service, but sometimes we may encounter some problems when restarting the service, such as the service not actually stopping or starting. Therefore, it is very important to master the correct way to restart services. In Linux, you can usually use the systemctl command to manage system services. The systemctl command is part of the systemd system manager

Title: How to configure and install FTPS in Linux system, specific code examples are required. In Linux system, FTPS is a secure file transfer protocol. Compared with FTP, FTPS encrypts the transmitted data through TLS/SSL protocol, which improves Security of data transmission. In this article, we will introduce how to configure and install FTPS in a Linux system and provide specific code examples. Step 1: Install vsftpd Open the terminal and enter the following command to install vsftpd: sudo

Title: Methods and specific code examples to solve the problem that the PHP service cannot start normally under Ubuntu. When using Ubuntu to build a website or application, you often encounter the problem that the PHP service cannot start normally, which will cause the website to be unable to be accessed normally or the application to be unable to function normally. run. This article will introduce how to solve the problem that the PHP service cannot start normally under Ubuntu, and provide specific code examples to help readers quickly solve such failures. 1. Check the PHP configuration file First, we need to check the PHP configuration file

When we use win11 system, we sometimes need to check the configuration of our computer, but many users are also asking where to check the configuration of win11 computer? In fact, the method is very simple. Users can directly open the system information under settings, and then view the computer configuration information. Let this site carefully introduce to users how to find win11 computer configuration information. How to find win11 computer configuration information. Method 1: 1. Click Start and open Computer Settings. 3. You can view computer configuration information on this page. 2. In the command prompt window, enter systeminfo and press Enter to view the computer configuration.
