I'm tring to enable typesafe console for my akka+spray based server, but it doesn't work. I've successfully added sbt-atmos plugin to my sbt build (as it's recommended here), when I run atmos:run
it starts without warnings, I can see console web interface on localhost:9000, but, unfortunately, when I send some requests to my server, nothing changes. Console shows 0 nodes. My application is an http server, it uses akka 2.2.3, sbt 0.13.0 and spray 1.2.0. In my Build.scala I have:
lazy val SomeProject = Project(
id = "SomeProject",
base = file("."),
fork := true,
libraryDependencies ++= Dependencies.someProject,
resolvers ++= Dependencies.someProjectResolvers,
distJvmOptions in Dist := "-Xms256M -Xmx1024M",
outputDirectory in Dist := file("some-proj-dist"),
javaOptions := Seq("-XX:+CMSClassUnloadingEnabled", "-XX:+UseConcMarkSweepGC", "-XX:MaxPermSize=512M",
"-XX:PermSize=64M", "-Xmx2048M", "-XX:ReservedCodeCacheSize=256M")//,
) ++ PB.protobufSettings ++ Revolver.settings
).configs(Atmos).settings(atmosSettings: _*)
Dependency object look like this:
object Dependency {
// Versions
object V {
val Akka = "2.2.3"
val ScalaTest = "2.0"
}
val akkaKernel = "com.typesafe.akka" %% "akka-kernel" % V.Akka
val akkaSlf4j = "com.typesafe.akka" %% "akka-slf4j" % V.Akka
val logback = "ch.qos.logback" % "logback-classic" % "1.0.0"
val akkaActor = "com.typesafe.akka" %% "akka-actor" % V.Akka
val akkaTest = "com.typesafe.akka" %% "akka-testkit" % V.Akka % "test"
val scalaTest = "org.scalatest" %% "scalatest" % V.ScalaTest % "test"
val sprayRouting = "io.spray" % "spray-routing" % "1.2.0"
val sprayCan = "io.spray" % "spray-can" % "1.2.0"
val sprayJson = "io.spray" %% "spray-json" % "1.2.5"
val protobuf = "com.google.protobuf" % "protobuf-java" % "2.5.0"
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.11.0" % "test"
}
Can please anybody help my to find out what's wrong? By the way, can typesafe console work with akka 2.2.3? typesafe activator has 2.2.1 as far as I know.. Also, I see a strange warning in atmos log:
WARN [U] [ActorSystem(atmos)] [pool-1-thread-1] : Couldn't accept new trace receiver connection - already at max connections
I tried to google it, but wasn't able to find anything about it. What does it mean?
I found help in typesafe console google group, but I'm going to post it here also, for people who face similar problems could find it here as well. The problem was in google protobuf plugin. Atmos uses version 2.4.1 internally, so adding newer versions to the project can break it. A simple way to make it work is to use the same protobuf version as atmos does. I've changed it like this:
and now atmos works just fine.