Accessing hadoop from remote machine

mroman

I have hadoop set up (pseudo distributed) on a server VM and I'm trying to use the Java API to access the HDFS.

The fs.default.name on my server is hdfs://0.0.0.0:9000 (as with localhost:9000 it wouldn't accept requests from remote sites).

I can connect to the server on port 9000

$ telnet srv-lab 9000
Trying 1*0.*.30.95...
Connected to srv-lab
Escape character is '^]'.
^C

which indicates to me that connection should work fine. The Java code I'm using is:

try {
        Path pt = new Path(
                "hdfs://srv-lab:9000/test.txt");
        Configuration conf = new Configuration();
        conf.set("fs.default.name", "hdfs://srv-lab:9000");
        FileSystem fs = FileSystem.get(conf);
        BufferedReader br = new BufferedReader(new InputStreamReader(
                fs.open(pt)));
        String line;
        line = br.readLine();
        while (line != null) {
            System.out.println(line);
            line = br.readLine();
        }
    } catch (Exception e) {
        e.printStackTrace();
    }

but what I get is:

java.net.ConnectException: Call From clt-lab/1*0.*.2*2.205 to srv-lab:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

Thus, any hints on why the connection is refused even though connecting through telnet works fine?

Thanga

Your hdfs entry is wrong. fs.default.name has to be set as hdfs://srv-lab:9000. Set this and restart your cluster. that will fix the issue

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Accessing a remote Windows "Git Bash" prompt from a Linux machine?

From Dev

Zurmo CRM: Accessing Wamp server from remote machine through Lan

From Dev

Hadoop/Hive : Loading data from .csv on a remote machine

From Dev

XAMPP via SSH: Accessing localhost on a remote machine

From Dev

accessing a remote registry with local credentials (of the remote machine) on the domain

From Dev

Accessing localhost from virtual machine

From Java

accessing Kubernetes from remote hosts

From Dev

Accessing virtual hosts from remote?

From Dev

Accessing contents from a remote plist

From Dev

Connect to MySQL from remote machine

From Dev

Removing files from remote machine

From Dev

Accessing sqlite databases on remote machine with static adress (Electron / Nodejs / fs)

From Dev

Copy files from remote machine to folder on remote machine

From Dev

Copying sub-folders from remote machine to remote machine directory

From Dev

Hadoop fs getmerge to remote server/machine due to low disk space

From Dev

how to visualise hadoop interface installed in ubuntu server in a remote windows machine

From Dev

Accessing localhost API endpoint from different machine

From Dev

Accessing Virtual Box Machines from Host Machine

From Dev

Accessing VirtualBox localhost from host machine

From Dev

Java: Accessing Windows files from Linux machine

From Dev

Powershell : Accessing shared drive from remote server

From Dev

Accessing remote java file (.jar) from php

From Dev

Powershell : Accessing shared drive from remote server

From Dev

Accessing router with Ubuntu client from remote

From Dev

Loading Data from Remote Machine to Hive Database

From Dev

MySQL server not accessible from remote machine

From Dev

bash - running remote script from local machine

From Dev

Celery - How to send task from remote machine?

From Dev

Get IP of remote windows machine from Hostname

Related Related

  1. 1

    Accessing a remote Windows "Git Bash" prompt from a Linux machine?

  2. 2

    Zurmo CRM: Accessing Wamp server from remote machine through Lan

  3. 3

    Hadoop/Hive : Loading data from .csv on a remote machine

  4. 4

    XAMPP via SSH: Accessing localhost on a remote machine

  5. 5

    accessing a remote registry with local credentials (of the remote machine) on the domain

  6. 6

    Accessing localhost from virtual machine

  7. 7

    accessing Kubernetes from remote hosts

  8. 8

    Accessing virtual hosts from remote?

  9. 9

    Accessing contents from a remote plist

  10. 10

    Connect to MySQL from remote machine

  11. 11

    Removing files from remote machine

  12. 12

    Accessing sqlite databases on remote machine with static adress (Electron / Nodejs / fs)

  13. 13

    Copy files from remote machine to folder on remote machine

  14. 14

    Copying sub-folders from remote machine to remote machine directory

  15. 15

    Hadoop fs getmerge to remote server/machine due to low disk space

  16. 16

    how to visualise hadoop interface installed in ubuntu server in a remote windows machine

  17. 17

    Accessing localhost API endpoint from different machine

  18. 18

    Accessing Virtual Box Machines from Host Machine

  19. 19

    Accessing VirtualBox localhost from host machine

  20. 20

    Java: Accessing Windows files from Linux machine

  21. 21

    Powershell : Accessing shared drive from remote server

  22. 22

    Accessing remote java file (.jar) from php

  23. 23

    Powershell : Accessing shared drive from remote server

  24. 24

    Accessing router with Ubuntu client from remote

  25. 25

    Loading Data from Remote Machine to Hive Database

  26. 26

    MySQL server not accessible from remote machine

  27. 27

    bash - running remote script from local machine

  28. 28

    Celery - How to send task from remote machine?

  29. 29

    Get IP of remote windows machine from Hostname

HotTag

Archive