[jira] [Created] (AMBARI-23333) Query should support wildcard or regexp

2018-03-22 Thread Xianghao Lu (JIRA)
Xianghao Lu created AMBARI-2:


 Summary: Query should support wildcard or regexp
 Key: AMBARI-2
 URL: https://issues.apache.org/jira/browse/AMBARI-2
 Project: Ambari
  Issue Type: Task
  Components: ambari-logsearch
Reporter: Xianghao Lu


Solr supports wildcard and regular expression when query, refer to [Solr query 
wiki|https://wiki.apache.org/solr/SolrQuerySyntax]
But both ambari-logsearch and spring-data-solr will escape special characters 
used in wildcard or regular expression, as a result, I only can use accurate 
match in Log search ui. 
Will ambari-logsearch support wildcard and regular expression in the future?

Escaping special characters in spring-data-solr:

function escapeCriteriaValue() in 
[QueryParserBase.java|https://github.com/spring-projects/spring-data-solr/blob/master/src/main/java/org/springframework/data/solr/core/QueryParserBase.java]

Escaping special characters in ambari-logsearch:

function escapeQueryChars() in 
[SolrUtil.java|https://github.com/apache/ambari/blob/trunk/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/util/SolrUtil.java]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMBARI-22800) Ambari agent get wrong FQDN by getfqdn()

2018-01-21 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22800:
-
Labels: patch  (was: )
Status: Patch Available  (was: Open)

> Ambari agent get wrong FQDN by getfqdn()
> 
>
> Key: AMBARI-22800
> URL: https://issues.apache.org/jira/browse/AMBARI-22800
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>Priority: Major
>  Labels: patch
> Attachments: AMBARI-22800.patch
>
>
> Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
> for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
> addresses, as a result, Ambari agent  will register failed. My case is as 
> follows:
> [root@test01 ~]$ hostname
>  test01.example.com
> [root@test01 ~]$ cat /etc/hosts
>  127.0.0.1 localhost localhost.localdomain
>  10.208.47.45 test01
> [root@test01 ~]$ python
>  Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
>  [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
>  Type "help", "copyright", "credits" or "license" for more information.
>  >>> import socket
>  >>> print socket.getfqdn()
>  test01
>  
> Agent error log:
>  INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
> configuration not defined thus read hostname 'test01' using socket.getfqdn().
>  ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
> (test01) does not match expected ambari server hostname (test01.example.com). 
> Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
> to confirm your hostname is setup correctly
>   
>  Related Links:
> There are other examples in the link about getting wrong FQDN by 
> socket.getfqdn().
> [https://bugs.python.org/issue5004]
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMBARI-22800) Ambari agent get wrong FQDN by getfqdn()

2018-01-17 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22800:
-
Description: 
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test01 ~]$ hostname
 test01.example.com

[root@test01 ~]$ cat /etc/hosts
 127.0.0.1 localhost localhost.localdomain
 10.208.47.45 a01

[root@test01 ~]$ python
 Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import socket
 >>> print socket.getfqdn()
 test01

 

Agent error log:
 INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
configuration not defined thus read hostname 'test01' using socket.getfqdn().
 ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
(test01) does not match expected ambari server hostname (test01.example.com). 
Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
to confirm your hostname is setup correctly
  
 Related Links:

There are other examples in the link about getting wrong FQDN by 
socket.getfqdn().

[https://bugs.python.org/issue5004]

 

 

  was:
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test01 ~]$ hostname
 test01.example.com

[root@test01 ~]$ cat /etc/hosts
 127.0.0.1 localhost localhost.localdomain
 10.208.47.45 a01

[root@test01 ~]$ python
 Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import socket
 >>> print socket.getfqdn()
test01

 

Agent error log:
 INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
configuration not defined thus read hostname 'test01' using socket.getfqdn().
 ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
(test01) does not match expected ambari server hostname (test01.example.com). 
Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
to confirm your hostname is setup correctly
  
 Related Links:

There are other examples in the link for registeration failure because of wrong 
FQDN.

[https://bugs.python.org/issue5004]

 

 


> Ambari agent get wrong FQDN by getfqdn()
> 
>
> Key: AMBARI-22800
> URL: https://issues.apache.org/jira/browse/AMBARI-22800
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>Priority: Major
> Attachments: AMBARI-22800.patch
>
>
> Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
> for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
> addresses, as a result, Ambari agent  will register failed. My case is as 
> follows:
> [root@test01 ~]$ hostname
>  test01.example.com
> [root@test01 ~]$ cat /etc/hosts
>  127.0.0.1 localhost localhost.localdomain
>  10.208.47.45 a01
> [root@test01 ~]$ python
>  Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
>  [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
>  Type "help", "copyright", "credits" or "license" for more information.
>  >>> import socket
>  >>> print socket.getfqdn()
>  test01
>  
> Agent error log:
>  INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
> configuration not defined thus read hostname 'test01' using socket.getfqdn().
>  ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
> (test01) does not match expected ambari server hostname (test01.example.com). 
> Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
> to confirm your hostname is setup correctly
>   
>  Related Links:
> There are other examples in the link about getting wrong FQDN by 
> socket.getfqdn().
> [https://bugs.python.org/issue5004]
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMBARI-22800) Ambari agent get wrong FQDN by getfqdn()

2018-01-17 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22800:
-
Description: 
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test01 ~]$ hostname
 test01.example.com

[root@test01 ~]$ cat /etc/hosts
 127.0.0.1 localhost localhost.localdomain
 10.208.47.45 test01

[root@test01 ~]$ python
 Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import socket
 >>> print socket.getfqdn()
 test01

 

Agent error log:
 INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
configuration not defined thus read hostname 'test01' using socket.getfqdn().
 ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
(test01) does not match expected ambari server hostname (test01.example.com). 
Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
to confirm your hostname is setup correctly
  
 Related Links:

There are other examples in the link about getting wrong FQDN by 
socket.getfqdn().

[https://bugs.python.org/issue5004]

 

 

  was:
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test01 ~]$ hostname
 test01.example.com

[root@test01 ~]$ cat /etc/hosts
 127.0.0.1 localhost localhost.localdomain
 10.208.47.45 a01

[root@test01 ~]$ python
 Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import socket
 >>> print socket.getfqdn()
 test01

 

Agent error log:
 INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
configuration not defined thus read hostname 'test01' using socket.getfqdn().
 ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
(test01) does not match expected ambari server hostname (test01.example.com). 
Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
to confirm your hostname is setup correctly
  
 Related Links:

There are other examples in the link about getting wrong FQDN by 
socket.getfqdn().

[https://bugs.python.org/issue5004]

 

 


> Ambari agent get wrong FQDN by getfqdn()
> 
>
> Key: AMBARI-22800
> URL: https://issues.apache.org/jira/browse/AMBARI-22800
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>Priority: Major
> Attachments: AMBARI-22800.patch
>
>
> Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
> for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
> addresses, as a result, Ambari agent  will register failed. My case is as 
> follows:
> [root@test01 ~]$ hostname
>  test01.example.com
> [root@test01 ~]$ cat /etc/hosts
>  127.0.0.1 localhost localhost.localdomain
>  10.208.47.45 test01
> [root@test01 ~]$ python
>  Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
>  [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
>  Type "help", "copyright", "credits" or "license" for more information.
>  >>> import socket
>  >>> print socket.getfqdn()
>  test01
>  
> Agent error log:
>  INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
> configuration not defined thus read hostname 'test01' using socket.getfqdn().
>  ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
> (test01) does not match expected ambari server hostname (test01.example.com). 
> Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
> to confirm your hostname is setup correctly
>   
>  Related Links:
> There are other examples in the link about getting wrong FQDN by 
> socket.getfqdn().
> [https://bugs.python.org/issue5004]
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMBARI-22800) Ambari agent get wrong FQDN by getfqdn()

2018-01-17 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22800:
-
Description: 
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test01 ~]$ hostname
 test01.example.com

[root@test01 ~]$ cat /etc/hosts
 127.0.0.1 localhost localhost.localdomain
 10.208.47.45 a01

[root@test01 ~]$ python
 Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import socket
 >>> print socket.getfqdn()
test01

 

Agent error log:
 INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
configuration not defined thus read hostname 'test01' using socket.getfqdn().
 ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
(test01) does not match expected ambari server hostname (test01.example.com). 
Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
to confirm your hostname is setup correctly
  
 Related Links:

There are other examples in the link for registeration failure because of wrong 
FQDN.

[https://bugs.python.org/issue5004]

 

 

  was:
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test ~]$ hostname
 test.example.com

[root@test ~]$ cat /etc/hosts
 127.0.0.1 localhost localhost.localdomain
 10.208.47.45 a01

[root@test ~]$ python
 Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import socket
 >>> print socket.getfqdn()
 a01

 

Agent error log:
INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
configuration not defined thus read hostname 'a01' using socket.getfqdn().
 ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
(a01) does not match expected ambari server hostname (test.example.com). 
Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
to confirm your hostname is setup correctly
  
Related Links:

[https://bugs.python.org/issue5004]

 


> Ambari agent get wrong FQDN by getfqdn()
> 
>
> Key: AMBARI-22800
> URL: https://issues.apache.org/jira/browse/AMBARI-22800
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>Priority: Major
> Attachments: AMBARI-22800.patch
>
>
> Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
> for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
> addresses, as a result, Ambari agent  will register failed. My case is as 
> follows:
> [root@test01 ~]$ hostname
>  test01.example.com
> [root@test01 ~]$ cat /etc/hosts
>  127.0.0.1 localhost localhost.localdomain
>  10.208.47.45 a01
> [root@test01 ~]$ python
>  Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
>  [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
>  Type "help", "copyright", "credits" or "license" for more information.
>  >>> import socket
>  >>> print socket.getfqdn()
> test01
>  
> Agent error log:
>  INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
> configuration not defined thus read hostname 'test01' using socket.getfqdn().
>  ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
> (test01) does not match expected ambari server hostname (test01.example.com). 
> Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
> to confirm your hostname is setup correctly
>   
>  Related Links:
> There are other examples in the link for registeration failure because of 
> wrong FQDN.
> [https://bugs.python.org/issue5004]
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMBARI-22800) Ambari agent get wrong FQDN by getfqdn()

2018-01-17 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22800:
-
Attachment: AMBARI-22800.patch

> Ambari agent get wrong FQDN by getfqdn()
> 
>
> Key: AMBARI-22800
> URL: https://issues.apache.org/jira/browse/AMBARI-22800
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>Priority: Major
> Attachments: AMBARI-22800.patch
>
>
> Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
> for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
> addresses, as a result, Ambari agent  will register failed. My case is as 
> follows:
> [root@test ~]$ hostname
>  test.example.com
> [root@test ~]$ cat /etc/hosts
>  127.0.0.1 localhost localhost.localdomain
>  10.208.47.45 a01
> [root@test ~]$ python
>  Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
>  [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
>  Type "help", "copyright", "credits" or "license" for more information.
>  >>> import socket
>  >>> print socket.getfqdn()
>  a01
>  
> Agent error log:
> INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
> configuration not defined thus read hostname 'a01' using socket.getfqdn().
>  ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
> (a01) does not match expected ambari server hostname (test.example.com). 
> Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
> to confirm your hostname is setup correctly
>   
> Related Links:
> [https://bugs.python.org/issue5004]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMBARI-22800) Ambari agent get wrong FQDN by getfqdn()

2018-01-17 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22800:
-
Description: 
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test ~]$ hostname
 test.example.com

[root@test ~]$ cat /etc/hosts
 127.0.0.1 localhost localhost.localdomain
 10.208.47.45 a01

[root@test ~]$ python
 Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import socket
 >>> print socket.getfqdn()
 a01

 

Agent error log:
INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
configuration not defined thus read hostname 'a01' using socket.getfqdn().
 ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
(a01) does not match expected ambari server hostname (test.example.com). 
Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
to confirm your hostname is setup correctly
  
Related Links:

[https://bugs.python.org/issue5004]

 

  was:
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test ~]$ hostname
 test.example.com

[root@test ~]$ cat /etc/hosts
 127.0.0.1 localhost localhost.localdomain
 10.208.47.45 a01

[root@test ~]$ python
 Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import socket
 >>> print socket.getfqdn()
 a01

 

Agent error log:
 ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
(a01) does not match expected ambari server hostname (test.example.com). 
Aborting registration. Please check 
 hostname, hostname -f and /etc/hosts file to confirm your hostname is setup 
correctly
  

Related Links:

[https://bugs.python.org/issue5004]

 


> Ambari agent get wrong FQDN by getfqdn()
> 
>
> Key: AMBARI-22800
> URL: https://issues.apache.org/jira/browse/AMBARI-22800
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>Priority: Major
>
> Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
> for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
> addresses, as a result, Ambari agent  will register failed. My case is as 
> follows:
> [root@test ~]$ hostname
>  test.example.com
> [root@test ~]$ cat /etc/hosts
>  127.0.0.1 localhost localhost.localdomain
>  10.208.47.45 a01
> [root@test ~]$ python
>  Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
>  [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
>  Type "help", "copyright", "credits" or "license" for more information.
>  >>> import socket
>  >>> print socket.getfqdn()
>  a01
>  
> Agent error log:
> INFO 2018-01-17 15:52:29,774 hostname.py:67 - agent:hostname_script 
> configuration not defined thus read hostname 'a01' using socket.getfqdn().
>  ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
> (a01) does not match expected ambari server hostname (test.example.com). 
> Aborting registration. Please check hostname, hostname -f and /etc/hosts file 
> to confirm your hostname is setup correctly
>   
> Related Links:
> [https://bugs.python.org/issue5004]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AMBARI-22800) Ambari agent get wrong FQDN by getfqdn()

2018-01-17 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22800:
-
Description: 
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test ~]$ hostname
 test.example.com

[root@test ~]$ cat /etc/hosts
 127.0.0.1 localhost localhost.localdomain
 10.208.47.45 a01

[root@test ~]$ python
 Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import socket
 >>> print socket.getfqdn()
 a01

 

Agent error log:
 ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
(a01) does not match expected ambari server hostname (test.example.com). 
Aborting registration. Please check 
 hostname, hostname -f and /etc/hosts file to confirm your hostname is setup 
correctly
  

Related Links:

[https://bugs.python.org/issue5004]

 

  was:
Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test ~]$ hostname
test.example.com

[root@test ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain
10.208.47.45 a01

[root@test ~]$ python
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> print socket.getfqdn()
a03

 

Agent error log:
ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname (a01) 
does not match expected ambari server hostname (test.example.com). Aborting 
registration. Please check 
hostname, hostname -f and /etc/hosts file to confirm your hostname is setup 
correctly
 

Related Links:

https://bugs.python.org/issue5004

 


> Ambari agent get wrong FQDN by getfqdn()
> 
>
> Key: AMBARI-22800
> URL: https://issues.apache.org/jira/browse/AMBARI-22800
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>Priority: Major
>
> Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
> for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
> addresses, as a result, Ambari agent  will register failed. My case is as 
> follows:
> [root@test ~]$ hostname
>  test.example.com
> [root@test ~]$ cat /etc/hosts
>  127.0.0.1 localhost localhost.localdomain
>  10.208.47.45 a01
> [root@test ~]$ python
>  Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
>  [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
>  Type "help", "copyright", "credits" or "license" for more information.
>  >>> import socket
>  >>> print socket.getfqdn()
>  a01
>  
> Agent error log:
>  ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname 
> (a01) does not match expected ambari server hostname (test.example.com). 
> Aborting registration. Please check 
>  hostname, hostname -f and /etc/hosts file to confirm your hostname is setup 
> correctly
>   
> Related Links:
> [https://bugs.python.org/issue5004]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (AMBARI-22800) Ambari agent get wrong FQDN by getfqdn()

2018-01-17 Thread Xianghao Lu (JIRA)
Xianghao Lu created AMBARI-22800:


 Summary: Ambari agent get wrong FQDN by getfqdn()
 Key: AMBARI-22800
 URL: https://issues.apache.org/jira/browse/AMBARI-22800
 Project: Ambari
  Issue Type: Bug
  Components: ambari-agent
Affects Versions: trunk
Reporter: Xianghao Lu


Ambari agent sometimes get a wrong FQDN by python function socket.getfqdn(), 
for example, host uses the /_etc_/_hosts_ file to resolve hostname to IP 
addresses, as a result, Ambari agent  will register failed. My case is as 
follows:

[root@test ~]$ hostname
test.example.com

[root@test ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain
10.208.47.45 a01

[root@test ~]$ python
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> print socket.getfqdn()
a03

 

Agent error log:
ERROR 2018-01-17 15:52:29,774 main.py:244 - Ambari agent machine hostname (a01) 
does not match expected ambari server hostname (test.example.com). Aborting 
registration. Please check 
hostname, hostname -f and /etc/hosts file to confirm your hostname is setup 
correctly
 

Related Links:

https://bugs.python.org/issue5004

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AMBARI-22689) Restart agent command sent by server

2017-12-23 Thread Xianghao Lu (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-22689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302425#comment-16302425
 ] 

Xianghao Lu commented on AMBARI-22689:
--

[~adoroszlai]
OK, I have created the review.

> Restart agent command sent by server
> 
>
> Key: AMBARI-22689
> URL: https://issues.apache.org/jira/browse/AMBARI-22689
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>  Labels: patch
> Attachments: AMBARI-22689.patch
>
>
> When ambari agent get a heartbeat response from ambari server, agent will 
> convert the string data to JSON object, and, response['restartAgent'] will be 
> a bool value not string.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (AMBARI-22689) Restart agent command sent by server

2017-12-22 Thread Xianghao Lu (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-22689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302153#comment-16302153
 ] 

Xianghao Lu edited comment on AMBARI-22689 at 12/23/17 1:20 AM:


I find the related issue, and I have seen your comment. [~adoroszlai]
[AMBARI-22653|https://issues.apache.org/jira/browse/AMBARI-22653]



was (Author: luxianghao):
I find the related issue. 
[AMBARI-22653|https://issues.apache.org/jira/browse/AMBARI-22653]
[~kkasa] [~swagle]

> Restart agent command sent by server
> 
>
> Key: AMBARI-22689
> URL: https://issues.apache.org/jira/browse/AMBARI-22689
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>  Labels: patch
> Attachments: AMBARI-22689.patch
>
>
> When ambari agent get a heartbeat response from ambari server, agent will 
> convert the string data to JSON object, and, response['restartAgent'] will be 
> a bool value not string.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AMBARI-22689) Restart agent command sent by server

2017-12-22 Thread Xianghao Lu (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-22689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302153#comment-16302153
 ] 

Xianghao Lu commented on AMBARI-22689:
--

I find the related issue. 
[AMBARI-22653|https://issues.apache.org/jira/browse/AMBARI-22653]
[~kkasa] [~swagle]

> Restart agent command sent by server
> 
>
> Key: AMBARI-22689
> URL: https://issues.apache.org/jira/browse/AMBARI-22689
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>  Labels: patch
> Attachments: AMBARI-22689.patch
>
>
> When ambari agent get a heartbeat response from ambari server, agent will 
> convert the string data to JSON object, and, response['restartAgent'] will be 
> a bool value not string.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (AMBARI-22689) Restart agent command sent by server

2017-12-22 Thread Xianghao Lu (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-22689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302142#comment-16302142
 ] 

Xianghao Lu edited comment on AMBARI-22689 at 12/23/17 12:37 AM:
-

[~adoroszlai] The compilation errors are as follows, it seems the errors have 
nothing to do with my patch which is just about ambari-agent. Any ideas?

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on 
project {color:red}ambari-infra-manager{color}: Compilation failure: 
Compilation failure: 
[ERROR] 
/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive/{color:red}DocumentSource.java{color}:[23,8]
 class ItemWriterListener is public, should be declared in a file named 
ItemWriterListener.java
[ERROR] 
/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive{color:red}/DocumentIterator.java{color}:[23,8]
 class CloseableIterator is public, should be declared in a file named 
CloseableIterator.java
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :ambari-infra-manager


was (Author: luxianghao):
[~adoroszlai] The compilation erros are as follows, it seems the errors have 
nothing to do with my patch which is just about ambari-agent. Any ideas?

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on 
project {color:red}ambari-infra-manager{color}: Compilation failure: 
Compilation failure: 
[ERROR] 
/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive/{color:red}DocumentSource.java{color}:[23,8]
 class ItemWriterListener is public, should be declared in a file named 
ItemWriterListener.java
[ERROR] 
/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive{color:red}/DocumentIterator.java{color}:[23,8]
 class CloseableIterator is public, should be declared in a file named 
CloseableIterator.java
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :ambari-infra-manager

> Restart agent command sent by server
> 
>
> Key: AMBARI-22689
> URL: https://issues.apache.org/jira/browse/AMBARI-22689
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>  Labels: patch
> Attachments: AMBARI-22689.patch
>
>
> When ambari agent get a heartbeat response from ambari server, agent will 
> convert the string data to JSON object, and, response['restartAgent'] will be 
> a bool value not string.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AMBARI-22689) Restart agent command sent by server

2017-12-22 Thread Xianghao Lu (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-22689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302142#comment-16302142
 ] 

Xianghao Lu commented on AMBARI-22689:
--

[~adoroszlai] The compilation erros are as follows, it seems the errors have 
nothing to do with my patch which is just about ambari-agent. Any ideas?

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on 
project {color:red}ambari-infra-manager{color}: Compilation failure: 
Compilation failure: 
[ERROR] 
/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive/{color:red}DocumentSource.java{color}:[23,8]
 class ItemWriterListener is public, should be declared in a file named 
ItemWriterListener.java
[ERROR] 
/home/jenkins/jenkins-slave/workspace/Ambari-trunk-test-patch/ambari/ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/archive{color:red}/DocumentIterator.java{color}:[23,8]
 class CloseableIterator is public, should be declared in a file named 
CloseableIterator.java
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :ambari-infra-manager

> Restart agent command sent by server
> 
>
> Key: AMBARI-22689
> URL: https://issues.apache.org/jira/browse/AMBARI-22689
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>  Labels: patch
> Attachments: AMBARI-22689.patch
>
>
> When ambari agent get a heartbeat response from ambari server, agent will 
> convert the string data to JSON object, and, response['restartAgent'] will be 
> a bool value not string.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-22689) Restart agent command sent by server

2017-12-21 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22689:
-
   Labels: patch  (was: )
Affects Version/s: trunk
   Status: Patch Available  (was: Open)

> Restart agent command sent by server
> 
>
> Key: AMBARI-22689
> URL: https://issues.apache.org/jira/browse/AMBARI-22689
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Affects Versions: trunk
>Reporter: Xianghao Lu
>  Labels: patch
> Attachments: AMBARI-22689.patch
>
>
> When ambari agent get a heartbeat response from ambari server, agent will 
> convert the string data to JSON object, and, response['restartAgent'] will be 
> a bool value not string.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-22689) Restart agent command sent by server

2017-12-21 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22689:
-
Description: When ambari agent get a heartbeat response from ambari server, 
agent will convert the string data to JSON object, and, 
response['restartAgent'] will be a bool value not string.  (was: When ambari 
agent get a heartbeat response from ambari server, agent will convert the 
string data to JSON object, so, response['restartAgent'] will be a bool value 
not string.)

> Restart agent command sent by server
> 
>
> Key: AMBARI-22689
> URL: https://issues.apache.org/jira/browse/AMBARI-22689
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Reporter: Xianghao Lu
> Attachments: AMBARI-22689.patch
>
>
> When ambari agent get a heartbeat response from ambari server, agent will 
> convert the string data to JSON object, and, response['restartAgent'] will be 
> a bool value not string.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-22689) Restart agent command sent by server

2017-12-21 Thread Xianghao Lu (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-22689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xianghao Lu updated AMBARI-22689:
-
Attachment: AMBARI-22689.patch

> Restart agent command sent by server
> 
>
> Key: AMBARI-22689
> URL: https://issues.apache.org/jira/browse/AMBARI-22689
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-agent
>Reporter: Xianghao Lu
> Attachments: AMBARI-22689.patch
>
>
> When ambari agent get a heartbeat response from ambari server, agent will 
> convert the string data to JSON object, so, response['restartAgent'] will be 
> a bool value not string.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (AMBARI-22689) Restart agent command sent by server

2017-12-21 Thread Xianghao Lu (JIRA)
Xianghao Lu created AMBARI-22689:


 Summary: Restart agent command sent by server
 Key: AMBARI-22689
 URL: https://issues.apache.org/jira/browse/AMBARI-22689
 Project: Ambari
  Issue Type: Bug
  Components: ambari-agent
Reporter: Xianghao Lu


When ambari agent get a heartbeat response from ambari server, agent will 
convert the string data to JSON object, so, response['restartAgent'] will be a 
bool value not string.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)