Comments (11)
As mentioned in #36, I tried to deploy the updated Kamon.io and got this exception at startup:
[ERROR] [06/06/2014 14:33:23.932] [threads-redis-client-akka.actor.default-dispatcher-5] [akka://threads-redis-client/system/IO-TCP/selectors] null
akka.actor.ActorInitializationException: exception during creation
at akka.actor.ActorInitializationException$.apply(Actor.scala:164)
at akka.actor.ActorCell.create(ActorCell.scala:596)
at akka.actor.ActorCell.invokeAll$1_aroundBody2(ActorCell.scala:456)
at akka.actor.ActorCell$AjcClosure3.run(ActorCell.scala:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at akka.instrumentation.ActorSystemMessagePassingTracing$$anonfun$aroundSystemMessageInvoke$1.apply(ActorSystemMessagePassingTracing.scala:61)
at kamon.trace.TraceRecorder$.withTraceContext(TraceRecorder.scala:66)
at akka.instrumentation.ActorSystemMessagePassingTracing.aroundSystemMessageInvoke(ActorSystemMessagePassingTracing.scala:61)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:1)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at akka.util.Reflect$.instantiate(Reflect.scala:66)
at akka.actor.ArgsReflectConstructor.produce(Props.scala:349)
at akka.actor.Props.newActor(Props.scala:249)
at akka.actor.ActorCell.newActor(ActorCell.scala:552)
at akka.actor.ActorCell.create(ActorCell.scala:578)
... 15 more
Caused by: java.lang.NullPointerException
at akka.actor.ActorSystemImpl.findExtension(ActorSystem.scala:697)
at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:706)
at akka.actor.ExtensionId$class.apply(Extension.scala:79)
at kamon.metrics.Metrics$.apply(MetricsExtension.scala:97)
at kamon.Kamon$.apply(Kamon.scala:31)
at akka.instrumentation.DispatcherTracing.afterDispatcherStartup(DispatcherTracing.scala:55)
at akka.dispatch.Dispatcher$LazyExecutorServiceDelegate.executor$lzycompute(Dispatcher.scala:44)
at akka.dispatch.Dispatcher$LazyExecutorServiceDelegate.executor(Dispatcher.scala:44)
at akka.dispatch.ExecutorServiceDelegate$class.execute(ThreadPoolBuilder.scala:212)
at akka.dispatch.Dispatcher$LazyExecutorServiceDelegate.execute(Dispatcher.scala:43)
at akka.dispatch.Dispatcher.executeTask(Dispatcher.scala:76)
at akka.dispatch.MessageDispatcher.unbatchedExecute(AbstractDispatcher.scala:145)
at akka.dispatch.BatchingExecutor$class.execute(BatchingExecutor.scala:113)
at akka.dispatch.MessageDispatcher.execute(AbstractDispatcher.scala:85)
at akka.util.SerializedSuspendableExecutionContext.attach(SerializedSuspendableExecutionContext.scala:75)
at akka.util.SerializedSuspendableExecutionContext.execute(SerializedSuspendableExecutionContext.scala:76)
at akka.io.SelectionHandler$ChannelRegistryImpl.<init>(SelectionHandler.scala:151)
at akka.io.SelectionHandler.<init>(SelectionHandler.scala:234)
... 24 more
The application seems to work fine, but I'd like to have your opinion on this exception before using it in production.
from kamon.
Adrien,
This happens always when you start the application?
El 06/06/2014 18:47, "Adrien Aubel" [email protected] escribió:
As mentioned in #36 #36, I
tried to deploy the updated Kamon.io and got this exception at startup:[ERROR] [06/06/2014 14:33:23.932] [threads-redis-client-akka.actor.default-dispatcher-5] [akka://threads-redis-client/system/IO-TCP/selectors] null
akka.actor.ActorInitializationException: exception during creation
at akka.actor.ActorInitializationException$.apply(Actor.scala:164)
at akka.actor.ActorCell.create(ActorCell.scala:596)
at akka.actor.ActorCell.invokeAll$1_aroundBody2(ActorCell.scala:456)
at akka.actor.ActorCell$AjcClosure3.run(ActorCell.scala:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at akka.instrumentation.ActorSystemMessagePassingTracing$$anonfun$aroundSystemMessageInvoke$1.apply(ActorSystemMessagePassingTracing.scala:61)
at kamon.trace.TraceRecorder$.withTraceContext(TraceRecorder.scala:66)
at akka.instrumentation.ActorSystemMessagePassingTracing.aroundSystemMessageInvoke(ActorSystemMessagePassingTracing.scala:61)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:1)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at akka.util.Reflect$.instantiate(Reflect.scala:66)
at akka.actor.ArgsReflectConstructor.produce(Props.scala:349)
at akka.actor.Props.newActor(Props.scala:249)
at akka.actor.ActorCell.newActor(ActorCell.scala:552)
at akka.actor.ActorCell.create(ActorCell.scala:578)
... 15 more
Caused by: java.lang.NullPointerException
at akka.actor.ActorSystemImpl.findExtension(ActorSystem.scala:697)
at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:706)
at akka.actor.ExtensionId$class.apply(Extension.scala:79)
at kamon.metrics.Metrics$.apply(MetricsExtension.scala:97)
at kamon.Kamon$.apply(Kamon.scala:31)
at akka.instrumentation.DispatcherTracing.afterDispatcherStartup(DispatcherTracing.scala:55)
at akka.dispatch.Dispatcher$LazyExecutorServiceDelegate.executor$lzycompute(Dispatcher.scala:44)
at akka.dispatch.Dispatcher$LazyExecutorServiceDelegate.executor(Dispatcher.scala:44)
at akka.dispatch.ExecutorServiceDelegate$class.execute(ThreadPoolBuilder.scala:212)
at akka.dispatch.Dispatcher$LazyExecutorServiceDelegate.execute(Dispatcher.scala:43)
at akka.dispatch.Dispatcher.executeTask(Dispatcher.scala:76)
at akka.dispatch.MessageDispatcher.unbatchedExecute(AbstractDispatcher.scala:145)
at akka.dispatch.BatchingExecutor$class.execute(BatchingExecutor.scala:113)
at akka.dispatch.MessageDispatcher.execute(AbstractDispatcher.scala:85)
at akka.util.SerializedSuspendableExecutionContext.attach(SerializedSuspendableExecutionContext.scala:75)
at akka.util.SerializedSuspendableExecutionContext.execute(SerializedSuspendableExecutionContext.scala:76)
at akka.io.SelectionHandler$ChannelRegistryImpl.(SelectionHandler.scala:151)
at akka.io.SelectionHandler.(SelectionHandler.scala:234)
... 24 moreThe application seems to work fine, but I'd like to have your opinion on
this exception before using it in production.—
Reply to this email directly or view it on GitHub
#37 (comment).
from kamon.
Yes exactly. Just at startup, then it doesn't happen anymore.
from kamon.
Here it happens to one of my Redis actor systems (that uses Rediscala), and apparently the Redis doesn't work anymore in my application, it fallbacks to our SQL storage.
from kamon.
I think that the issue is related to the multiples ActorSystems.
how many actorsystems you are using?
best regards,
Diego
On Fri, Jun 6, 2014 at 8:25 PM, Adrien Aubel [email protected]
wrote:
Here it happens to one of my Redis actor systems, and apparently the Redis
doesn't work anymore in my application, it fallbacks to our SQL storage.—
Reply to this email directly or view it on GitHub
#37 (comment).
from kamon.
I use 10 actor systems in this Spray application. I can detail them if you want.
from kamon.
Adrien, although Kamon should work properly with various actor systems in the same JVM, I'm curious on why you decided to have that many actor systems together.. could you please share a bit of insight in that?
from kamon.
Sure, so first of all we use many SBT sub-projects.
For example, the rest
project (our Spray application) depends on Seq(models, db % "compile->compile;test->test", push, services, logger)
, these dependencies themselves usually depend on other things, like DB models generation and all.
Here are the actor systems that are used at runtime:
db
MySQL execution context (Slick 2.1)$serverName-redis-client
Redis execution context (Rediscala 1.3.1) - 8 actor systems when all servers are usedpush
Push notifications engine (uses Redis, GCM, APNS)rest
The Spray routing processorservices
Analytics and telephony services
If there's anything that you would change here I'd be glad to hear your feedback :)
from kamon.
The most common practice is to have a single actor system per application and make sure everything is compartmentalized properly to prevent some parts of the app (like blocking JDBC calls) from starving other parts (like your Spray infrastructure, which is non-blocking), but that being the common case doesn't mean that what you did is wrong.. let me know if you ever raise a question regarding your architecture in the Akka mailing list, I would definitely like to know what they think about that.
Going back to the issue, we will try to isolate and solve this ASAP and get back to you, thanks again for your patience and collaboration!
from kamon.
Got it, in our case the only blocking thing that we're using is as you mentioned the JDBC call.
But we always do MySQL operations through this method:
class MySqlClient(serverName: String) extends InstrumentedBuilder {
...
def async[T](f: Session => T): Future[T] = {
Future(timer.time {
val session = underlying.createSession()
try {
f(session)
} finally {
session.close()
}
})(MySqlClient.executionContext)
}
...
}
object MySqlClient {
val system = ActorSystem("db")
implicit val executionContext = system.dispatchers.lookup("contexts.mysql")
...
}
So we have other projects, like our stream
(WebSockets) server, that use this db
project, so I thought it may be cleaner to isolate that in different actor systems.
But if you tell me that there's no interest doing so, I can also always use a single "application"
actor system.
Let me know if there's anything I can do to help you guys solve this issue.
from kamon.
Btw the akka
block containing this configuration:
loglevel = "INFO"
event-handlers = ["akka.event.slf4j.Slf4jEventHandler", "kamon.newrelic.NewRelicErrorLogger"]
extensions = ["kamon.newrelic.NewRelic"]
log-config-on-start = off
was initially at the root of the configuration, but that apparently caused connection issues to New Relic servers, so I've moved it nested in the rest
and stream
configurations (only 1 is used at a time, it depends on which application is started).
The error that I reported above occurs in both cases.
from kamon.
Related Issues (20)
- Java 8 support, new relic http client HOT 2
- Context propagation is broken from Akka 2.8.0 onwards HOT 3
- Bumping 2.6.3 to 2.6.4 (kamon-bundle and kamon-prometheus) breaks logging in our apps (Akka HTTP, Play) HOT 9
- Old kanela-agent which does not support JDK 21 HOT 5
- Maven metadata does not contain info about Kamon Bundle v2.6.5 HOT 1
- Kamon doesn't propage Kamon context HOT 7
- Sbt 1.9.7 upgrade breaks Kamon Play HTTP Prometheus Metrics HOT 2
- Upgrade newrelic.telemetry to 0.16.0 HOT 2
- Add support for Micrometer
- Instrumentation is broken With play 3.0, scala 3.3.1, kamon-bundle and Prometheus HOT 1
- Support for postgresql 42.7.2 - java.lang.NoSuchFieldError: checkConnectionQuery HOT 6
- Issue while using jaeger reporter with scala HOT 1
- Akka-http metrics do not work when using http2
- ClassCastException when using Slick and Kamon Jdbc
- Trying to load Akka instrumentation when using Pekko in Scala 3 HOT 1
- Updating Postgres Driver causes NoSuchFieldError from Kamon JDBC HOT 2
- How to use local-tail-sampler
- DataDog Reporter to send EntityId from environment
- Updating kafka-clients to 3.7.0 breaks kafka instrumentation
- Latest 2.7.2 leads to NoClassDefFoundError HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kamon.