# Agent reconnect issue

**URL:** https://www.finalbuilder.com/forums/t/agent-reconnect-issue/7276
**Category:** Bugs
**Created:** [August 29, 2022, 5:58am UTC](https://www.finalbuilder.com/forums/t/agent-reconnect-issue/7276 "2022-08-29T05:58:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![k3tchup](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/k3tchup/32/2162_2.png) [@k3tchup](https://www.finalbuilder.com/forums/u/k3tchup)
#### Post date: [August 29, 2022, 5:58am UTC](https://www.finalbuilder.com/forums/t/agent-reconnect-issue/7276/1 "2022-08-29T05:58:00Z")

</div>

It seems there was some network problem on Friday and agents were not accessible.  
Agents are now fine, but ContinuaCI is stuck. Builds are trying to reconnect with message:  
"  
Agent agent\_name which is executing stage is alive but not active. Waiting one second before rechecking. Retry 170  
"  
It’s hanging like that for 55 hours 🙂

When I stop the stuck builds, all other in queue start properly.  
I think there should be some fallback to either kill such builds after certain time (just like timeout on actions in stages) or maybe restart the connection between agents and server.

---

<div class="post-metadata">

### Author: ![k3tchup](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/k3tchup/32/2162_2.png) [@k3tchup](https://www.finalbuilder.com/forums/u/k3tchup)
#### Post date: [August 29, 2022, 6:29am UTC](https://www.finalbuilder.com/forums/t/agent-reconnect-issue/7276/2 "2022-08-29T06:29:19Z")

</div>

Scratch that… only one started properly, other are still trying to reconnect.

---

<div class="post-metadata">

### Author: ![k3tchup](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/k3tchup/32/2162_2.png) [@k3tchup](https://www.finalbuilder.com/forums/u/k3tchup)
#### Post date: [August 29, 2022, 6:33am UTC](https://www.finalbuilder.com/forums/t/agent-reconnect-issue/7276/3 "2022-08-29T06:33:29Z")

</div>

It seems that from ContinuaCI server POV agents are toggling between online and offline right now.

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [August 29, 2022, 6:34am UTC](https://www.finalbuilder.com/forums/t/agent-reconnect-issue/7276/4 "2022-08-29T06:34:08Z")

</div>

Hi Michal,

Is the agent service running? Check the Windows event log on the agent for errors.

---

<div class="post-metadata">

### Author: ![k3tchup](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/k3tchup/32/2162_2.png) [@k3tchup](https://www.finalbuilder.com/forums/u/k3tchup)
#### Post date: [August 29, 2022, 6:38am UTC](https://www.finalbuilder.com/forums/t/agent-reconnect-issue/7276/5 "2022-08-29T06:38:53Z")

</div>

Yes, all agent services are running, I see timeout errors on agents:  
A call from the agent to the server to update build status failed: Exception: TimeoutException

On server side, I see only errors that workspace could not be deleted (seems normal on our setup), but it’s from friday, nothing new.

I encountered this problem once or twice in the past, usually restart of the server helped.  
Might this be some windows networking issue ?

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [August 29, 2022, 6:46am UTC](https://www.finalbuilder.com/forums/t/agent-reconnect-issue/7276/6 "2022-08-29T06:46:34Z")

</div>

Yes, a timeout could be due to a network issue, or it could be that the server is too busy to accept the request, although usually you would then see errors on the server.

Check whether the CPU, disk, memory usage is high on either server or agent, then restart the server and agent and see whether that resolves the issue.

Which version of Continua are you running?

---

<div class="post-metadata">

### Author: ![k3tchup](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/k3tchup/32/2162_2.png) [@k3tchup](https://www.finalbuilder.com/forums/u/k3tchup)
#### Post date: [August 29, 2022, 7:56am UTC](https://www.finalbuilder.com/forums/t/agent-reconnect-issue/7276/7 "2022-08-29T07:56:14Z")

</div>

CPU usage was rather small 10-20%, after restart all is working.  
Version is 1.9.2.983, but I encountered such problem couple times before on older versions, I would rather suspect its some problem windows socket reopen after some network issue.
