BE TEA Agent fails to register with TEA Server

BE TEA Agent fails to register with TEA Server

book

Article ID: KB0073015

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 5.6 and later

Description

My BE TEA Agent fails to register with the TEA Server on startup. The error seen in the BE TEA Agent console is:
WARN main [agent.be.BETEAAgentAutoRegistrationTask] - Unable to register agent with name 'BE'.

Issue/Introduction

Outlines some troubleshooting steps for cases where the BE TEA Agent fails to register with the TEA Server.

Resolution

Possible causes for this error are:
  1. The version of the BE TEA Agent is incompatible with the version of the TEA Server.
  2. The TEA Server URL specified in the BE TEA Agent's properties file is incorrect.
  3. The TEA Server hostname specified in the BE TEA Agent's properties file is resolving to an incorrect IP address (due to a misconfigured hosts file).
  4. The TEA Server is unreachable from the machine that runs the BE TEA Agent (due to a firewall/network configuration issue).
Case #1: Incompatible TEA Server and Agent Versions - Review the TEA Server console log. By default, the log is placed in /opt/TIBCO_HOME/tibco/cfgmgmt/tea/logs/tea.log.  In this case, you will see the error..
Failure registering agent 'BE'.
You can also confirm the full version of the TEA Server by inspecting the first line in the tea.log:
2021-09-14 15:53:09,530 INFO  lifecycle  [    ] TIBCO Enterprise Administrator v2.3.0-HF9 (pid: 550724)
Shortly after the Failure registering agent line, you will find the corresponding ERROR-level message:
2021-09-14 15:45:35,719 INFO  remoting   [  b22ab02a0dcb-17be5d7e170-1  ] Failure registering agent 'BE'.
...
2021-09-14 15:45:35,721 ERROR error      [    ] Agent type with ID BusinessEvents:6.1.1 not found
The message "Agent type with ID BusinessEvents:x.y.z not found" means that your TEA Server doesn't know about agent type 'BusinessEvents:6.1.1". This indicates that your TEA Server version does not support the version of BE you're using. In the above case, the TEA Server version is 2.3, which does not support BE 6.1.1. This is clarified in the README file for BE 6.1.1. Hence, the recommended solution would be to upgrade TEA Server to version 2.4.

Case #2: Incorrect TEA Server URL - If the be.tea.server.url property in $BE_HOME/teagent/config/be-teagent.props is set incorrectly, the DEBUG-level BE TEA Agent log will reveal this with the messages like the following:
DEBUG teagent-pinger [org.eclipse.jetty.client.HttpClient] - Created HttpDestination[http://teaserverr:8777]@3a0fa0bc,queue=0,pool=DuplexConnectionPool@5a6bbbd7[c=0/64,a=0,i=0]
DEBUG teagent-pinger [org.eclipse.jetty.client.HttpDestination] - Queued HttpRequest[PUT /teaa/task HTTP/1.1]@4f26ff04 for HttpDestination[http://teaserverr :8777]@3a0fa0bc,queue=1,pool=DuplexConnectionPool@5a6bbbd7[c=0/64,a=0,i=0]
java.net.UnknownHostException: teaserverr
The underlying exception is 'UnknownHostException', which means the machine running the BE TEA Agent can't identify the TEA Server host 'teaserverr'.  So in this case, there is a simple typo in the be.tea.server.url value (which needs to be changed to 'teaserver').

To enable DEBUG-level logging on the BE TEA Agent, you must edit the log4j configuration file under $BE_HOME/teagent/config/. The filename is different, depending on the version of the BE TEA Agent: 
  • In log4j.properties (BE 5.6 and earlier), set:  log4j.rootLogger=debug, stdout, rfile
  • In log4j2.properties (BE 6.0 and later), set:  rootLogger.level = DEBUG
You can also confirm the expected hostname by looking at the TEA Server log for the line..
INFO  console    [   server/web-server ] Web Server Started at http://teaserver:8777/
In the above case, the correct value for be.tea.server.url is 'http://teaserver:8777/tea'.

Case #3 - Incorrect TEA Server hostname resolution - In this case, the TEA Agent DEBUG-level log messages will be very similar to Case #2. The difference is, in this case, there is no typo in the be.tea.server.url property. However, examining the TEA Agent machine's hosts file can reveal that the expected hostname is not listed.  In the hosts file (Linux: /etc/hosts, Windows: C:\Windows\System32\drivers\etc\hosts), check that the expected TEA Server hostname is listed and resolves to the correct IP address.

Case #4 - TEA Server is unreachable due to firewall/network issues - In this case, you will see a "could not connect" message in the BE TEA Agent DEBUG-level log. For example..
DEBUG HttpClient@971690423-66 [org.eclipse.jetty.client.HttpClientTransport] - Could not connect to HttpDestination[http://teaserver:8777]@4caf875c,queue=1,pool=DuplexConnectionPool@5d15789f[c=1/64,a=0,i=0]
In this case, you should work with your IT/network team to determine why the TEA Agent machine cannot make a tcp connection to the TEA Server over the expected port (8777).