Agent library failed to init: instrument

762 views
Skip to first unread message

Paras Vishnoi

unread,
Nov 9, 2017, 2:30:09 AM11/9/17
to Prometheus Users
I'm trying to bring up cassandra docker image with jmx-exporter. 
While everything runs fine if I don't put the below line:

#RUN echo 'JVM_OPTS="$JVM_OPTS -javaagent:/jmx_prometheus_javaagent-0.5.jar=7070:/prometheus_cassandra.yml"' >> /etc/cassandra/conf/cassandra-env.sh


As soon as I uncomment the above line and run the same docker image after building, I get the following error:

Configuring Cassandra to listen at 172.17.0.3 with seeds 172.17.0.3

sed: -e expression #1, char 48: unknown option to `s'

Starting Cassandra on 172.17.0.3...

2017-11-09 07:20:36,220 CRIT Supervisor running as root (no user in config file)

2017-11-09 07:20:36,227 INFO supervisord started with pid 40

2017-11-09 07:20:37,231 INFO spawned: 'cassandraCustodian' with pid 43

2017-11-09 07:20:37,236 INFO spawned: 'cassandra' with pid 44

Error occurred during initialization of VM

agent library failed to init: instrument

2017-11-09 07:20:37,423 INFO exited: cassandra (exit status 1; not expected)


Any help is appreciated. Has been struggling with this issue for quite some time.

The docker file is provided in the attachment in case if anyone wants to have a look.

P.S. : I am using a custom cassandra image called df-custodian where I have put some manual steps for seed nodes manipulation. The custom cassandra jar has been working perfectly with the exported.




Dockerfile

Brian Brazil

unread,
Nov 9, 2017, 2:59:55 AM11/9/17
to Paras Vishnoi, Prometheus Users
On 9 November 2017 at 07:30, Paras Vishnoi <para...@gmail.com> wrote:
I'm trying to bring up cassandra docker image with jmx-exporter. 
While everything runs fine if I don't put the below line:

#RUN echo 'JVM_OPTS="$JVM_OPTS -javaagent:/jmx_prometheus_javaagent-0.5.jar=7070:/prometheus_cassandra.yml"' >> /etc/cassandra/conf/cassandra-env.sh


As soon as I uncomment the above line and run the same docker image after building, I get the following error:

Configuring Cassandra to listen at 172.17.0.3 with seeds 172.17.0.3

sed: -e expression #1, char 48: unknown option to `s'

Starting Cassandra on 172.17.0.3...

2017-11-09 07:20:36,220 CRIT Supervisor running as root (no user in config file)

2017-11-09 07:20:36,227 INFO supervisord started with pid 40

2017-11-09 07:20:37,231 INFO spawned: 'cassandraCustodian' with pid 43

2017-11-09 07:20:37,236 INFO spawned: 'cassandra' with pid 44

Error occurred during initialization of VM

agent library failed to init: instrument

2017-11-09 07:20:37,423 INFO exited: cassandra (exit status 1; not expected)


Any help is appreciated. Has been struggling with this issue for quite some time.

The docker file is provided in the attachment in case if anyone wants to have a look.

Have you tried this without Docker? I'd guess it's an issue with the config file.

Brian
 

P.S. : I am using a custom cassandra image called df-custodian where I have put some manual steps for seed nodes manipulation. The custom cassandra jar has been working perfectly with the exported.




--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/86452c3f-0fe6-4fd1-b082-f7b50917eb7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Paras Vishnoi

unread,
Nov 9, 2017, 3:10:56 AM11/9/17
to Prometheus Users
Yes I have tried this without docker and the exporter seems to be working along with cassandra. I have used below command to run it independently:


java -javaagent:./jmx_prometheus_javaagent-0.5.jar=7070:prometheus_cassandra.yml -jar ./dfcassandracustodian/target/df-cassandra-custodian-1.2-SNAPSHOT.jar


I went through the Docker multiple times but couldn't find any issue. Can you point out the statements which looks suspicious to you?


On Thursday, November 9, 2017 at 1:29:55 PM UTC+5:30, Brian Brazil wrote:
On 9 November 2017 at 07:30, Paras Vishnoi <para...@gmail.com> wrote:
I'm trying to bring up cassandra docker image with jmx-exporter. 
While everything runs fine if I don't put the below line:

#RUN echo 'JVM_OPTS="$JVM_OPTS -javaagent:/jmx_prometheus_javaagent-0.5.jar=7070:/prometheus_cassandra.yml"' >> /etc/cassandra/conf/cassandra-env.sh


As soon as I uncomment the above line and run the same docker image after building, I get the following error:

Configuring Cassandra to listen at 172.17.0.3 with seeds 172.17.0.3

sed: -e expression #1, char 48: unknown option to `s'

Starting Cassandra on 172.17.0.3...

2017-11-09 07:20:36,220 CRIT Supervisor running as root (no user in config file)

2017-11-09 07:20:36,227 INFO supervisord started with pid 40

2017-11-09 07:20:37,231 INFO spawned: 'cassandraCustodian' with pid 43

2017-11-09 07:20:37,236 INFO spawned: 'cassandra' with pid 44

Error occurred during initialization of VM

agent library failed to init: instrument

2017-11-09 07:20:37,423 INFO exited: cassandra (exit status 1; not expected)


Any help is appreciated. Has been struggling with this issue for quite some time.

The docker file is provided in the attachment in case if anyone wants to have a look.

Have you tried this without Docker? I'd guess it's an issue with the config file.

Brian
 

P.S. : I am using a custom cassandra image called df-custodian where I have put some manual steps for seed nodes manipulation. The custom cassandra jar has been working perfectly with the exported.




--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.



--

Brian Brazil

unread,
Nov 9, 2017, 3:18:48 AM11/9/17
to Paras Vishnoi, Prometheus Users
On 9 November 2017 at 08:10, Paras Vishnoi <para...@gmail.com> wrote:
Yes I have tried this without docker and the exporter seems to be working along with cassandra. I have used below command to run it independently:

I'd check file permissions on the config file.

Brian
 
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/f4b69809-455b-41a4-9816-e61f401e4d61%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Paras Vishnoi

unread,
Nov 9, 2017, 3:47:56 AM11/9/17
to Prometheus Users
Got it working.

I was using,


However when I replaced the wget with ADD of docker file it seemed to work fine. I think docker treats jar files as special files.

I used below command,




--
Reply all
Reply to author
Forward
0 new messages