`

Call From s0/192.168.56.140 to s0:8020 failed on connection exception

 
阅读更多

ubuntu@s0:~$ hadoop fs -ls /

ls: Call From s0/192.168.56.140 to s0:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

开始以为s0的端口没有打开,查了一发现防火墙跟本就没有启用。

后来把所有集群上core-site.xml 配置 hdfs://s0/改成了hdfs://s0:8020/。然后统一重启

再在s0上执行了hadoop namenode -format

再执行hadoop fs -ls /,发现还是报同样的错误。

再执行jsp命令,没有发现 Namenode这个进程。

再执行start-all.sh。Namenode运行了。

最后再执行hadoop fs -ls / 终于可以了。

 

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
	<property>
		<name>fs.defaultFS</name>
		<value>hdfs://s0:8020/</value>
	</property>
</configuration>

 另外要通过jps命令查看namenode是否已经启动,如果start-all.sh不能启动,那就单独执行hadoop namenode命令。

我执行的时候报错了:

org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /tmp/hadoop-ubuntu/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.

 

Directory does not exist?但是为什么刚装完时是存在的呢,抱着试试看的态度,再次执行。

hadoop namenode -format

执行之后再启动,namenode启动成功了,说明上面does not exist的目录在format namenode的时候重新建起来了,但是如果每次重启都要format namenode,也太不靠谱了,不止是麻烦,更大的麻烦是里面的数据不能总被无情的delete掉啊,问题必须解决。

Directory /tmp/hadoop-javoft/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.这里的目录既然是在tmp下面的,回忆一下,tmp目录下的文件是临时文件会被定期删除的,貌似bug已经露出水面。那就重启计算机试试是不是因为这,重启之前检查一下tmp目录下面确定几个format namenode之后应该有的目录都有的,重启之后,发现全部被删掉。在执行一次 start-dfs.sh,看到tmp目录下面建了一些目录,但是dfs/name目录仍然不存在,在start-dfs.sh时候建了一部分目录和文件。而dfs/name需要在hadoop namenode -format时建立。问题清楚了。

解决方案就很简单,这些目录的位置都是根据hadoop.tmp.dir的位置确定的,所以只需要在conf/core-site.xml覆盖hadoop.tmp.dir的默认值即可:

...
<property>
   <name>hadoop.tmp.dir</name>
   <value>/home/ubuntu/Documents/hadoop/hadoop-${user.name}</value>
   <description>A base for other temporary directories.</description>
</property>
...

如此问题解决。。。

 

 

 

 

分享到:
评论

相关推荐

    Call From hdp-1/192.168.234.129 to hdp-1:8020 failed on connection exception: java.net.ConnectExcept

    报错:Exception in thread “main” java.net.ConnectException: Call From hdp-1/192.168.234.129 to hdp-1:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more ...

    格式化namenode时报错No Route to Host from node1/192.168.3.101 to hadoop05:8485 failed on socket timeout ex

    格式化namenode时 报错 No Route to Host from node1/192.168.3.101 to hadoop05:8485 failed on socket timeout exception: java.net.NoRouteToHostException: No route to host解决方案 一、报错信息概要: 在配置...

    视频在线学习地址:https://www.bilibili.com/video/BV1Az411q7BE ——————————

    视频在线学习地址:https://www.bilibili.com/video/BV1Az411q7BE ———————————————— ——Python-Linux基础:BV1Az411q7BE

    Cmake 编译opencv430 的extra 和nonfree 库下载的.cache.zip

    FFMPEG: Download failed: 7;"Couldn't connect to server" For details please refer to the download log file: D:/study/opencv_with_contrib_test_sln/CMakeDownloadLog.txt Call Stack (most recent call ...

    google开源C++项目

    // interface can be used to call the methods of the Service without knowing // its exact type at compile time (analogous to Message::Reflection). class LIBPROTOBUF_EXPORT Service { public: inline ...

    Cmake 编译opencv3.4.10 的extra 和nonfree 库下载的.cache.zip

    FFMPEG: Download failed: 7;"Couldn't connect to server" For details please refer to the download log file: D:/study/opencv_with_contrib_test_sln/CMakeDownloadLog.txt Call Stack (most recent call ...

    boost_1_59_0.tar.gz

    Call Stack (most recent call first): cmake/boost.cmake:269 (COULD_NOT_FIND_BOOST) CMakeLists.txt:460 (INCLUDE) -- Configuring incomplete, errors occurred! See also "/opt/mysql-5.7.18/CMakeFiles/...

    LoadRunner手动关联详细介绍

    "URL=http://192.168.0.123:3000/dwr/call/plaincall/jSystemFilterBean.IsShowValidateCode.dwr", "Method=POST", "Resource=0", "RecContentType=text/javascript", "Referer=...

    UE(官方下载)

    Use UltraEdit's powerful user tools to launch your favorite website from the click of a button on your toolbar Integrate Yahoo!, Google, Wikipedia and more with UltraEdit This tutorial will show you ...

    window10下cmake配置opencv时出现ffmpeg缺少文件相关错误,ffmpeg相关dll从这里下载

    2 FFMPEG: Download failed: 7;"Couldn't connect to server" 3 4 For details please refer to the download log file: 5 6 D:/study/opencv_with_contrib_test_sln/CMakeDownloadLog.txt 7 8 Call Stack...

    ippicv__.zip

    warning信息 ```bash CMake Warning at cmake/OpenCVDownload.cmake:202 (message): IPPICV: Download failed: 7;"Couldn't connect to server" ...Call Stack (most recent call first): 3rdparty/ippicv/

    https://acm.timus.ru/print.aspx?space=1&num=1002 题目答案

    In the present world you frequently meet a lot of call numbers and they are going to be longer and longer. You need to remember such a kind of numbers. One method to do it in an easy way is to assign ...

    linux全志R16的linux系统编译的资料_20170502_1655.7z

    Preparing to unpack .../libhtml-parser-perl_3.71-1build1_amd64.deb ... Unpacking libhtml-parser-perl (3.71-1build1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack ......

    hls.min.js

    default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(n(r))for(s=Array.prototype.slice.call(arguments,1),u=r.slice(),a=u.length,l=0;l;l++)u[l].apply(this,s);return!0},r.prototype....

    centos7搭建k8s环境.docx

    CentOS 7 安装 Kubernetes 环境...192.168.57.129 k8smaster 192.168.57.130 k8snode EOF ``` 网桥参数设置 在安装 Kubernetes 之前,需要设置网桥参数,以便后续的安装过程。 ``` cat &gt; /etc/sysctl.d/k8s.conf ...

    protobuf-2.6.1

    $(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos/audio/include) LOCAL_MODULE := MyGame_shared LOCAL_MODULE_FILENAME := libMyGame FILE_LIST := hellocpp/main.cpp FILE_LIST += $(wildcard $...

    Json.net for .net3.5

    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH...

    一步步写嵌入式操作系统.zip

    编译错误2: gcc -g -O2 -o skyeye skyeye.o ./utils/libutils.a ./arch/arm/libarm.a ./device/libdev.a ./arch/mips/libmips.a ./arch/ppc/libppc.a ./arch/bfin/libbfin.a ./arch/mips/libmips.a ./arch/coldfire...

    Android 下载安装APK

    installIntent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory(), "myapk.apk")), "application/vnd.android.package-archive"); installIntent.setFlags(Intent.FLAG_ACTIVITY_...

    linux内核 0.11版本源码 带中文注释

    │ │ system_call.s │ │ vsprintf.c │ │ │ ├─blk_drv │ │ blk.h │ │ floppy.c │ │ hd.c │ │ ll_rw_blk.c │ │ Makefile │ │ ramdisk.c │ │ │ ├─chr_drv │ │ console.c │ │ keyboard.S ...

Global site tag (gtag.js) - Google Analytics