<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Ambari Agent cannot connect to Ambari Server - Two way SSL authentication in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Agent-cannot-connect-to-Ambari-Server-Two-way-SSL/m-p/185250#M80797</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15452/hlcastro.html" nodeid="15452"&gt;@Hamilton Castro&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The error message indicates that you are running ambari agent on the same ambari server host?   Or is it by mistake?   We see &lt;STRONG&gt;"localhost" &lt;/STRONG&gt;there&lt;/P&gt;&lt;PRE&gt;Error:Request to &lt;A href="https://localhost:8441/agent/v1/register/localhost" target="_blank"&gt;https://localhost:8441/agent/v1/register/localhost&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;So please check few things:&lt;/P&gt;&lt;P&gt;1. The hostname is correct? Ambari relies on FQDN.  Run on ambari server host to findout it's FQDN&lt;/P&gt;&lt;PRE&gt;# hostname -f&lt;/PRE&gt;&lt;P&gt;Also verify is ambari has opened port 8440 and 8441 on all available interface address:&lt;/P&gt;&lt;PRE&gt;# netstat -tnlpa | grep `cat /var/run/ambari-server/ambari-server.pid`
tcp6       0      0 :::8080                 :::*                    LISTEN      13126/java          
tcp6       0      0 :::8440                 :::*                    LISTEN      13126/java          
tcp6       0      0 :::8441                 :::*                    LISTEN      13126/java          &lt;/PRE&gt;&lt;P&gt;2. Also please check the ambari-agent.ini file to findout if it is pointing to the correct ambari server FQDN?&lt;/P&gt;&lt;PRE&gt;# grep -A5 '\[server\]' /etc/ambari-agent/conf/ambari-agent.ini
[server]
hostname = ambariserver.example.com
url_port = 8440
secured_url_port = 8441
connect_retry_delay = 10
max_reconnect_retry_delay = 30&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Also please verify if the &lt;STRONG&gt;"/etc/hosts"&lt;/STRONG&gt; file is correct and it has the first two lines present as the note mentioned in  &lt;A href="https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-installation-ppc/content/edit_the_host_file.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-installation-ppc/content/edit_the_host_file.html&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;Do not remove the following two lines from your hosts file. Removing or editing the following lines may cause various programs that require network functionality to fail.&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jul 2018 06:51:29 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2018-07-17T06:51:29Z</dc:date>
    <item>
      <title>Ambari Agent cannot connect to Ambari Server - Two way SSL authentication</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Agent-cannot-connect-to-Ambari-Server-Two-way-SSL/m-p/185248#M80795</link>
      <description>&lt;P&gt;I've encountered error upon reconnecting the node to Ambari. Two way SSL authentication is set as disabled which is in a default setup. Let me know how can I resolve this.&lt;/P&gt;&lt;P&gt;You may see the logs below&lt;/P&gt;&lt;P&gt;ERROR 2018-07-16 13:42:28,329 security.py:249 - Certificate signing failed.
In order to receive a new agent certificate, remove existing certificate file from keys directory. As a workaround you can turn off two-way SSL authentication in server configuration(ambari.properties)
Exiting..
ERROR 2018-07-16 13:42:28,329 Controller.py:212 - Unable to connect to: &lt;A href="https://localhost:8441/agent/v1/register/localhost" target="_blank"&gt;https://localhost:8441/agent/v1/register/localhost&lt;/A&gt;
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 165, in registerWithServer
    ret = self.sendRequest(self.registerUrl, data)
  File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 496, in sendRequest
    raise IOError('Request to {0} failed due to {1}'.format(url, str(exception)))
IOError: Request to &lt;A href="https://localhost:8441/agent/v1/register/localhost" target="_blank"&gt;https://localhost:8441/agent/v1/register/localhost&lt;/A&gt; failed due to ()
ERROR 2018-07-16 13:42:28,329 Controller.py:213 - Error:Request to &lt;A href="https://localhost:8441/agent/v1/register/localhost" target="_blank"&gt;https://localhost:8441/agent/v1/register/localhost&lt;/A&gt; failed due to ()
WARNING 2018-07-16 13:42:28,329 Controller.py:214 -  Sleeping for 17 seconds and then trying again &lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 21:15:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Agent-cannot-connect-to-Ambari-Server-Two-way-SSL/m-p/185248#M80795</guid>
      <dc:creator>hlcastro</dc:creator>
      <dc:date>2018-07-16T21:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Agent cannot connect to Ambari Server - Two way SSL authentication</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Agent-cannot-connect-to-Ambari-Server-Two-way-SSL/m-p/185249#M80796</link>
      <description>&lt;P&gt;Try changing to forcefully use TLS v1.2  on all agent's ambari property file(ambari.properties) and see if that helps resolving the issue.  Add following line under [security] section in  "ambari.properties" of all agents.&lt;/P&gt;&lt;P&gt;[security] &lt;/P&gt;&lt;P&gt;force_https_protocol=PROTOCOL_TLSv1_2&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 21:48:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Agent-cannot-connect-to-Ambari-Server-Two-way-SSL/m-p/185249#M80796</guid>
      <dc:creator>winnie_philip</dc:creator>
      <dc:date>2018-07-16T21:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Agent cannot connect to Ambari Server - Two way SSL authentication</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Agent-cannot-connect-to-Ambari-Server-Two-way-SSL/m-p/185250#M80797</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15452/hlcastro.html" nodeid="15452"&gt;@Hamilton Castro&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The error message indicates that you are running ambari agent on the same ambari server host?   Or is it by mistake?   We see &lt;STRONG&gt;"localhost" &lt;/STRONG&gt;there&lt;/P&gt;&lt;PRE&gt;Error:Request to &lt;A href="https://localhost:8441/agent/v1/register/localhost" target="_blank"&gt;https://localhost:8441/agent/v1/register/localhost&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;So please check few things:&lt;/P&gt;&lt;P&gt;1. The hostname is correct? Ambari relies on FQDN.  Run on ambari server host to findout it's FQDN&lt;/P&gt;&lt;PRE&gt;# hostname -f&lt;/PRE&gt;&lt;P&gt;Also verify is ambari has opened port 8440 and 8441 on all available interface address:&lt;/P&gt;&lt;PRE&gt;# netstat -tnlpa | grep `cat /var/run/ambari-server/ambari-server.pid`
tcp6       0      0 :::8080                 :::*                    LISTEN      13126/java          
tcp6       0      0 :::8440                 :::*                    LISTEN      13126/java          
tcp6       0      0 :::8441                 :::*                    LISTEN      13126/java          &lt;/PRE&gt;&lt;P&gt;2. Also please check the ambari-agent.ini file to findout if it is pointing to the correct ambari server FQDN?&lt;/P&gt;&lt;PRE&gt;# grep -A5 '\[server\]' /etc/ambari-agent/conf/ambari-agent.ini
[server]
hostname = ambariserver.example.com
url_port = 8440
secured_url_port = 8441
connect_retry_delay = 10
max_reconnect_retry_delay = 30&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Also please verify if the &lt;STRONG&gt;"/etc/hosts"&lt;/STRONG&gt; file is correct and it has the first two lines present as the note mentioned in  &lt;A href="https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-installation-ppc/content/edit_the_host_file.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.0/bk_ambari-installation-ppc/content/edit_the_host_file.html&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;Do not remove the following two lines from your hosts file. Removing or editing the following lines may cause various programs that require network functionality to fail.&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 06:51:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Agent-cannot-connect-to-Ambari-Server-Two-way-SSL/m-p/185250#M80797</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-07-17T06:51:29Z</dc:date>
    </item>
  </channel>
</rss>

