Bug 727558 - [agent] Unable to specify alternative port for RHQ server
Summary: [agent] Unable to specify alternative port for RHQ server
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: 4.1
Hardware: Unspecified
OS: Unspecified
urgent
urgent vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: rhq41beta
TreeView+ depends on / blocked
 
Reported: 2011-08-02 13:05 UTC by Lukas Krejci
Modified: 2011-08-11 03:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-02 14:21:20 UTC


Attachments (Terms of Use)

Description Lukas Krejci 2011-08-02 13:05:12 UTC
Description of problem:

$> bin/rhq-agent.sh --cleanconfig --purgedata -p brand-new-and-unused
RHQ 4.1.0-SNAPSHOT [b3eb971] (Mon Aug 01 21:40:33 CEST 2011)
Answer the following questions to setup this RHQ Agent instance.
- After each prompt, a default value will appear in square brackets.
  If you press the ENTER key without providing any value,
  the new preference value will be set to that default value.
- If you wish to rely on the system internal default value and
  not define any preference value, enter '!*'.
- If you wish to stop before finishing all the questions but still
  retain those preferences you already set, enter '!+'.
- If you wish to cancel before finishing all the questions and revert
  all preferences back to their original values, enter '!-'.
- If you need help for a particular preference, enter '!?'.

Agent Name [localhost.localdomain] : 
Agent Hostname or IP Address [!*] : 
Agent Port [16163] : 16164
RHQ Server Hostname or IP Address [127.0.0.1] : 
RHQ Server Port [7080] : 7085
The setup has been completed for the preferences at node [/rhq-agent/brand-new-and-unused].
!!! This agent is registering under the loopback address [socket://127.0.0.1:16164/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200] - this should only be done for testing or demo purposes - this agent will only be able to interact with a server running on the same host as this agent

!!! There are [1] servers that are potentially unreachable by this agent.
Please double check all public endpoints of your servers and ensure
they are all reachable by this agent. The failed server endpoints are:
[localhost.localdomain:7080/7443]
See the Administration > High Availability > Servers in the server GUI
to change the public endpoint of a server.
THIS AGENT WILL WAIT UNTIL ONE OF ITS SERVERS BECOMES REACHABLE!


---------------------------------------------------

Note that the server listening on 7085 actually DOES get registration requests:

15:02:44,634 WARN  [CoreServerServiceImpl] An agent [localhost.localdomain] has registered with a loopback address. This should only be done for testing or demo purposes - this agent can only ever interact with this server. AgentRegistrationRequest: [name=[localhost.localdomain]; address=[127.0.0.1]; port=[16164]; remote-endpoint=[socket://127.0.0.1:16164/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200]; regenerate-token=[false]; original-token=[<was null>]; agent-version=[4.1.0-SNAPSHOT(b3eb971)]
15:02:44,634 INFO  [CoreServerServiceImpl] Got agent registration request for existing agent: localhost.localdomain[127.0.0.1:16164][4.1.0-SNAPSHOT(b3eb971)] - Will not regenerate a new token

Version-Release number of selected component (if applicable):
4.1.0-SNAPSHOT

How reproducible:
always

Steps to Reproduce:
1. Reconfigure RHQ server to use different ports in rhq-server.properties file.
2. Try to configure agent to use the modified port number
  
Actual results:
Agent never registers

Expected results:
Agent registered successfully

Additional info:

Comment 1 Lukas Krejci 2011-08-02 14:21:20 UTC
PEBCAK :(

The server listening on port 7085 was not configured properly. Its baseUrl was set to http://localhost:7080. Changing that to a proper value (http://localhost:7085) fixed this issue.


Note You need to log in before you can comment on or make changes to this bug.