之后start-dfs.sh
,我可以导航到http://localhost:9870
。NameNode 似乎运行得很好。
然后我点击“Utilities -> Browse the file system”,我在网络浏览器中得到这个提示:
Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error
挖掘日志文件($HADOOP_HOME/logs/hadoop-xxx-namenode-xxx.log
),我发现:
2018-11-30 16:47:25,097 WARN org.eclipse.jetty.servlet.ServletHandler: Error for /webhdfs/v1/
java.lang.NoClassDefFoundError: javax/activation/DataSource
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.(RuntimeBuiltinLeafInfoImpl.java:457)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.(RuntimeTypeInfoSetImpl.java:65)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:133)
所以缺少一个类。为什么会这样,我该如何解决这个问题?