Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 36535  / 1 Year ago, tue, march 21, 2023, 11:12:57

So telnet actually is working, I mean telnet localhost 25 is connecting; but telnet localhost or telnet localhost 9000 got such result:



Trying 127.0.0.1... 
telnet: Unable to connect to remote host: Connection refused


nmap results:



$ nmap localhost

Starting Nmap 6.00 ( http://nmap.org ) at 2013-10-03 00:54 MSK
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00030s latency).
rDNS record for 127.0.0.1: localhost.localdomain
Not shown: 992 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
587/tcp open submission
631/tcp open ipp
3306/tcp open mysql
5432/tcp open postgresql
6566/tcp open sane-port


nmap on 9000 port:



$ nmap -p 9000 localhost

Starting Nmap 6.00 ( http://nmap.org ) at 2013-10-03 00:55 MSK
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000040s latency).
rDNS record for 127.0.0.1: localhost.localdomain
PORT STATE SERVICE
9000/tcp closed cslistener


So the question is how to open necessary port, Im using Ubuntu 13.04;
tried to disable ufw, tried to play with iptables; nothing helped. Dunno even what to do...



I need 9000 port for hadoop; I cant access fs without opened 9000 port


More From » hadoop

 Answers
4

The reason for connection refused is simple - the port 9000 is NOT being used (not open).



Use the command => lsof -i :9000 to see what app is using the port. If the result is empty (return value 1) then it is not open.



You can even test further with netcat.



List on port 9000 in terminal session 1



nc -l -p 9000


In another session, connect to it



$ lsof -i :9000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nc 12679 terry 3u IPv4 7518676 0t0 TCP *:9000 (LISTEN)
$ nc -vz localhost 9000
Connection to localhost 9000 port [tcp/*] succeeded!


So you need to fix your hadoop settings and make sure all necessary daemons/services are started properly before you can connect to use HDFS.




NOTE: This is NOT telnet nor iptables issue, it's basically TCP/IP basics. Please change the question to sth like "connecting to port 9000 issue".




Update



i need 9000 port for hadoop; I can't access fs without opened 9000 port so base on the context my understanding is that HDFS's namenode is supposed to use port 9000. So check your Hadoop/HDFS configuration files and get the services started.



iptables is irrelevant at this stage because the port is NOT used at all.



You can run iptables -L -vn to make sure there is no rules in effected. You can flush the filter table INPUT chain to make sure sudo iptables -P INPUT ACCEPT && sudo iptables -F -t filter


[#29194] Wednesday, March 22, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ciousuntru

Total Points: 352
Total Questions: 124
Total Answers: 95

Location: Grenada
Member since Tue, Oct 12, 2021
3 Years ago
;