How to fix “Could not locate executable winutils.exe” issue in Hadoop? - Big Data In Real World

How to fix “Could not locate executable winutils.exe” issue in Hadoop?

How to alter the type of the column in a Hive table?
April 21, 2021
What is consumer offset and the purpose of consumer offset in Kafka?
April 26, 2021
How to alter the type of the column in a Hive table?
April 21, 2021
What is consumer offset and the purpose of consumer offset in Kafka?
April 26, 2021

It is pretty common in certain Hadoop distributions to get the below error when you attempt to start resource manager service or other services.

ERROR [main] util.Shell (Shell.java:getWinUtilsPath(303)) - Failed to locate the
winutils binary in the hadoop binary path java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries. at 
org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:278) at
org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:300) at
org.apache.hadoop.util.Shell.<clinit>(Shell.java:293) at
org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:76) at
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:863)

Error when starting a service

Follow this ff you get the error when you are starting a service. Download the zip file and unzip it. You will find the winuntil.exe file inside the zip.

Copy the winutil.exe to bin directory under Hadoop Home.

Error when running an Spark or MapReduce application locally

Follow the steps below if you get the error when you are trying to run a Spark or MapReduce application locally (for eg. in IntelliJ or Eclipse)

Download the zip file and unzip it. You will find the winuntil.exe file inside the zip.

In your code set hadoop.home.dir and copy the winutil.exe to the folder. You can also create a folder under your project and check-in the folder and winutil.exe to git so others don’t have to worry about this issue.

System.setProperty("hadoop.home.dir", "c:\\\hadoop\winutil\\\")
Big Data In Real World
Big Data In Real World
We are a group of Big Data engineers who are passionate about Big Data and related Big Data technologies. We have designed, developed, deployed and maintained Big Data applications ranging from batch to real time streaming big data platforms. We have seen a wide range of real world big data problems, implemented some innovative and complex (or simple, depending on how you look at it) solutions.

Comments are closed.

How to fix “Could not locate executable winutils.exe” issue in Hadoop?
This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.

Hadoop In Real World is now Big Data In Real World!

X