Hi all,
We have a product built over Spray server, we integrated Kamon and all runs well on our developement machines, however, when packaged and deployed on RHEL 6, the AspectJ warning message is printed to the log and it looks like it is not loaded despite us using auto-weave.
Tried
We use Oracle JDK 1.8.0.65.
JVM Process and flags (tried with and without javaagent setting) :
java -cp /opt/prod/libs/* -Dlogback.configurationFile=/opt/prod/config/logback.xml -server -Xms2G -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump`date`.hprof -server -XX:+UseStringDeduplication -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -javaagent:/opt/prod/libs/aspectjweaver-1.8.9.jar com.prod.server.Server
The following is printed to system output:
[INFO] [04/04/2016 06:23:48.434] [main] [StatsDExtension(akka://kamon)] Starting the Kamon(StatsD) extension
[INFO] [04/04/2016 06:23:48.484] [main] [SystemMetricsExtension(akka://kamon)] Starting the Kamon(SystemMetrics) extension
Apr 04, 2016 6:23:48 AM kamon.sigar.SigarProvisioner provision
INFO: Sigar library provisioned: /opt/auth-control/native/libsigar-amd64-linux.so
[INFO] [04/04/2016 06:23:48.718] [main] [JMXExtension(akka://kamon)] Starting the Kamon(JMX) extension
[AppClassLoader@14dad5dc] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified
The log still shows the missing warning after explicitly stating that autoweave was loaded:
2016-04-04 06:23:47.742 INFO [main ] Kamon : Initializing Kamon...
2016-04-04 06:23:47.742 INFO [main ] Kamon : Trying to load kamon-autoweave...
2016-04-04 06:23:48.084 INFO [main ] Kamon : ^[[32mKamon-autoweave has been successfully loaded.^[[0m
2016-04-04 06:23:48.084 INFO [main ] Kamon : ^[[32mThe AspectJ loadtime weaving agent is now attached to the JVM (you don't need to use -javaagent).^[[0m
2016-04-04 06:23:48.429 ERROR [main ] k.ModuleLoaderExtension :
___ _ ___ _ _ ___ ___ _ _
/ _ \ | | |_ | | | | | | \/ |(_) (_)
/ /_\ \ ___ _ __ ___ ___ | |_ | | | | | | ___ __ _ __ __ ___ _ __ | . . | _ ___ ___ _ _ __ __ _
| _ |/ __|| '_ \ / _ \ / __|| __| | | | |/\| | / _ \ / _` |\ \ / // _ \| '__| | |\/| || |/ __|/ __|| || '_ \ / _` |
| | | |\__ \| |_) || __/| (__ | |_ /\__/ / \ /\ /| __/| (_| | \ V /| __/| | | | | || |\__ \\__ \| || | | || (_| |
\_| |_/|___/| .__/ \___| \___| \__|\____/ \/ \/ \___| \__,_| \_/ \___||_| \_| |_/|_||___/|___/|_||_| |_| \__, |
It seems like your application was not started with the -javaagent:/path-to-aspectj-weaver.jar option but Kamon detected
the following modules which require AspectJ to work properly:
kamon-akka, kamon-spray, kamon-scala
other hand, if you are sure that you do not need or do not want to use the weaver then you can disable this error message
by changing the kamon.show-aspectj-missing-warning setting in your configuration file.
2016-04-04 06:23:48.432 DEBUG [main ] k.ModuleLoaderExtension : Auto starting the [kamon-statsd] module.
2016-04-04 06:23:48.472 DEBUG [main ] k.ModuleLoaderExtension : Auto starting the [kamon-system-metrics] module.
2016-04-04 06:23:48.717 DEBUG [main ] k.ModuleLoaderExtension : Auto starting the [kamon-jmx] module.
Furthermore, when executing requests, the following warning is present in the logs (probably because the aspectjweaver is missing) :
2016-04-04 05:08:04.156 WARN [ransmit-akka.actor.default-dispatcher-28] kamon.spray.SprayExtension : EmptyTraceContext present while closing the trace with token [package-rpm-67-25]
I will appreciate any help and/or ideas
Thanks!