Problem
Running a default job that uses the agent installed on the EC server. I get the following error message in the job log:
The agent returned error 503. The agent on ECLOUDTST.conpany.com doesn't know how to communicate with the server "ECLOUDTST". This can happen for various reasons. 1) The agent has not been pinged yet. This can be resolved by pinging the appropriate resource. 2) There is a configuration mismatch where the COMMANDER_SERVER setting in your web server's httpd.conf and the COMMANDER_SERVER_NAME setting in your CloudBees CD (CloudBees Flow) server's commander.properties file are not the same. This can be resolved by updating one of the aforementioned files, restarting the relevant service, and pinging the resource from the server. If this issue is occurring when publishing or retrieving artifact versions from your artifact repository, be sure that the COMMANDER_HOST setting in the repository server's server.properties file is in sync with COMMANDER_SERVER_NAME in commander.properties.
Solution
There is a configuration mismatch where the COMMANDER_SERVER setting in your web server’s httpd.conf and the COMMANDER_SERVER_NAME setting in your CloudBees CD (CloudBees Flow) server’s commander.properties file are not the same. This can be resolved by updating one of the aforementioned files, restarting the relevant service, and pinging the resource from the server.
For example, in commander.properties you may see:
COMMANDER_SERVER_NAME=ECLOUDTST.company.com
and in httpd.conf you may see:
SetEnv COMMANDER_SERVER "ECLOUDTST"
The two entries will need to be the same.
If you change the commander.properties file you will need to restart the CloudBees CD (CloudBees Flow) server:
cd /etc/init.d ./commanderServer stop ./commanderServer start
And if you change the httpd.conf file you will need to restart CloudBees CD (CloudBees Flow)'s Apache service:
cd /etc/init.d ./commanderApache stop ./commanderApache start
If both variables have the same value but you still suffering the issue, please, check the CloudBees CD (CloudBees Flow) Agent has been installed in all the CloudBees CD (CloudBees Flow) Servers (Web Server, CloudBees CD (CloudBees Flow) Server and Repository Server) and try to ping all of them from the CloudBees CD (CloudBees Flow) UI.