diff --git a/agent.py b/agent.py index e26cf73349..1a2c075c3f 100755 --- a/agent.py +++ b/agent.py @@ -345,9 +345,12 @@ def run(self, config=None): self._agentConfig).crawl_config_template() # JMXFetch restarts should prompt reload - jmx_launch = JMXFetch._get_jmx_launchtime() - if self.last_jmx_piped and self.last_jmx_piped < jmx_launch: - self.sd_backend.reload_check_configs = True + try: + jmx_launch = JMXFetch._get_jmx_launchtime() + if self.last_jmx_piped and self.last_jmx_piped < jmx_launch: + self.sd_backend.reload_check_configs = True + except OSError as e: + log.debug("could not stat JMX lunch file: %s", e) except Exception as e: log.warn('Something went wrong while looking for config template changes: %s' % str(e))