question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suddenly getting "Offline request detected"

See original GitHub issue

This issue seems similar to #7 , but I have been unable to resolve it.

When I try to launch the trafficLight.py script from the greengrass samples, using my own Thing, I keep getting the following: key ExampleBlower.private.key --thingName ExampleBlower --clientId ExampleBlower Greengrass core has already been discovered. GGC Host Address: 192.168.13.75 GGC Group CA Path: ./groupCA/root-ca.crt Private Key of trafficLight thing Path: ExampleBlower.private.key Certificate of trafficLight thing Path: ExampleBlower.cert.pem Client ID(thing name for trafficLight): ExampleBlower Target shadow thing ID(thing name for trafficLight): ExampleBlower 2018-09-04 17:39:17,868 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - MqttCore initialized 2018-09-04 17:39:17,870 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Client id: ExampleBlower 2018-09-04 17:39:17,871 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Protocol version: MQTTv3.1.1 2018-09-04 17:39:17,873 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Authentication type: TLSv1.2 certificate based Mutual Auth. 2018-09-04 17:39:17,874 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Configuring offline requests queueing: max queue size: 0 2018-09-04 17:39:17,875 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Configuring offline requests queue draining interval: 0.100000 sec 2018-09-04 17:39:17,876 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Configuring endpoint... 2018-09-04 17:39:17,878 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Configuring certificates... 2018-09-04 17:39:17,879 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Configuring reconnect back off timing... 2018-09-04 17:39:17,880 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Base quiet time: 1.000000 sec 2018-09-04 17:39:17,881 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Max quiet time: 32.000000 sec 2018-09-04 17:39:17,883 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Stable connection time: 20.000000 sec 2018-09-04 17:39:17,884 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Configuring connect/disconnect time out: 10.000000 sec 2018-09-04 17:39:17,887 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Configuring MQTT operation time out: 5.000000 sec 2018-09-04 17:39:17,888 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Performing sync connect... 2018-09-04 17:39:17,889 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Performing async connect... 2018-09-04 17:39:17,891 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Keep-alive: 600.000000 sec 2018-09-04 17:39:18,054 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Performing sync subscribe... 2018-09-04 17:39:18,054 - AWSIoTPythonSDK.core.protocol.mqtt_core - INFO - Offline request detected! 2018-09-04 17:39:18,055 - AWSIoTPythonSDK.core.protocol.mqtt_core - ERROR - Offline request queue has been disabled Traceback (most recent call last): File "trafficLight.py", line 232, in <module> deviceShadowHandler.shadowRegisterDeltaCallback(customShadowCallback_Delta) File "C:\Users\acoulson\AppData\Local\Programs\Python\Python37\lib\site-packages\AWSIoTPythonSDK\core\shadow\deviceShadow.py", line 398, in shadowRegisterDelt aCallback self._shadowManagerHandler.basicShadowSubscribe(self._shadowName, "delta", self.generalCallback) File "C:\Users\acoulson\AppData\Local\Programs\Python\Python37\lib\site-packages\AWSIoTPythonSDK\core\shadow\shadowManager.py", line 68, in basicShadowSubscri be self._mqttCoreHandler.subscribe(currentShadowAction.getTopicDelta(), 0, srcCallback) File "C:\Users\acoulson\AppData\Local\Programs\Python\Python37\lib\site-packages\AWSIoTPythonSDK\core\protocol\mqtt_core.py", line 295, in subscribe self._handle_offline_request(RequestTypes.SUBSCRIBE, (topic, qos, message_callback)) File "C:\Users\acoulson\AppData\Local\Programs\Python\Python37\lib\site-packages\AWSIoTPythonSDK\core\protocol\mqtt_core.py", line 366, in _handle_offline_req uest raise self._offline_request_queue_disabled_exceptions[type] AWSIoTPythonSDK.exception.AWSIoTExceptions.subscribeQueueDisabledException

I understand this may be due to the client not being connected when the shadow delta subscription is performed, but I don’t understand why the client would be disconnected - this is the unmodified sample code. I am currently only connecting with a single client. I have even completely re-built the thing, downloaded new cert & key, rebuilt the core and re-deployed. Same error. Is there any way to troubleshoot why the disconnect might be happening?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
goliatonecommented, Nov 17, 2018

Just as a reference for those landing here through a search engine, I had the same issue and solved it by changing the attached policy to something more permissive and in my case that enabled my device to communicate successfully.

1reaction
JonathanHensoncommented, Sep 5, 2018

Theres a couple of things going on here, most of which we’d need a packet trace to track down.

One possibility is that authentication is failing at the server. Have you checked the policy configuration for your certificate?

Another possibility is that your connection is being lost in a firewall somewhere. Have you verified the traffic can get through to the configured port?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Switch from working offline to online - Microsoft Support
Reset the Work Offline status​​ On the Send/Receive tab, choose Work Offline, and check your status bar. If the status shows Working Offline,...
Read more >
Fixing Your Devices Falling Offline Repeatedly by Adjusting ...
If your devices are continually falling offline, the problem is almost always related to poor wifi connectivity caused by signal fluctuations, channel ...
Read more >
Fix your Google Nest Wifi or Google Wifi network
Follow these troubleshooting steps to fix: Google Nest Wifi router or point or Google Wifi point shows offline in mesh test; Can't connect...
Read more >
My camera has gone offline. How do I get it back online?
If the camera is still offline, there may be a problem with your ... 11 out of 39 found this helpful. Have more...
Read more >
How to Fix Going Offline Printing Error - HP Support
Learn how to fix printer offline problem and other errors related to printers going offline quickly with HP automated tools and our Virtual...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found