bobiannucci
Contributor
Contributor

Unable to register agent: Error communicating with agent: Unauthorized

Hi All....

I seem to be having some issues connecting to a Hyperic server from a remote agent. I've been searching the forums here but haven't been able to find anything that helps, I'm wondering if anyone has any hints for me.

The specific issue is, when starting the hq-agent on the remote box, I get an "Unable to register agent: Error communicating with agent: Unauthorized" error.

Let me get some of the particulars out first:
I am using Hyperic 3.2.0-615

The server is running Ubuntu 7.10. I do have Hyperic server running, and an agent reporting to that server running, and working well. This is a dev box in our office, and we get to it remotely via dyndns.org redirection.

The remote box is running CentOS 4.5 and is living as a Parallels VM at a hosting facility.

I can telnet to ports 7080, 7443, and 2144 on the Ubuntu box from the CentOS box. I can telnet to port 2144 from the Ubuntu box to the CentOS box with no problem, so I don't think the ports are blocked.

Looking at the server log on the Ubuntu box, i do see an entry when the CentoOS box tries to connect:
2008-02-22 10:00:42,870 INFO [Thread-5341] [org.hyperic.hq.agent.client.AgentConnection] xxxxx.dyndns.org -> agent:ping
but no other references. This very closely corresponds to the time when I initially start the agent.

Here's a sample of the debug output in the agent log:
2008-02-22 10:22:46,450 DEBUG [AutoinventoryCommandsServer] Sending autoinventory report to server: [ScanState platform={agentToken=null queueStatus=0 customProperties=[B@7cd37a productConfig=null controlConfig=null measurementConfig=[B@1202d69 diff=0 ignored=false platformTypeName=Linux lastApproved=null certdn=CAM-AGENT-1203692329135-6524751524017456436-3543281869852643629 fqdn=xxxxxx.net name=null location=null description=CentOS 4.5 cpuCount=2 id=null mTime=1203693765804 cTime=1203693765804} ips={queueStatus=0 diff=0 ignored=false address=127.0.0.1 mACAddress=00:00:00:00:00:00 netmask=255.0.0.0 id=null mTime=1203693765804 cTime=1203693765804} serversIncluded=true]
2008-02-22 10:22:46,450 DEBUG [AgentDListProvider] Got covalent.CAMProviderURL='null'
2008-02-22 10:22:46,450 DEBUG [AgentDListProvider] Got covalent.CAMAgentToken='null'
2008-02-22 10:22:46,480 DEBUG [AutoinventoryCommandsServer] Unable to send autoinventory platform data to server, sleeping for 15 secs before retrying. Error: Unable to communicate with server -- provider not yet setup
org.hyperic.hq.bizapp.client.AgentCallbackClientException: Unable to communicate with server -- provider not yet setup
at org.hyperic.hq.bizapp.client.AgentCallbackClient.getProvider(AgentCallbackClient.java:89)
at org.hyperic.hq.bizapp.client.AutoinventoryCallbackClient.aiSendReport(AutoinventoryCallbackClient.java:49)
at org.hyperic.hq.autoinventory.agent.server.AutoinventoryCommandsServer.scanComplete(AutoinventoryCommandsServer.java:515)
at org.hyperic.hq.autoinventory.ScanManager.scanComplete(ScanManager.java:308)
at org.hyperic.hq.autoinventory.Scanner.notifyScanComplete(Scanner.java:273)
at org.hyperic.hq.autoinventory.Scanner.start(Scanner.java:211)
at org.hyperic.hq.autoinventory.ScanManager.mainRunLoop(ScanManager.java:141)
at org.hyperic.hq.autoinventory.ScanManager.access$000(ScanManager.java:41)
at org.hyperic.hq.autoinventory.ScanManager$1.run(ScanManager.java:107)
2008-02-22 10:22:46,600 INFO [AgentDaemon] Agent started successfully
2008-02-22 10:22:46,605 INFO [AgentConnection] 127.0.0.1 -> agent:ping
2008-02-22 10:22:46,645 DEBUG [SSLConnectionListener] Handling SSL connection from /127.0.0.1
2008-02-22 10:22:46,934 DEBUG [CommandListener] Dispatching request for 'agent:ping'
2008-02-22 10:22:46,948 DEBUG [CommandListener] Method 'org.hyperic.hq.agent.AgentCommand@1636e4e' returned an object result
2008-02-22 10:22:46,955 INFO [AgentConnection] 127.0.0.1 -> bizapp:getCAMServer
2008-02-22 10:22:46,962 DEBUG [SSLConnectionListener] Handling SSL connection from /127.0.0.1
2008-02-22 10:22:47,137 DEBUG [CommandListener] Dispatching request for 'bizapp:getCAMServer'
2008-02-22 10:22:47,138 DEBUG [AgentDListProvider] Got covalent.CAMProviderURL='null'
2008-02-22 10:22:47,139 DEBUG [AgentDListProvider] Got covalent.CAMAgentToken='null'
2008-02-22 10:22:47,139 DEBUG [CommandListener] Method 'org.hyperic.hq.agent.AgentCommand@1c8ef56' returned an object result
2008-02-22 10:22:47,142 INFO [AgentConnection] 127.0.0.1 -> agent:ping
2008-02-22 10:22:47,148 DEBUG [SSLConnectionListener] Handling SSL connection from /127.0.0.1
2008-02-22 10:22:47,344 DEBUG [CommandListener] Dispatching request for 'agent:ping'
2008-02-22 10:22:47,344 DEBUG [CommandListener] Method 'org.hyperic.hq.agent.AgentCommand@d90453' returned an object result

I am wondering if, where I see 127.0.0.1 referenced, it should be referencing the xxx.dyndns.org address instead. I have tried using the explicit IP during the initial agent startup with the same results. I have deleted the data directory as well with no change.

I'm not a linux expert by any means, I would hazzard a guess I've just overlooked something, but I can't see it. Can someone point me to some ideas?

Many thanks,
Bob

Message was edited by: bob iannucci
0 Kudos
2 Replies
excowboy
Virtuoso
Virtuoso

Hi bob,

if you use dyndns does that mean that your agent IP adress is DHCP based ?
I'm not sure if Hyperic HQ verifies the Agent based on the IP Address.
Could you check the IP-adress by moving to
Administration -> HQ Health -> Agents

Now you should see a list of agents and the corresponding IP addresses.

Mirko
0 Kudos
bobiannucci
Contributor
Contributor

> Hi bob,
>
> if you use dyndns does that mean that your agent IP
> adress is DHCP based ?
> I'm not sure if Hyperic HQ verifies the Agent based
> on the IP Address.
> Could you check the IP-adress by moving to
> Administration -> HQ Health -> Agents
>
> Now you should see a list of agents and the
> corresponding IP addresses.
>
> Mirko

Thanks Mirko...

All I see on that the Ubuntu server is the local agent I have running there at 127.0.0.1

I did, when I started the agent on the CentOS box, use the ip instead of the xxx.dyndns.org alias, with the same unhappy result 😉

-Bob
0 Kudos