# Issue with syncthing-gtk on reconnecting to network

**URL:** https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388
**Category:** Support
**Created:** [August 15, 2015, 2:19am UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388 "2015-08-15T02:19:29Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![trusty66](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/b5e925/32.png) [@trusty66](https://forum.syncthing.net/u/trusty66)
#### Post date: [August 15, 2015, 2:19am UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/1 "2015-08-15T02:19:29Z")

</div>

I have recently started using syncthing-gtk for its inotify support and started noticing few issues. I have a desktop & a laptop, both running Linux Mint 64 bit with syncthing-gtk. I have several folders shared between them. The desktop has public ip address and is almost always on and connected to network. The laptop is my portable computer and keeps hopping between wi-fi connections and dropping/reconnecting connections… you know the regular laptop stuff.

I started noticing, quite a few times, when I would reconnect laptop to a new wifi network (like my home network after work), syncthing-gtk would still show desktop to be disconnected. It does not change, no matter how long I wait (2-3 hours). I also noticed the same behavior when my laptop comes out of sleep-mode on the same network (syncthing-gtk was connected before going to sleep). I tried looking into the logs and found this line:

> I DaemonProcess Subprocess exited with code 3

Restarting the daemon fixed the problem every single time. Is this something known? I am using v0.7.4.1 (Daemon v0.11.18) from PPA.

I was using the core Syncthing for a couple of months before this and had very smooth and nice experience and never had this type of issue, no matter how many time I would reconnect to network.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [August 15, 2015, 9:23am UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/2 "2015-08-15T09:23:13Z")

</div>

> [@trusty66](#):
>
> I DaemonProcess Subprocess exited with code 3

Syncthing restarts when it has detected waking from sleep, because everything around it may have changed. The exit code 3 indicates this happening. Normally Syncthing manages restarts internally, but in this case Syncthing-GTK may have disabled that and needs to restart Syncthing itself… Maybe that’s not happening?

---

<div class="post-metadata">

### Author: ![trusty66](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/b5e925/32.png) [@trusty66](https://forum.syncthing.net/u/trusty66)
#### Post date: [August 18, 2015, 2:37am UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/3 "2015-08-18T02:37:38Z")

</div>

I also just noticed something else in the same context. After reconnecting to my home network after a sleep, syncthing-gtk showed that some of the shares were disconnected. However, when I checked the syncthing web-gui, it showed everything was connected. I also checked other devices after remotely logging in - they also showed that my laptop was connected.

Following screenshot was taken after waiting for 10 minutes for syncthing-gtk to update the GUI.

 ![](https://forum-uploads.syncthingcdn.net/original/2X/2/2f5f2f3f5e564d87e7556dd856a71d8f38a92249.jpg)

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [August 18, 2015, 8:33am UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/4 "2015-08-18T08:33:38Z")

</div>

Please open one issue per problem at [https://github.com/syncthing/syncthing-gtk/issues](https://github.com/syncthing/syncthing-gtk/issues).

---

<div class="post-metadata">

### Author: ![trusty66](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/b5e925/32.png) [@trusty66](https://forum.syncthing.net/u/trusty66)
#### Post date: [August 21, 2015, 3:20am UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/5 "2015-08-21T03:20:14Z")

</div>

Done: [https://github.com/syncthing/syncthing-gtk/issues/189](https://github.com/syncthing/syncthing-gtk/issues/189)

---

<div class="post-metadata">

### Author: ![kozec](https://forum.syncthing.net/user_avatar/forum.syncthing.net/kozec/32/4616_2.png) [@kozec](https://forum.syncthing.net/u/kozec)
#### Post date: [August 23, 2015, 10:49pm UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/6 "2015-08-23T22:49:23Z")

</div>

I’m sorry, but could you, please, explain me under what condition this happens? Or point me to docs or code that handles it 😃

I’m sitting here over my laptop and I’ve tried everything from SIGSTOP to full hibernation and I can’t replicate main problem nor make daemon exit with code 3.

---

<div class="post-metadata">

### Author: ![Zillode](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/z/c67d28/32.png) [@Zillode](https://forum.syncthing.net/u/Zillode)
#### Post date: [August 24, 2015, 5:54am UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/7 "2015-08-24T05:54:00Z")

</div>

You’ll need to be in standby for at least [2 minutes](https://github.com/syncthing/syncthing/blob/98effcd8e3756ab72536c1943885a244b711e7df/cmd/syncthing/main.go#L1026).

---

<div class="post-metadata">

### Author: ![kozec](https://forum.syncthing.net/user_avatar/forum.syncthing.net/kozec/32/4616_2.png) [@kozec](https://forum.syncthing.net/u/kozec)
#### Post date: [August 24, 2015, 7:44pm UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/8 "2015-08-24T19:44:52Z")

</div>

Ok, thanks. I’ve verified that ST-GTK can handle all kinds of restart that daemon can throw at it.

_But._ This most likely happens when syncthing daemon manages to restart so fast that ST-GTK doesn’t even notice it wasn’t there. That shouldn’t usually happen, but it is possible especially when everything is lagging after hibernation.

Now another stupid question: Is there any _reliable_ way how to tell that syncthing instance I’m talking right now is not same instance I talked 10s ago? I can monitor event IDs and handle when they go backwards, but that’s not entirely reliable thing.

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [August 24, 2015, 7:48pm UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/9 "2015-08-24T19:48:04Z")

</div>

Event IDs moving backwards, yep. To be fair, you need to catch skips in event IDs anyway, so it’s not much more effort.

Aren’t you running Syncthing with `-no-restart`? If you’re doing that, it will ask to be restarted, and it’s up to you to restart it, so you’ll definitely know it’s been restarted…

---

<div class="post-metadata">

### Author: ![kozec](https://forum.syncthing.net/user_avatar/forum.syncthing.net/kozec/32/4616_2.png) [@kozec](https://forum.syncthing.net/u/kozec)
#### Post date: [August 24, 2015, 7:53pm UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/10 "2015-08-24T19:53:22Z")

</div>

I’m setting STNORESTART. Is that any different from `-no-restart` ?

//edit: It probably[[1]](https://github.com/syncthing/syncthing/blob/98effcd8e3756ab72536c1943885a244b711e7df/cmd/syncthing/main.go#L205) shouldn’t[[2]](https://github.com/syncthing/syncthing/blob/98effcd8e3756ab72536c1943885a244b711e7df/cmd/syncthing/main.go#L235) be.

---

<div class="post-metadata">

### Author: ![canton7](https://forum.syncthing.net/user_avatar/forum.syncthing.net/canton7/32/9528_2.png) [@canton7](https://forum.syncthing.net/u/canton7)
#### Post date: [August 24, 2015, 8:36pm UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/11 "2015-08-24T20:36:33Z")

</div>

Yeah that’s no different. How is Syncthing managing to restart more quickly than you can notice, given that you’re the one restarting it?

---

<div class="post-metadata">

### Author: ![kozec](https://forum.syncthing.net/user_avatar/forum.syncthing.net/kozec/32/4616_2.png) [@kozec](https://forum.syncthing.net/u/kozec)
#### Post date: [August 24, 2015, 8:37pm UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/12 "2015-08-24T20:37:28Z")

</div>

Syncthing-GTK can handle both daemon running under it and daemon running separately, for example as system service. In 2nd case, restart is handled by service manager or by Syncthing itself.

---

<div class="post-metadata">

### Author: ![trusty66](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/b5e925/32.png) [@trusty66](https://forum.syncthing.net/u/trusty66)
#### Post date: [August 25, 2015, 7:20am UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/13 "2015-08-25T07:20:04Z")

</div>

> [@kozec](#):
>
> I’m sitting here over my laptop and I’ve tried everything from SIGSTOP to full hibernation and I can’t replicate main problem nor make daemon exit with code 3.

I am not familiar with lots of details which is being discussed above. But it has been really easy for me to replicate the issue:

- Make sure my laptop is connected to network and syncthing-gtk is running (and showing all devices as online).
- Close the laptop lid, which is set to put the laptop on “Suspend”.
- Go get some snacks and come back later in 10-15 minutes. I don’t have to even move the laptop.
- Open the laptop lid, enter login password. Open syncthing-gtk - It shows most devices to be disconnected. A couple of times, but not always, my phone shows up as connected, which is usually connected the same wifi network. Few times, when I am too fast to open syncthing-gtk, it will initially show everything as connected (which might be related to older information before laptop was suspended?) and then moments later updates to disconnected.
- Open the local web gui, enter password. Every thing shows up as connected.
- Open a remote web gui, enter password. Every thing shows up as connected. I can even update a file on local/remote and it syncs!
- Syncthing-gtk still shows the remote as disconnected. However, top right box shows updated information, eg Upload/Download rate when a (big) file is being synced.
- Restart daemon and everything shows up as connected in few seconds.

I am using Linux Mint 17.2 Rafaela 64-bit with Mate 1.10.0 (Kernel: Linux 3.16.0-38-generic x86\_64). Syncthing-GTK: v0.7.4.1 (Daemon v0.11.20).

---

<div class="post-metadata">

### Author: ![mac\_linux\_free](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/m/b19c9b/32.png) [@mac\_linux\_free](https://forum.syncthing.net/u/mac_linux_free)
#### Post date: [March 7, 2016, 9:58pm UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/14 "2016-03-07T21:58:58Z")

</div>

same to me…still

but I´m using manjaro cinnamon.

I need a “network-change-syncthing-restart”-logic 🙂

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [May 12, 2017, 1:08pm UTC](https://forum.syncthing.net/t/issue-with-syncthing-gtk-on-reconnecting-to-network/5388/15 "2017-05-12T13:08:52Z")

</div>


