[Workaround] Having troubles getting AMI to connect to server
So I've managed to get agents working on EC2, as long as I configure buildAgent.properties and fill in ownAddress. However, if I exclude that, I get the following message in the agent log:
Registering on server https://<correct-hostname>, AgentDetails{Name='', AgentId=null, BuildId=null, AgentOwnAddress='127.0.0.1', AlternativeAddresses=[10.210.98.79, 50.16.127.151], Port=9090, Version='24331', PluginsVersion='24331-md5-8e7fd315d1890ddb30e8c4084c512e1b', AvailableRunners=[Ant, Duplicator, gradle-runner, Inspection, Ipr, JPS, Maven2, rake-runner, simpleRunner], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken=''}
Call https://<correct-hostname>/RPC2 buildServer.registerAgent3: org.apache.xmlrpc.XmlRpcException: jetbrains.buildServer.CannotPingAgentException: Unable to ping agent . Check firewall and/or try to specify 'ownAddress' in the agent configuration. Details: Agent '' cannot be accessed by any of the addresses: [127.0.0.1], (port 9090)
buildAgent.properties is set up as follows on the AMI:
serverUrl=
name=
workDir=../work
tempDir=../temp
systemDir=../system
ownAddress=
ownPort=9090
Since the EC2 instance has two IPs (public and private), is that the cause of the problem? How can I work around this?
Thanks.
Please sign in to leave a comment.
FYI, the problem does not seem to be the multiple IPs. The instance doesn't even know it can be accessed via a second IP. So the question is why does it come up with the IP address of 127.0.0.1 when reporting to the server?
And yeah, the server does receive the registration:
]), error: jetbrains.buildServer.CannotPingAgentException: Unable to ping agent . Check firewall and/or try to specify 'ownAddress' in the agent configuration. Details: Agent '' cannot be accessed by any of the addresses: [127.0.0.1], (port 9090) (enable debug to see whole stacktrace)
I was able to work around this issue by generating the config test at boot time.
$ crontab -l
@reboot /home/ubuntu/StartBuildAgent.sh
$ cat ~/StartBuildAgent.sh
#!/bin/bash
# let the system boot (IP address doesn't seem to be set otherwise)
sleep 60
source ~/.bashrc && cd /home/ubuntu/BuildAgent/ && \
cp conf/buildAgent.properties.original conf/buildAgent.properties && \
echo ownAddress=`hostname -i` >> conf/buildAgent.properties && \
./bin/agent.sh start
Lame, but works for now once I create a AMI.
I'm having similar symptons. http://devnet.jetbrains.com/thread/449895
did you find a solution or still using this workaround?
Same workaround