# Programmatically Reset a Gateway Network Connection

**URL:** <https://forum.inductiveautomation.com/t/programmatically-reset-a-gateway-network-connection/48872>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [July 15, 2021, 2:15pm UTC](https://forum.inductiveautomation.com/t/programmatically-reset-a-gateway-network-connection/48872 "2021-07-15T14:15:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [July 15, 2021, 2:15pm UTC](https://forum.inductiveautomation.com/t/programmatically-reset-a-gateway-network-connection/48872/1 "2021-07-15T14:15:00Z")

</div>

Is there a way, via scripting, to reset a gateway network connection?

I had an issue this morning where one of our Edge gateways was reporting a `Remote server rejected web socket: Duplicate connection` error. We haven’t made changes to any of the gateways or added new gateways recently, so I have no idea how it got into this state. To “fix it”, I logged into the main gateway and reset the connection to the remote gateway. Has been running fine since.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [July 15, 2021, 3:45pm UTC](https://forum.inductiveautomation.com/t/programmatically-reset-a-gateway-network-connection/48872/2 "2021-07-15T15:45:51Z")

</div>

I don’t know the answer to your question, but we’ve had this issue too with regular gateways. There are some fixes related to this in one of the latest versions 8.1.7 or 8.1.8.

---

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [February 21, 2024, 1:42pm UTC](https://forum.inductiveautomation.com/t/programmatically-reset-a-gateway-network-connection/48872/3 "2024-02-21T13:42:13Z")

</div>

Does anyone have a solution for this?

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 21, 2024, 4:16pm UTC](https://forum.inductiveautomation.com/t/programmatically-reset-a-gateway-network-connection/48872/4 "2024-02-21T16:16:45Z")

</div>

I'm not aware of a way to reset gateway network connections via scripting, but also haven't run into this problem for a long time. Are you running a current version?

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [February 22, 2024, 1:40am UTC](https://forum.inductiveautomation.com/t/programmatically-reset-a-gateway-network-connection/48872/5 "2024-02-22T01:40:46Z")

</div>

So there is [GatewayNetworkManager](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.33/com/inductiveautomation/ignition/gateway/gan/GatewayNetworkManager.html) object that is accessible via scripting. Maybe start with that and see if any of its methods are able to be used to get a GAN connection and reset it.
