# Unable to disable APM via environment variable

**URL:** <https://discuss.elastic.co/t/unable-to-disable-apm-via-environment-variable/180558>\
**Category:** APM\
**Tags:** java\
**Created:** [May 10, 2019, 12:35pm UTC](https://discuss.elastic.co/t/unable-to-disable-apm-via-environment-variable/180558 "2019-05-10T12:35:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jaks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaks/32/38097_2.png) [@jaks](https://discuss.elastic.co/u/jaks)\
**Post date:** [May 10, 2019, 1:20pm UTC](https://discuss.elastic.co/t/unable-to-disable-apm-via-environment-variable/180558/3 "2019-05-10T13:20:32Z")

</div>

@felixbarny Here are the debug logs,

> 2019-05-10 18:41:26.961 [apm-server-healthcheck] DEBUG co.elastic.apm.agent.report.ApmServerHealthChecker - Starting healthcheck to [http://localhost:8200/](http://localhost:8200/)  
> 2019-05-10 18:41:27.269 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - Found Kubernetes pod UID: 1be1f96c-7325-11e9-bdde-023344833348  
> 2019-05-10 18:41:27.270 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - container ID is 85ff941bd2f32b8cd986cf9608d4236a123180d139564a8fbcd7f17e467e5fe3  
> 2019-05-10 18:41:27.467 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.6.1 as super-user-service on Java 1.8.0\_201 (Oracle Corporation) Linux 4.4.148-k8s  
> 2019-05-10 18:41:27.468 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - active: 'false' (source: Environment Variables)  
> 2019-05-10 18:41:27.468 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - instrument: 'false' (source: Environment Variables)  
> 2019-05-10 18:41:27.468 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - transaction\_sample\_rate: '0.1' (source: [//elasticapm.properties](https://elasticapm.properties))  
> 2019-05-10 18:41:27.468 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - disable\_instrumentations: 'none' (source: [//elasticapm.properties](https://elasticapm.properties))  
> 2019-05-10 18:41:27.468 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - application\_packages: 'com.jay' (source: [//elasticapm.properties](https://elasticapm.properties))  
> 2019-05-10 18:41:27.468 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - log\_level: 'DEBUG' (source: [//elasticapm.properties](https://elasticapm.properties))  
> 2019-05-10 18:41:27.866 [apm-server-healthcheck] WARN co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is not available (Connection refused (Connection refused))  
> 2019-05-10 18:41:28.060 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.ElasticApmApiInstrumentation$StartTransactionInstrumentation  
> 2019-05-10 18:41:28.066 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.ElasticApmApiInstrumentation$StartTransactionWithRemoteParentInstrumentation  
> 2019-05-10 18:41:28.067 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.ElasticApmApiInstrumentation$CurrentTransactionInstrumentation  
> 2019-05-10 18:41:28.067 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.ElasticApmApiInstrumentation$CurrentSpanInstrumentation  
> 2019-05-10 18:41:28.067 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.ElasticApmApiInstrumentation$CaptureExceptionInstrumentation  
> 2019-05-10 18:41:28.067 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.TransactionInstrumentation$SetUserInstrumentation  
> 2019-05-10 18:41:28.067 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.TransactionInstrumentation$EnsureParentIdInstrumentation  
> 2019-05-10 18:41:28.068 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.TransactionInstrumentation$SetResultInstrumentation  
> 2019-05-10 18:41:28.068 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.AbstractSpanInstrumentation$SetNameInstrumentation  
> 2019-05-10 18:41:28.068 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.AbstractSpanInstrumentation$SetTypeInstrumentation  
> 2019-05-10 18:41:28.068 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.AbstractSpanInstrumentation$SetTypesInstrumentation  
> 2019-05-10 18:41:28.068 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying advice co.elastic.apm.agent.plugin.api.AbstractSpanInstrumentation$DoCreateSpanInstrumentation

...

> 2019-05-10 18:41:28.078 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applied 47 advices  
> 2019-05-10 18:41:57.761 [apm-reporter] DEBUG co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Receiving METRICS event (sequence 0)  
> 2019-05-10 18:41:57.761 [apm-reporter] DEBUG co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Starting new request to [http://localhost:8200/intake/v2/events](http://localhost:8200/intake/v2/events)  
> 2019-05-10 18:41:57.762 [apm-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type METRICS with this error: Connection refused (Connection refused)

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-disable-apm-via-environment-variable/180558)._
