# APM Agent not work

**URL:** <https://discuss.elastic.co/t/apm-agent-not-work/145632>\
**Category:** APM\
**Created:** [August 23, 2018, 3:04am UTC](https://discuss.elastic.co/t/apm-agent-not-work/145632 "2018-08-23T03:04:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terry\_Xia](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Terry\_Xia](https://discuss.elastic.co/u/Terry_Xia)\
**Post date:** [August 23, 2018, 3:04am UTC](https://discuss.elastic.co/t/apm-agent-not-work/145632/1 "2018-08-23T03:04:04Z")

</div>

Hello Elastic Team:  
We have implemented Java Agent with our springboot applicatiions  
Springboot : 1.5.10  
Java: 1.8.0\_161  
APM Server : 6.3  
APM Agent : 0.6  
I place my envset.sh in this path : /home/pengx/APM/apm-agent-0.6.0，  
the file is as follows:  
export CATALINA\_OPTS="$CATALINA\_OPTS -javaagent:/home/pengx/APM/apm-agent-0.6.0/elastic-apm-agent-0.6.0.jar"

I palce my elasticapm.properties in the same directory the agent jar resides in :  
The configuration file is as follows:

-Delastic.apm.service\_name=springboot-properties-service  
-Delastic.apm.application\_packages=com.yiz  
-Delastic.apm.server\_url=http://localhost:8200  
-Delastic.apm.logging.log\_level=DEBUG  
-Delastic.apm.active=true  
-Delastic.apm.logging.log\_file=/home/pengx/APM/apm-agent-0.6.0/apm-agent.log

We start the application and then we are getting the below warn in our logs:

2018-08-22 16:30:04.153 [main] WARN co.elastic.apm.impl.ElasticApmTracerBuilder - Missing required value for configuration option service\_name  
2018-08-22 16:30:04.916 [main] INFO co.elastic.apm.configuration.StartupInfo - Starting Elastic APM 0.6.0 on Java 1.8.0\_161 (Oracle Corporation) Linux 4.15.0-32-generic

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/e/ae6f1cf316e2bfbc8598f256e49d869c90a20ef8.png)

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [August 23, 2018, 3:21am UTC](https://discuss.elastic.co/t/apm-agent-not-work/145632/2 "2018-08-23T03:21:14Z")

</div>

Hi Terry, thanks for trying out Elastic APM!

Please try changing the contents of your `elasticapm.properties` file to the following:

```
elastic.apm.service_name=springboot-properties-service
elastic.apm.application_packages=com.yiz
elastic.apm.server_url=http://localhost:8200
elastic.apm.logging.log_level=DEBUG
elastic.apm.active=true
elastic.apm.logging.log_file=/home/pengx/APM/apm-agent-0.6.0/apm-agent.log

```

The `-D` prefix is only required when passing properties to the JVM via the command line.

Cheers,  
Andrew

---

<div class="post-metadata">

**Author:** ![Terry\_Xia](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Terry\_Xia](https://discuss.elastic.co/u/Terry_Xia)\
**Post date:** [August 23, 2018, 3:44am UTC](https://discuss.elastic.co/t/apm-agent-not-work/145632/3 "2018-08-23T03:44:34Z")

</div>

Hi Andrew:  
Thanks for your reply ，I change the contents of my elasticapm.properties as you suggested，now the file is as follows:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/9/39da7fdc31f99d9339d610970d9bb8e84d82f6e4.png)  
then,I start my application and also getting the same warn info in our logs:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/3/c37d58cc6b591f2c56350c0e14cde6714cb27d47.png)  
and other suggestion?

Best wishes!

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [August 23, 2018, 4:21am UTC](https://discuss.elastic.co/t/apm-agent-not-work/145632/4 "2018-08-23T04:21:37Z")

</div>

Sorry, according to the [configuraton documentation](https://www.elastic.co/guide/en/apm/agent/java/current/configuration.html):

> You can place a `elasticapm.properties` in the same directory the agent jar resides in. No prefix is required for the configuration keys.

I missed that last sentence before. Change the file contents so the keys don't have the "elastic.apm." prefix, i.e.

```
service_name=springboot-properties-service
application_packages=com.yiz
server_url=http://localhost:8200
logging.log_level=DEBUG
active=true
logging.log_file=/home/pengx/APM/apm-agent-0.6.0/apm-agent.log

```

Hope that helps.

---

<div class="post-metadata">

**Author:** ![Terry\_Xia](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Terry\_Xia](https://discuss.elastic.co/u/Terry_Xia)\
**Post date:** [August 23, 2018, 5:36am UTC](https://discuss.elastic.co/t/apm-agent-not-work/145632/5 "2018-08-23T05:36:49Z")

</div>

Wow! The problem has been solved!  
Change the file contents so the keys don't have the "elastic.apm." prefix, i.e is right!

Cheers!

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [August 23, 2018, 7:15am UTC](https://discuss.elastic.co/t/apm-agent-not-work/145632/6 "2018-08-23T07:15:00Z")

</div>

I have just updated the documentation and tried to be more clear there. Btw, there is already a newer verison, 0.6.2, which contains some important bug fixes.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 13, 2018, 3:15am UTC](https://discuss.elastic.co/t/apm-agent-not-work/145632/7 "2018-09-13T03:15:03Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
