Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

YARN issues Unable to reach port fqdn: 8042

avatar
New Contributor

Dear HWX community ;

I m having this issue

Connection failed to http://fqdn.com:8042 (<urlopen error [Errno 111] Connection refused>)

Connection failed to http://tconglobal.com:8042/ws/v1/node/info (Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py", line 171, in execute
    url_response = urllib2.urlopen(query, timeout=connection_timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 1244, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.7/urllib2.py", line 1214, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 111] Connection refused> 

)

i don t know how to fix it.

Thanks!

6 REPLIES 6

avatar
Explorer
@Radhia BEZZINE

The ErrorCode : 111 [ Connection refused] means that either there is no server or the connection is blocked by firewall.

Here the issue seems to be that the ambari-agent running on the server is unable to connect to the ndoemanager on the machine and perform a health-check.

Points to check:

  • Check if the node-manager is running on the Machine tconglobal.com and in port 8042.

For instance , you can use "netstat -tunlp |grep 8042" command, to know the PID of the java process that is listening on this port and the status.

Then use command "ps -ef|grep <pid>" to know the actual process that is listening on the port, if it is nodemanager.

You can also check if the nodemanager is running with below command and validate the PID accessing the port.

>ps -ef|grep nodemanager

  • Check if the Hostname is correctly resolved from the server where the script is run.

Run telnet command from the machine, where script is executed from and check if hostname is resolved and port is accessible.

>telnet <hostname> <port>

  • Check the nodemanager log for error message or issues logged , if any issue with nodemanager process.

avatar
New Contributor

In my case no service is running on port 8042. I keep getting this error.

avatar
New Contributor

I'm new to the Hortonworks, In the initial setup, I also see the same messages....How to resolve this issue?

avatar
Explorer

I'm getting this error too, is there any solution for this case?

avatar
Explorer

What is the port used by the NodeManager. Check the nodeManager is up and running and also logs for any issues reported.

What is the Ambari version? there are known issues of false alerts being reported prior to Ambari 2.4/2.5 releases.

avatar
Explorer
Connection failed to http://sandbox-hdp.hortonworks.com:8042/ws/v1/node/info (Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py", line 171, in execute
    url_response = urllib2.urlopen(query, timeout=connection_timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 1244, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.7/urllib2.py", line 1214, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 111] Connection refused>
)

Nodemanager has above error
Also there's another error: Percent NodeManager Available

This alert is triggered if the number of down NodeManagers in the cluster is greater than the configured critical threshold. It aggregates the results of NodeManager process checks.

I use Ambari 2.6.2.0.
By the way, I'm using HDP sandbox via docker on my CentOS 7 Server. It's the first startup of the container but already giving those errors

Thank you for your response, hkumar