# How to force the Gateway to map drives when there is a failed attempt at restart

**URL:** <https://forum.inductiveautomation.com/t/how-to-force-the-gateway-to-map-drives-when-there-is-a-failed-attempt-at-restart/65929>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [November 1, 2022, 2:57pm UTC](https://forum.inductiveautomation.com/t/how-to-force-the-gateway-to-map-drives-when-there-is-a-failed-attempt-at-restart/65929 "2022-11-01T14:57:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![francois.morin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/francois.morin/32/15064_2.png) [@francois.morin](https://forum.inductiveautomation.com/u/francois.morin)\
**Post date:** [November 1, 2022, 2:57pm UTC](https://forum.inductiveautomation.com/t/how-to-force-the-gateway-to-map-drives-when-there-is-a-failed-attempt-at-restart/65929/1 "2022-11-01T14:57:10Z")

</div>

This week-end the Ignition Gateway server rebooted after windows updates.  
At reboot, the gateway failed to map a drive to a remote server (maybe because it was rebooting too)

Is there a way to force the gateway to try remap the drive manually without restarting the entire gateway ?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [November 1, 2022, 3:25pm UTC](https://forum.inductiveautomation.com/t/how-to-force-the-gateway-to-map-drives-when-there-is-a-failed-attempt-at-restart/65929/2 "2022-11-01T15:25:32Z")

</div>

The manual shows configurations for the number of retries to allow, as well as the time to wait between retries. Do you have those configured? If so what are they?

I would expect there to be information in the Wrapper log indicating why the drive failed to map.

[https://docs.inductiveautomation.com/display/DOC81/Mapping+a+Network+Drive](https://docs.inductiveautomation.com/display/DOC81/Mapping+a+Network+Drive)

Once you're out of retries I don't believe there is a way to force one aside from restarting the gateway service.

---

<div class="post-metadata">

**Author:** ![francois.morin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/francois.morin/32/15064_2.png) [@francois.morin](https://forum.inductiveautomation.com/u/francois.morin)\
**Post date:** [November 1, 2022, 5:51pm UTC](https://forum.inductiveautomation.com/t/how-to-force-the-gateway-to-map-drives-when-there-is-a-failed-attempt-at-restart/65929/3 "2022-11-01T17:51:53Z")

</div>

Thanks.

The error in the wrapper log confirm that the source server was not available.  
The retry parameters were not set so I did add the following configuration to the config

```auto
wrapper.share.1.shutdown.unmap=TRUE
wrapper.share.1.startup.max_retries=15
#retry Interval is in seconds
wrapper.share.1.startup.retry_interval=60
#Shutdown the gateway if the network is not available after the next 15 minutes
wrapper.share.1.startup.failure=SHUTDOWN

```

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [November 15, 2022, 4:06pm UTC](https://forum.inductiveautomation.com/t/how-to-force-the-gateway-to-map-drives-when-there-is-a-failed-attempt-at-restart/65929/4 "2022-11-15T16:06:54Z")

</div>

I too would like to know if there is a way to do this programatically.

I have an Ignition system in charge of making backups of various programs and storing them on a mapped drive. Every so often it loses connection with that mapped drive and then backups are not made until Ignition is restarted.

What would be really cool is if in my `except` clause of the backup script I can examine if the error is the mapped drive not being able to be seen by Ignition and if so I can attempt to remap it then and there programatically so that next backup at least works.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 15, 2022, 6:04pm UTC](https://forum.inductiveautomation.com/t/how-to-force-the-gateway-to-map-drives-when-there-is-a-failed-attempt-at-restart/65929/5 "2022-11-15T18:04:28Z")

</div>

At most, you could perhaps capture the exit code of the service wrapper?  
[https://wrapper.tanukisoftware.com/doc/english/props-nt.html](https://wrapper.tanukisoftware.com/doc/english/props-nt.html)
