Problems encountered in hadoop-2.7.3 construction and their solutions

Source: Internet
Author: User
Problem One:Ubuntu16.04 's installation source has not been openjdk7 by default, so you have to manually add the warehouse, as follows:

Solution:

sudo add-apt-repositoryppa:openjdk-r/ppa 
sudo apt-get update  
sudo apt-get install OPENJDK-7-JDK


Issue two: after the server has added the public key, the SSH server then reported the error


Sign_and_send_pubkey:signing Failed:agent refused operation



Then execute the following command just fine:


Solution:

Eval "$ (ssh-agent-s)"
Ssh-add


Issue three: Hadoop reformatting Namenode

Because the Hadoop cluster was previously started normally. So in the corresponding data directory of Hadoop, there are already a lot of related folders. We have to delete the relevant folder before we can format it.

Solution:

First, the master master node to operate

1. Delete data, name, namesecondary three folders.

2. Delete the four folders in the Mrlocal directory

3. Delete all files in the Logs folder

Second, the slaves from the node to operate

Delete the corresponding data folder.


Issue four: Error Usr/bin/sudo must belong to user ID 0 user and set setuid bit

Because of the operation permissions issue, given the Hadoop (Ubuntu user) 777 permissions, the result log file growth quickly, unknown so.

And the sudo command is not working properly.

On the internet to find a lot from the start of the machine when the operation, but I use a virtual machine, and is not easy to operate directly, because it is a unit of the server, so found the following ways to solve:


Solution:

Su enters the root command line;

Perform

Chown root:root  /usr/bin/sudo
chmod 4755  /usr/bin/sudo


issue five: After the Hadoop user is created, the Hadoop folder is authorized and cannot be granted root privileges.

 

Cd/usr/local
sudo chown–rhadoop:hadoop hadoop ()


Perform

Chown root:root  /usr/bin/sudo
chmod 4755  /usr/bin/sudo



issue SIX: Developing a package for Hadoop to import in Eclipse

Create a new Map/reduce project without importing a Hadoop jar package.

The Hadoop corresponding jar package that new Java project needs to add is:

/hadoop-2.3.0/share/hadoop/common all jar packages, and all jar packages inside the Lib directory

/hadoop-2.3.0/share/hadoop/hdfs all jar packages, not including the jar inside Lib

/hadoop-2.3.0/share/hadoop/mapreduce all jar packages, not including the jar inside Lib

/hadoop-2.3.0/share/hadoop/yarn all jar packages, not including the jar inside Lib

Since there is more than one directory to add the jar package, for convenience, you can create your own user library and add the appropriate jar package.


issue seven: developing Jena in Eclipse to import packages Jena all jar files in the IB directory



issue eight: Developing hbase in Eclipse requires imported packages

All. jar packages under the%hbase%/bin directory.

It should be noted here that the user library cannot be created through eclipse and then imported into the project because of the root directory.

Instead, you need to copy all the jar packages to the project root directory, and then build path--configuare build path--Add external jars to import all the jar packages.


Otherwise, running the HBase program will cause an error.



Issue nine: Hadoop runs WordCount program, program does not error, but no output file

In Eclipse, the DFS locations file operation, error, permission denied.
Because there is no write permission to HDFs, there is no output file.


Solution:
You need to add configuration information in the Hdfs-site.xml in the Hadoop configuration file:

<property>
    <name>dfs.permissions</name>
    <value>false</value>
</ Property>

The goal is to cancel the permission check.


Restart Hadoop, you can run the program normally, the output of the results file.

Issue 10: The Hadoop program will be reported with a warning: slf4j:failed to load Class "Org.slf4j.impl.StaticLoggerBinder although warned that the program is not a problem, Does not affect the program's operation, but has the energy or the removal, who lets is the obsessive-compulsive disease.
It's actually very simple.
Solution: 1, in the project import package, find SLF4J, determine the version. 2, to SLF4J official website https://www.slf4j.org/, download the corresponding version of the file package. 3. Add the Slf4j-nop-x.x.x.jar in the package to the project's build path, and no more warnings will be reported.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.