0
votes

I am running my hadoop on Ubuntu using VMware. The version of hadoop is 2.x and I am facing a problem when I restart my pc. Every time I restart my pc I have to format namenode, otherwise it gives error as below.

Error: Call From ubuntu/127.0.1.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused.

hdfs-site.xml

<configuration>
        <property>
                <name>dfs.replication</name>
                <value>1</value>
        </property>
        <property>
                <name>hadoop.tmp.dir</name>
                <value>/tmp/hadoopTemp</value>
        </property>
</configuration>

core-site.xml

<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://localhost:9000</value>
    </property>
</configuration>

Please let me know if there is any suggestion.

Thanks, Sai

1

1 Answers

1
votes

You have to start name node after reboot of your machine. You can do that by adding namenode start command to machine startup commands. Refer to this article for more details https://unix.stackexchange.com/questions/35303/run-a-sh-file-on-machine-boot-up.