Help needed with play/akka application

228 views
Skip to first unread message

Pierpaolo Follia

unread,
Dec 3, 2013, 5:43:39 PM12/3/13
to typesafe...@googlegroups.com
Hi, I'm developing a Play/Akka application and I'd like to try typesafe console. To configure the console I followed sbt-plugin instructions (https://github.com/sbt/sbt-atmos). 

I added the plugin in the plugin.sbt file:

addSbtPlugin("com.typesafe.sbt" % "sbt-atmos-play" % "0.3.2")

and the initialization to the build.sbt file:

atmosPlaySettings

I run the application using 

play atmos:run

I generated a lot of traffic on my application (using httperf), but nothing happens: the console is empty.
Can someone help me to understand what's is going on? I'm using akka 2.2.3 and play 2.2.1. Sbt version 0.13.

Thank you very much,
Pierpaolo.

P.S.-The sample application is working as expected on my computer, so the problem should not be related to the hardware or the JVM.

h3nk3

unread,
Dec 4, 2013, 3:18:23 AM12/4/13
to typesafe...@googlegroups.com
Hi Pierpaolo,
Try running your application with "atmos:run" instead of "play atmos:run" and it should work fine.
HTH,
Henrik 

h3nk3

unread,
Dec 4, 2013, 3:22:14 AM12/4/13
to typesafe...@googlegroups.com
I should probably clarify that a little... 
Use "sbt atmos:run" to run your Play application with the Console.
Thanks,
Henrik

Pierpaolo Follia

unread,
Dec 4, 2013, 12:55:25 PM12/4/13
to typesafe...@googlegroups.com
Hi Herik, thanks for your reply, but it doesn't work either.
Is there a way to increase some log level and see what is going on?

Thanks,
Pierpaolo

Павел Давыдов

unread,
Dec 5, 2013, 6:04:21 AM12/5/13
to typesafe...@googlegroups.com
It looks like I have a similar problem, the only difference is that I don't use play framework, but sbt and akka versions are same. 
I've found a strange warnings in target/atmos/log/atmos.log:

2013-12-04 20:25:02,709 WARN  [U] [ActorSystem(atmos)] [pool-1-thread-1] : Couldn't accept new trace receiver connection - already at max connections

What does it mean? I've also noticed that sometimes jvm even crash when I run atmos:run from sbt.

среда, 4 декабря 2013 г., 21:55:25 UTC+4 пользователь Pierpaolo Follia написал:

Henrik Engström

unread,
Dec 5, 2013, 8:09:42 AM12/5/13
to Павел Давыдов, typesafe...@googlegroups.com
Hi,
This means that the number of connections from the traced applications to the analyzer have reached max number of clients.
How many applications or actor systems are you currently tracing? 

Try restarting everything to get rid of the exception.
Let me know if this helps.

Thanks,
Henrik


--
You received this message because you are subscribed to the Google Groups "Typesafe Console User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to typesafe-conso...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Pavel Davydov

unread,
Dec 5, 2013, 11:29:14 AM12/5/13
to typesafe...@googlegroups.com, Павел Давыдов
I have only one actor system in my main build, but I also have five more in tests, I hope atmos does not load tests when I execute atmos:run, does it?
I've killed all java processes on my local machine, restarted sbt, but that didn't help, I still get this messages in log:

$ tail -f target/atmos/log/atmos.log
2013-12-05 20:19:15,917 WARN  [U] [ActorSystem(atmos)] [pool-1-thread-1] : Couldn't accept new trace receiver connection - already at max connections
2013-12-05 20:19:17,665 WARN  [U] [ActorSystem(atmos)] [pool-1-thread-1] : Couldn't accept new trace receiver connection - already at max connections
2013-12-05 20:19:18,916 WARN  [U] [ActorSystem(atmos)] [pool-1-thread-1] : Couldn't accept new trace receiver connection - already at max connections

As you can see, atmos generate a new warning log entry every second or two. I don't know would it help or not, but I've noticed that a new connection 
is created every second from my process to port 28660. It is not closed and stays in CLOSE_WAIT state:

$ lsof -i
java     3915 pablo   89u  IPv6  55261      0t0  TCP localhost:45947->localhost:28660 (ESTABLISHED)
java     3915 pablo   90u  IPv6  55263      0t0  TCP localhost:45948->localhost:28660 (ESTABLISHED)
java     3915 pablo   91u  IPv6  55265      0t0  TCP localhost:45949->localhost:28660 (CLOSE_WAIT)
java     3915 pablo   92u  IPv6  55266      0t0  TCP localhost:45950->localhost:28660 (CLOSE_WAIT)
java     3915 pablo   93u  IPv6  55268      0t0  TCP localhost:45952->localhost:28660 (CLOSE_WAIT)
java     3915 pablo   94u  IPv6  55267      0t0  TCP localhost:45951->localhost:28660 (CLOSE_WAIT)
java     3915 pablo   95u  IPv6  55270      0t0  TCP localhost:45954->localhost:28660 (CLOSE_WAIT)
java     3915 pablo   97u  IPv6  55269      0t0  TCP localhost:45953->localhost:28660 (CLOSE_WAIT)
java     3915 pablo   98u  IPv6  55272      0t0  TCP localhost:45955->localhost:28660 (CLOSE_WAIT)

There are much more connections to this port in fact, I've truncated the output. jps output is:

$ jps 
3915 MyApp
3794 AtmosDev
3694 sbt-launch.jar
3863 NettyServer
5061 Jps

четверг, 5 декабря 2013 г., 17:09:42 UTC+4 пользователь h3nk3 написал:

Jim Powers

unread,
Dec 5, 2013, 11:39:06 AM12/5/13
to typesafe...@googlegroups.com
Java and OS versions?
--
Jim Powers
Senior Engineer @ 
Typesafe
Twitter: @corruptmemory

Pavel Davydov

unread,
Dec 5, 2013, 11:47:24 AM12/5/13
to typesafe...@googlegroups.com
Java:
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-5)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
OS:
Linux debian 3.11-2-amd64 #1 SMP Debian 3.11.8-1 (2013-11-13) x86_64 GNU/Linux

четверг, 5 декабря 2013 г., 20:39:06 UTC+4 пользователь Jim Powers написал:

Pavel Davydov

unread,
Dec 5, 2013, 11:51:54 AM12/5/13
to typesafe...@googlegroups.com
I've tried abc sample from sbt-atmos, and it worked just fine. So maybe the problem is in some configs or settings in my project..

четверг, 5 декабря 2013 г., 20:47:24 UTC+4 пользователь Pavel Davydov написал:

Pavel Davydov

unread,
Dec 5, 2013, 12:45:29 PM12/5/13
to typesafe...@googlegroups.com
I was able to reproduce the problem with abc sample from atmos. I've added the java protobuf plugin to the sample project, and this broke the console. And the same warnings I see in my app's log appeared:

2013-12-05 21:39:12,722 WARN  [U] [ActorSystem(atmos)] [pool-1-thread-1] : Couldn't accept new trace receiver connection - already at max connections

Patch is in attachment, hope it would help.. I've also attached jvm crash log, cause it crashed after some time.

четверг, 5 декабря 2013 г., 20:51:54 UTC+4 пользователь Pavel Davydov написал:
patch.diff
hs_err_pid17223.log

Jim Powers

unread,
Dec 5, 2013, 1:03:22 PM12/5/13
to typesafe...@googlegroups.com
Fascinating.  Yup, that could do it.  Atmos uses Protobuf 2.4.1.  I know that there are problems using newer versions.  There is no straight-forward fix for this.

Jim Powers

unread,
Dec 5, 2013, 1:03:56 PM12/5/13
to typesafe...@googlegroups.com
More importantly: Thanks for looking into this!

Pierpaolo Follia

unread,
Dec 5, 2013, 1:06:26 PM12/5/13
to typesafe...@googlegroups.com
I'm using protobuf plugin too in my project, so the problem should be there.
By the way, I'm not experiencing any jvm crashes. I'm on a Mac, OSX 10.9 java is:

java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

Hope this help.

Pavel Davydov

unread,
Dec 6, 2013, 2:53:09 AM12/6/13
to typesafe...@googlegroups.com
Yay!! I've downgraded protobuf version to 2.4.1 and the console works now! Thanks for you help! 
By the way, is it possible to make console run on some other host than 127.0.0.1? I'm going to 
test my application on a remote server, so it would be quite convenient for to run it on the address 
that I can access from my local machine.

четверг, 5 декабря 2013 г., 22:06:26 UTC+4 пользователь Pierpaolo Follia написал:

Henrik Engström

unread,
Dec 6, 2013, 3:06:12 AM12/6/13
to Pavel Davydov, typesafe...@googlegroups.com
Glad to hear it works now.
It was your good investigation that lay ground to finding the issue so you should take the credit!

The free version of the Console is targeted to be a developer support and therefore it runs on localhost. 

Thanks,
Henrik
Reply all
Reply to author
Forward
0 new messages