# Problem with -javaagent

**URL:** <https://discuss.elastic.co/t/problem-with-javaagent/162150>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [December 26, 2018, 1:34pm UTC](https://discuss.elastic.co/t/problem-with-javaagent/162150 "2018-12-26T13:34:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarahmech](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@sarahmech](https://discuss.elastic.co/u/sarahmech)\
**Post date:** [December 26, 2018, 1:34pm UTC](https://discuss.elastic.co/t/problem-with-javaagent/162150/1 "2018-12-26T13:34:05Z")

</div>

Hi, I have installed the latest version of SELKS, and when I install apm server it appears "You have correctly setup APM Server" and when I start kibana, it says "There's no APM index pattern available. To use the Query bar, please choose to import The APM index pattern in the Setup Instructions "can you help me please?

now, I don't know how to add javaagent!!

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/6/769741fb660334d580afd45c10b0a9cd51bab5b6.png)

---

<div class="post-metadata">

**Author:** ![sarahmech](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@sarahmech](https://discuss.elastic.co/u/sarahmech)\
**Post date:** [December 26, 2018, 4:57pm UTC](https://discuss.elastic.co/t/problem-with-javaagent/162150/2 "2018-12-26T16:57:20Z")

</div>

java -javaagent:/home/selks-user/Downloads/apm-agent-java-0.1.2.jar  
Delastic.apm.service\_name=apm-agent-java-0.1.2.jar Delastic.apm.server\_url=http://localhost:8200 Delastic.apm.application\_packages=org.maven jar apm-agent-java-0.1.2.jar

Failed to find Premain-Class manifest attribute in /home/selks-user/Downloads/apm-agent-java-0.1.2.jar  
Error occurred during initialization of VM  
agent library failed to init: instrument

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [December 27, 2018, 7:13am UTC](https://discuss.elastic.co/t/problem-with-javaagent/162150/3 "2018-12-27T07:13:39Z")

</div>

Hi Sarah,

You might also want to ask this question at the SELKS Github repository : [Issues · StamusNetworks/SELKS · GitHub](https://github.com/StamusNetworks/SELKS/issues). There are higher chances that SELKS users will see your question there.

> [@sarahmech](#):
>
> Failed to find Premain-Class manifest attribute in /home/selks-user/Downloads/apm-agent-java-0.1.2.jar

This usually means that you are using the wrong jar file. Take a look at our [documentation](https://www.elastic.co/guide/en/apm/agent/java/current/intro.html#get-started) for a download link. We have released version `1.2.0` by now, any reason you want to use version `0.1.2` specifically ?

---

<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:** [January 24, 2019, 7:27am UTC](https://discuss.elastic.co/t/problem-with-javaagent/162150/4 "2019-01-24T07:27:24Z")

</div>

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