A new elastic agent is created for every 2 mins.

41 views
Skip to first unread message

Satya Elipe

unread,
Jul 13, 2022, 10:25:04 AM7/13/22
to go...@googlegroups.com
Hi All

I see that, for every 2 mins a new elastic agent is created in contrast to my understanding that a single elastic agent comes up and finishes the job and vanishes after the job is finished.

Did I miss something? 

Many thanks in advance. 
Satya

Screenshot 2022-07-13 at 15.10.22.png

Ketan Padegaonkar

unread,
Jul 13, 2022, 10:49:52 AM7/13/22
to go...@googlegroups.com
Most likely cause seems to be that the elastic agent is not registering with the server within a specified timeout. So the server attempts to create another elastic agent instance.

Check if the profile supports a timeout configuration and see if you are able to increase it. Increasing the timeout might give you enough time to be able to SSH into the instance to determine what's going on. The plugin seems to expect that your AMI contains a gocd agent installed, it then sets up some user data to configure the gocd agent, and start up the agent and wait for it to connect.

- Ketan

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/CADKEDRqhicqueq-hwCwdjbtRcVFharVu_bUDKFPSV-_MPamPzQ%40mail.gmail.com.

Satya Elipe

unread,
Jul 14, 2022, 7:28:22 AM7/14/22
to go...@googlegroups.com, ketanpad...@gmail.com
Hi Ketan
Thank you for the input.

I could ssh into go-agent and look into some more details..
1. Server configuration from agent pc looks fine and I'm able to wget the server info, attached the screenshot
2. Elastic agent is actually visible on the server/job, attached are the screenshots from the server/job. 
3. go-agent is installed and available on the AMI and is running/active on the elastic agent pc; attached the screenshot; 
4. agent stderr.out file shows some errors about the cookies but finally was able to set/get that info, attached the screenshot too.

I think I'm missing something very obvious hence the agent not getting assigned. 
Any further inputs will be appreciated. Thank you. 

Regards
Satya





agent-unassigned.png
elastic-agent-tags.png
agent-auto-register.png
agent-stderr.png
able-to-ping-server-from-agent.png
agent-launcher.png
go-agent-active.png
increased-timeout-to-30mins.png
elastic-agent-network.png
elastic-agent-general.png

Aravind SV

unread,
Jul 14, 2022, 11:25:45 AM7/14/22
to Satya Elipe, go...@googlegroups.com

Is there any information in the elastic agent logs? Not the GoCD server logs.

It looks like the plugin you’re using is: https://github.com/iriusrisk/GoCD-EC2-Elastic-Agent-Plugin

The author or someone there might know more. To me, it looks like some kind of a timing issue and the agent not identifying itself properly to the server, if it is able to connect.

Cheers,
Aravind

Satya Elipe

unread,
Jul 14, 2022, 11:53:08 AM7/14/22
to Aravind SV, go...@googlegroups.com
Thanks Aravind.

Yes, I use that plugin. 

Attached is the log snippet from /var/log/go-agent/go-agent.log
Not sure, what does that mean? Agent not able to reach the severer, but we are able to see all the information about the agent on the server (from the job's agent status).

Let me know if any other logs from the agent will be helpful . Thank you

Best Wishes
Satya 
go-agent-log-1.png
go-agent-log-2.png

Satya Elipe

unread,
Jul 14, 2022, 11:58:53 AM7/14/22
to Aravind SV, go...@googlegroups.com
Also, to add:

"Check agent status" from the job gives all the details about the agent, but agents tab shows nothing under "Elastic". 

check agents status.png
agents info when clicked on check agents status.png
agents-tab.png

Satya Elipe

unread,
Jul 14, 2022, 6:26:39 PM7/14/22
to Aravind SV, in...@iriusrisk.com, go...@googlegroups.com
It would be great to have inputs from an author or anyone from https://github.com/iriusrisk/GoCD-EC2-Elastic-Agent-Plugin.
@iriusrisk ?

Many thanks in advance.
Satya

Reply all
Reply to author
Forward
0 new messages