Support Questions

Find answers, ask questions, and share your expertise

Registering nodes Fails

avatar
Explorer

error_ambari.txt

Hi,


I try to install ambari agent in 2 nodes with the ambari wizard but is fails, I review the logs and I saw the following error:

Internal Exception: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255)


I attached the log file and hope some can help me with this


Regards.

Saul Ramirez


1 ACCEPTED SOLUTION

avatar
Master Mentor

@Saul Ramirez

Looks like your Public_hostname for the agent is not right. As we see thsat the public_hostname is being taken as :

\'publicHostname\': \'<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">\\r\
<html xmlns="http://www.w3.org/1999/xhtml">\\r\
<head>\\r\
<meta content="text/html; charset=utf-8" http-equiv="content-type" />\\r\
<meta content="no-cache" http-equiv="pragma" />\\r\
<title>waiting...</title>\\r\
<script type="text/javascript">\\r\

.

Thats why you are getting too long column value for public_hostname

org.eclipse.persistence.exceptions.DatabaseException\
Internal Exception: org.postgresql.util.PSQLException: ERROR: el valor es demasiado largo para el tipo character varying(255)\
Error Code: 0\
Call: UPDATE hosts SET total_mem = ?, host_attributes = ?, public_host_name = ? WHERE (host_id = ?)\
\\tbind => [4 parameters bound]\

.

Can you please run the following command on yourt host which you re trying to add to see if it is returning correct FQDN?

# hostname -f



You can refer to the following Article which i wrote sometime back to fidn the difference between Public_hostname and hostname and how to fix it:
https://community.hortonworks.com/content/kbentry/42872/why-ambari-host-might-have-different-public-...






View solution in original post

2 REPLIES 2

avatar
Master Mentor

@Saul Ramirez

Looks like your Public_hostname for the agent is not right. As we see thsat the public_hostname is being taken as :

\'publicHostname\': \'<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">\\r\
<html xmlns="http://www.w3.org/1999/xhtml">\\r\
<head>\\r\
<meta content="text/html; charset=utf-8" http-equiv="content-type" />\\r\
<meta content="no-cache" http-equiv="pragma" />\\r\
<title>waiting...</title>\\r\
<script type="text/javascript">\\r\

.

Thats why you are getting too long column value for public_hostname

org.eclipse.persistence.exceptions.DatabaseException\
Internal Exception: org.postgresql.util.PSQLException: ERROR: el valor es demasiado largo para el tipo character varying(255)\
Error Code: 0\
Call: UPDATE hosts SET total_mem = ?, host_attributes = ?, public_host_name = ? WHERE (host_id = ?)\
\\tbind => [4 parameters bound]\

.

Can you please run the following command on yourt host which you re trying to add to see if it is returning correct FQDN?

# hostname -f



You can refer to the following Article which i wrote sometime back to fidn the difference between Public_hostname and hostname and how to fix it:
https://community.hortonworks.com/content/kbentry/42872/why-ambari-host-might-have-different-public-...






avatar
Explorer

Hi @Jay Kumar SenSharma


Thanks, I did your suggestion and I could move up but now I had a another issue.

I review the agent logs file and I found the below:

INFO 2019-03-20 21:20:32,645 NetUtil.py:61 - Connecting to https://hdp:8440/connection_info

INFO 2019-03-20 21:20:32,769 security.py:59 - Server require two-way SSL authentication. Use it instead of one-way...

INFO 2019-03-20 21:20:32,769 security.py:61 - Connecting to wss://hdp:8441/agent/stomp/v1

INFO 2019-03-20 21:20:32,769 security.py:224 - Server certicate exists, ok

INFO 2019-03-20 21:20:32,770 security.py:232 - Agent key exists, ok

INFO 2019-03-20 21:20:32,770 security.py:240 - Agent certificate exists, ok

INFO 2019-03-20 21:20:32,839 transport.py:329 - Starting receiver loop

INFO 2019-03-20 21:20:42,841 transport.py:358 - Receiver loop ended

ERROR 2019-03-20 21:20:42,841 HeartbeatThread.py:108 - Exception in HeartbeatThread. Re-running the registration

Traceback (most recent call last):

File "/usr/lib/ambari-agent/lib/ambari_agent/HeartbeatThread.py", line 95, in run

self.register()

File "/usr/lib/ambari-agent/lib/ambari_agent/HeartbeatThread.py", line 121, in register

self.establish_connection()

File "/usr/lib/ambari-agent/lib/ambari_agent/HeartbeatThread.py", line 247, in establish_connection

self.connection = connection_helper.connect()

File "/usr/lib/ambari-agent/lib/ambari_agent/security.py", line 87, in connect

self.establish_connection(conn)

File "/usr/lib/ambari-agent/lib/ambari_agent/security.py", line 108, in establish_connection

conn.connect(wait=True)

File "/usr/lib/ambari-agent/lib/ambari_stomp/protocol.py", line 505, in connect

self.transport.wait_for_connection()

File "/usr/lib/ambari-agent/lib/ambari_stomp/adapter/websocket.py", line 83, in wait_for_connection

raise ConnectionResponseTimeout("W

ConnectionResponseTimeout: Waiting for connection confirmation timed out


I attached a part the log file

Regards

Saul Ramirez

error_agent.txt