Failed to find Premain-Class manifest attribute

Hi,
I am setting up with elastic java apm
And here are my configurations.

        ELK version 6.5.4
        APM Server version 6.5.4   
       apm-agent-attach-1.5.0.jar

When I try to run a java code I get the following error.

Failed to find Premain-Class manifest attribute in /home/abc/Desktop/apm-agent-attach-1.5.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument

Kindly help.

It seems you are trying to install the agent using the -javaagent startup flag, while referring to the attach jar, instead of the elastic-apm-agent-<version>.jar.
Please read through our documentation regarding the different setup options.

I have downloaded the elastic-apm-agent-1.5.0
But while running a java code I am facing problem its giving the following error.

Failed to find Premain-Class manifest attribute in /home/abc/Desktop/apm-agent-attach-1.5.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument

I made .war file of java code.
Can I run .war file from terminal.

You need a running Java app. If it is running on one of the supported app servers, follow setup instructions. Otherwise, go over installation options and manual tracing API to review your options.

okay
Thank you.
In case of any doubt I'll revert you back.

Earlier it was working fine but now I am getting the error whenever I try to run apm server.

|2019-06-04T13:24:02.531+0530|INFO|pipeline/output.go:105|Connection to backoff(elasticsearch(http://172.25.8.45:9200)) established
|2019-06-04T13:24:04.136+0530|ERROR|pipeline/output.go:121|Failed to publish events: temporary bulk send failure|
|2019-06-04T13:24:04.136+0530|INFO|pipeline/output.go:95|Connecting to backoff(elasticsearch(http://172.25.8.45:9200))|
|2019-06-04T13:24:04.140+0530|INFO|elasticsearch/client.go:729|Connected to Elasticsearch version 6.7.0|
|2019-06-04T13:24:04.145+0530|INFO|template/load.go:128|Template already exists and will not be overwritten.|
|2019-06-04T13:24:04.145+0530|INFO|instance/beat.go:890|Template successfully loaded.|

Kindly guide.

Could you set the log level on the server to debug to find more information about why publishing events fails.

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