File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 4
4
"""
5
5
from __future__ import absolute_import
6
6
7
- import json
8
7
import os
8
+ import json
9
+ import urllib3
10
+ import requests
9
11
from datetime import datetime
10
12
11
13
from ..log import logger
@@ -230,6 +232,10 @@ def report_data_payload(self, payload):
230
232
# The host agent returned something indicating that is has a request for us that we
231
233
# need to process.
232
234
self .handle_agent_tasks (json .loads (response .content )[0 ])
235
+ except requests .exceptions .ConnectionError :
236
+ pass
237
+ except urllib3 .exceptions .MaxRetryError :
238
+ pass
233
239
except Exception as exc :
234
240
logger .debug ("report_data_payload: Instana host agent connection error (%s)" , type (exc ), exc_info = True )
235
241
return response
Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ def prepare_and_report_data(self):
42
42
self .agent .machine .fsm .ready ()
43
43
else :
44
44
return
45
+
46
+ if self .agent .machine .fsm .current == "good2go" and self .agent .is_timed_out ():
47
+ logger .info ("The Instana host agent has gone offline or is no longer reachable for > 1 min. Will retry periodically." )
48
+ self .agent .reset ()
45
49
except Exception :
46
50
logger .debug ('Harmless state machine thread disagreement. Will self-correct on next timer cycle.' )
47
51
You can’t perform that action at this time.
0 commit comments