Online => offline, is it back again?

Wed Aug 07 2013 20:54:15 GMT+0200 (West-Europa (zomertijd)): Agent softwareversion: 77f1c31 - jenkins-ei-release-branch-819 - Mon Aug 5 15:23:48 2013
Wed Aug 07 2013 20:54:15 GMT+0200 (West-Europa (zomertijd)): Device booting
Wed Aug 07 2013 20:54:15 GMT+0200 (West-Europa (zomertijd)): Device configured to be "001 NetIO"
Wed Aug 07 2013 20:54:16 GMT+0200 (West-Europa (zomertijd)): Device softwareversion: 0e967a4 - Fri Jul 19 10:04:28 2013
Wed Aug 07 2013 21:03:36 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Wed Aug 07 2013 21:28:49 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Wed Aug 07 2013 21:28:49 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Wed Aug 07 2013 21:47:19 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Wed Aug 07 2013 21:50:01 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Wed Aug 07 2013 21:50:01 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Wed Aug 07 2013 21:59:31 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Wed Aug 07 2013 22:28:29 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Wed Aug 07 2013 22:28:29 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Wed Aug 07 2013 22:46:59 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Wed Aug 07 2013 23:04:43 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Wed Aug 07 2013 23:04:43 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Wed Aug 07 2013 23:14:13 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Wed Aug 07 2013 23:39:26 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Wed Aug 07 2013 23:39:26 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Wed Aug 07 2013 23:48:56 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 00:10:25 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 00:10:25 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 00:19:55 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 00:20:51 GMT+0200 (West-Europa (zomertijd)): Path OK: : /NetIO/
Thu Aug 08 2013 00:20:51 GMT+0200 (West-Europa (zomertijd)): request.body:
Thu Aug 08 2013 00:20:51 GMT+0200 (West-Europa (zomertijd)): request.query: (table : 0x0x7f2f84a67820)
Thu Aug 08 2013 00:20:51 GMT+0200 (West-Europa (zomertijd)): request.method: GET
Thu Aug 08 2013 00:20:51 GMT+0200 (West-Europa (zomertijd)): request.path: /NetIO/
Thu Aug 08 2013 00:20:51 GMT+0200 (West-Europa (zomertijd)): request.headers: (table : 0x0x7f2f85147160)
Thu Aug 08 2013 00:20:51 GMT+0200 (West-Europa (zomertijd)): something is trying to connect…
Thu Aug 08 2013 00:40:09 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 00:40:09 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 00:49:39 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 01:09:52 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 01:09:52 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 01:19:22 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 01:45:54 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 01:45:54 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 01:55:24 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 02:24:22 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 02:24:22 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 02:33:52 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 03:02:49 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 03:02:50 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 03:12:20 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 03:41:17 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 03:41:18 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 03:50:48 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 04:19:45 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 04:19:46 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 04:29:16 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 04:58:13 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 04:58:13 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 05:16:44 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 05:45:42 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 05:45:42 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 05:55:13 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 06:24:11 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 06:24:11 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 06:33:41 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 07:00:11 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 07:00:12 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 07:10:48 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 07:20:18 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 07:49:32 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 07:49:33 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 08:08:03 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline
Thu Aug 08 2013 08:30:46 GMT+0200 (West-Europa (zomertijd)): Power state: offline=>online
Thu Aug 08 2013 08:30:46 GMT+0200 (West-Europa (zomertijd)): Reconnected after unexpected disconnect
Thu Aug 08 2013 08:40:16 GMT+0200 (West-Europa (zomertijd)): Power state: online=>offline

When this happens the green blink-up LED keeps blinking, Agent keeps running and with a http.request event it is logging while it says it is offline.
I can’t upload/run new code although the build version is incrementing

Looks like there are some network problems; your code looks ok. Any change in your router setup or wifi environment near you? The offline->online indication is when the server has sent your imp a ping and the imp has not responded.

Your code is doing 30s connection attempts every 2 minutes, so should be getting back online (even if you had a strange nat timeout issue) quicker than this - note that you do have a minimum offline time of 2 minutes because you don’t immediately try to kick off a connection when you get an offline notification. Was that intentional or a bug?

Also, you’re never starting your watchdog… you shouldn’t need one, but it’s in your code and not being called.

We just found a regression with the server-side connection maintenance that would have affected routers with very short NAT timeouts; see if it’s behaving better now?

I am able to upload new code now. Bit strange though, I have 3 imps here, running different code and this is the only one acting like this.

All on the same router? Ok, that’s rather freaky…

yes they are.
that 120 seconds delay was just copied from the example

Up till now it looks like the problem has been solved…