Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Service 'hdfs' check failed

avatar
Explorer

Hello. I have a fresh install of hdp running on windows docker. After I log into Ambari and select Files View, I get the following error:

Issues detected

Service 'hdfs' check failed: java.net.UnknownHostException: sandbox-hdp.hortonworks.com

I'm not quite sure how to resolve the issue.

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Francis Sutton

Have you added the "/etc/hosts" file mapping correctly to resolve the mentioned hostname as described in the following link:

https://hortonworks.com/tutorial/learning-the-ropes-of-the-hortonworks-sandbox/

Mac users:

  • echo '{IP-Address} sandbox.hortonworks.com sandbox-hdp.hortonworks.com sandbox-hdf.hortonworks.com'| sudo tee -a /private/etc/hosts

Linux users:

  • echo '{IP-Address} sandbox.hortonworks.com sandbox-hdp.hortonworks.com sandbox-hdf.hortonworks.com'| sudo tee -a /etc/hosts

.

View solution in original post

6 REPLIES 6

avatar
Master Mentor

@Francis Sutton

Have you added the "/etc/hosts" file mapping correctly to resolve the mentioned hostname as described in the following link:

https://hortonworks.com/tutorial/learning-the-ropes-of-the-hortonworks-sandbox/

Mac users:

  • echo '{IP-Address} sandbox.hortonworks.com sandbox-hdp.hortonworks.com sandbox-hdf.hortonworks.com'| sudo tee -a /private/etc/hosts

Linux users:

  • echo '{IP-Address} sandbox.hortonworks.com sandbox-hdp.hortonworks.com sandbox-hdf.hortonworks.com'| sudo tee -a /etc/hosts

.

avatar
Explorer

So that seemed to get me a little further. I'm not seeing the following error:

 sandbox-hdp.hortonworks.com:50070: Connection refused (Connection refused)

avatar
Master Mentor

@Francis Sutton

Your recent error indicates that either the Port 50070 is not listening or the Address is incorrect.

 sandbox-hdp.hortonworks.com:50070: Connection refused (Connection refused)

.

So please chck if your NameNode process is running fine or not? You can take a look at the NameNode logs and share if you see any error there. Or better try restarting the HDFS services from ambari UI to confirm that the HDFS services are up and running fine.

We can verify if the NameNode port 50070 is opened or not?

# netstat -tnlpa | grep 50070

.

avatar
Explorer

@Jay Kumar SenSharma I'm not sure how to look at the logs, but I did run the netstat -tnlpa | grep 50070 and it appears that it's not running. How do I start it?

avatar
Master Mentor

@Francis Sutton

If the netstat result shows that 50070 is not listening then it indicates that NameNode has not come up successfully.

So please check the namenode log at the following location:

# ls -l /var/log/hadoop/hdfs/hadoop-hdfs-namenode*.log

.

Also pelase try restarting the NameNode from ambari UI and put the NameNode log in tail mode to see if there is any error appearing? Please share the whole NameNode log in case it does not open the port 50070.

avatar
Explorer

This is the error. By the way, how to I restart the NameNode via Ambari?

2017-11-23 15:06:45,385 INFO http.HttpServer2 (NameNodeHttpServer.java:initWebHdfs(93)) - Added filter 'or g.apache.hadoop.hdfs.web.AuthFilter' (class=org.apache.hadoop.hdfs.web.AuthFilter) 2017-11-23 15:06:45,388 INFO http.HttpServer2 (HttpServer2.java:addJerseyResourcePackage(690)) - addJersey ResourcePackage: packageName=org.apache.hadoop.hdfs.server.namenode.web.resources;org.apache.hadoop.hdfs.we b.resources, pathSpec=/webhdfs/v1/* 2017-11-23 15:06:45,454 INFO http.HttpServer2 (HttpServer2.java:start(940)) - HttpServer.start() threw a n on Bind IOException java.net.SocketException: Unresolved address at sun.nio.ch.Net.translateToSocketException(Net.java:131) at sun.nio.ch.Net.translateException(Net.java:157) at sun.nio.ch.Net.translateException(Net.java:163) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:76) at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216) at org.apache.hadoop.http.HttpServer2.bindListener(HttpServer2.java:988) at org.apache.hadoop.http.HttpServer2.bindForSinglePort(HttpServer2.java:1019) at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:1080) at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:937) at org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:170) at org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:933) at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:746) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:992) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:976) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1701) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1769) Caused by: java.nio.channels.UnresolvedAddressException at sun.nio.ch.Net.checkAddress(Net.java:101) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:218) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ... 12 more 2017-11-23 15:06:45,464 INFO impl.MetricsSystemImpl (MetricsSystemImpl.java:stop(211)) - Stopping NameNode metrics system... 2017-11-23 15:06:45,464 INFO impl.MetricsSystemImpl (MetricsSystemImpl.java:stop(217)) - NameNode metrics system stopped. 2017-11-23 15:06:45,464 INFO impl.MetricsSystemImpl (MetricsSystemImpl.java:shutdown(606)) - NameNode metr ics system shutdown complete. 2017-11-23 15:06:45,465 ERROR namenode.NameNode (NameNode.java:main(1774)) - Failed to start namenode. java.net.SocketException: Unresolved address at sun.nio.ch.Net.translateToSocketException(Net.java:131) at sun.nio.ch.Net.translateException(Net.java:157) at sun.nio.ch.Net.translateException(Net.java:163) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:76) at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216) at org.apache.hadoop.http.HttpServer2.bindListener(HttpServer2.java:988) at org.apache.hadoop.http.HttpServer2.bindForSinglePort(HttpServer2.java:1019) at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:1080) at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:937) at org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:170) at org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:933) at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:746) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:992) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:976) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1701) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1769) Caused by: java.nio.channels.UnresolvedAddressException at sun.nio.ch.Net.checkAddress(Net.java:101) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:218) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ... 12 more 2017-11-23 15:06:45,466 INFO util.ExitUtil (ExitUtil.java:terminate(124)) - Exiting with status 1 2017-11-23 15:06:45,498 INFO namenode.NameNode (LogAdapter.java:info(47)) - SHUTDOWN_MSG: /************************************************************ SHUTDOWN_MSG: Shutting down NameNode at sandbox.hortonworks.com/172.17.0.2 ************************************************************/