sbt / sbt-atmos

sbt plugin for running Typesafe Console in development
98 stars 11 forks source link

Windows platform not supported? #5

Closed proyb2 closed 11 years ago

proyb2 commented 11 years ago

C:\Users\scala\Desktop\sbt-atmos-0.1.2\sample\abc>sbt atmos:run [info] Loading project definition from C:\Users\scala\Desktop\sbt-atmos-0.1.2\sample\abc\project [info] Set current project to ABC Sample (in build file:/C:/Users/scala/Desktop/sbt-atmos-0.1.2/sample/abc/) [info] Starting Atmos and Typesafe Console ... [info] Typesafe Console is available at http://localhost:9900 [info] Running com.typesafe.atmos.sample.Sample [info] [ERROR] [08/09/2013 11:47:42.006] [atmos-atmos-trace-dispatcher-8] [akka://atmos/user/2_SystemMetricsMonitor] Couldn't monitor [systemLoadAverage]. Due to [This method has not been implemented on this platform] ...

proyb2 commented 11 years ago

con't...

[info] org.hyperic.sigar.SigarNotImplementedException: This method has not been implemented on this platform [info] at org.hyperic.sigar.SigarNotImplementedException.(SigarNotImplementedException.java:28) [info] at org.hyperic.sigar.Sigar.getLoadAverage(Native Method) [info] at com.typesafe.atmos.trace.SigarMetricsProvider$$anonfun$systemLoadAverage$1.apply$mcD$sp(SigarMetricsProvider.scala:31) [info] at com.typesafe.atmos.trace.SigarMetricsProvider$$anonfun$systemLoadAverage$1.apply(SigarMetricsProvider.scala:31) [info] at com.typesafe.atmos.trace.SigarMetricsProvider$$anonfun$systemLoadAverage$1.apply(SigarMetricsProvider.scala:31) [info] at com.typesafe.atmos.trace.SigarMetricsProvider.safe(SigarMetricsProvider.scala:160) [info] at com.typesafe.atmos.trace.SigarMetricsProvider.systemLoadAverage(SigarMetricsProvider.scala:31) [info] at com.typesafe.atmos.trace.JMXMetricsProvider.currentMetrics(SystemMetricsMonitor.scala:149) [info] at com.typesafe.atmos.trace.SystemMetricsMonitor$$anonfun$receive$1.applyOrElse(SystemMetricsMonitor.scala:55) [info] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) [info] at akka.actor.ActorCell.invoke_aroundBody2(ActorCell.scala:456) [info] at akka.actor.ActorCell.invoke_aroundBody3$advice(ActorCell.scala:531) [info] at akka.actor.ActorCell.invoke(ActorCell.scala:1) [info] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) [info] at akka.dispatch.Mailbox.run(Mailbox.scala:219) [info] at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) [info] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [info] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [info] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [info] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [info] [info] [ERROR] [08/09/2013 11:47:42.529] [atmos-atmos-trace-dispatcher-8] [akka://atmos/user/2_SystemMetricsMonitor] Couldn't monitor [loadAverage]. Due to [This method has not been implemented on this platform] [info] org.hyperic.sigar.SigarNotImplementedException: This method has not been implemented on this platform [info] at org.hyperic.sigar.SigarNotImplementedException.(SigarNotImplementedException.java:28) [info] at org.hyperic.sigar.Sigar.getLoadAverage(Native Method) [info] at com.typesafe.atmos.trace.SigarMetricsProvider$$anonfun$systemLoadAverage$1.apply$mcD$sp(SigarMetricsProvider.scala:31) [info] at com.typesafe.atmos.trace.SigarMetricsProvider$$anonfun$systemLoadAverage$1.apply(SigarMetricsProvider.scala:31) [info] at com.typesafe.atmos.trace.SigarMetricsProvider$$anonfun$systemLoadAverage$1.apply(SigarMetricsProvider.scala:31) [info] at com.typesafe.atmos.trace.SigarMetricsProvider.safe(SigarMetricsProvider.scala:160) [info] at com.typesafe.atmos.trace.SigarMetricsProvider.systemLoadAverage(SigarMetricsProvider.scala:31) [info] at com.typesafe.atmos.trace.JMXMetricsProvider.currentMetrics(SystemMetricsMonitor.scala:149) [info] at com.typesafe.atmos.trace.SystemMetricsMonitor$$anonfun$receive$1.applyOrElse(SystemMetricsMonitor.scala:55) [info] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) [info] at akka.actor.ActorCell.invoke_aroundBody2(ActorCell.scala:456) [info] at akka.actor.ActorCell.invoke_aroundBody3$advice(ActorCell.scala:531) [info] at akka.actor.ActorCell.invoke(ActorCell.scala:1) [info] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) [info] at akka.dispatch.Mailbox.run(Mailbox.scala:219) [info] at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) [info] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [info] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [info] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [info] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [info] [info] [ERROR] [08/09/2013 11:48:10.011] [Sample-akka.actor.default-dispatcher-3] [akka://Sample/user/ActorA] Simulated exception in ActorA [info] java.lang.RuntimeException: Simulated exception in ActorA [info] at com.typesafe.atmos.sample.ActorA$$anonfun$receive$1.applyOrElse(Sample.scala:49) [info] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) [info] at akka.actor.ActorCell.invoke_aroundBody2(ActorCell.scala:456) [info] at akka.actor.ActorCell.invoke_aroundBody3$advice(ActorCell.scala:539) [info] at akka.actor.ActorCell.invoke(ActorCell.scala:1) [info] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) [info] at akka.dispatch.Mailbox.run(Mailbox.scala:219) [info] at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) [info] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [info] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [info] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [info] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [info]

pvlugter commented 11 years ago

That's coming from Sigar, the library used for system metrics, and there may be no way for it to get loadAverage information on windows. We'll see if we can quieten the exceptions. I expect that everything else is working okay. Do you get everything displaying okay in the console UI?

The exception from ActorA is expected and part of the sample application.

proyb2 commented 11 years ago

I can see the console UI with all showing "Loading..." status in each sections.

pvlugter commented 11 years ago

What version of windows?

proyb2 commented 11 years ago

Windows 7.

Update: On Linux, true enough, the ActorA is the problem:

[proyb2@test abc]$ sbt atmos:run [info] Loading project definition from /home/proyb2/Desktop/sbt-atmos-0.1.2/sample/abc/project [info] Set current project to ABC Sample (in build file:/home/proyb2/Desktop/sbt-atmos-0.1.2/sample/abc/) [info] Starting Atmos and Typesafe Console ... [info] Typesafe Console is available at http://localhost:9900 [info] Running com.typesafe.atmos.sample.Sample [info] [ERROR] [08/09/2013 23:27:20.177] [Sample-akka.actor.default-dispatcher-7] [akka://Sample/user/ActorA] Simulated exception in ActorA [info] java.lang.RuntimeException: Simulated exception in ActorA [info] at com.typesafe.atmos.sample.ActorA$$anonfun$receive$1.applyOrElse(Sample.scala:49) [info] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) [info] at akka.actor.ActorCell.invoke_aroundBody2(ActorCell.scala:456) [info] at akka.actor.ActorCell.invoke_aroundBody3$advice(ActorCell.scala:539) [info] at akka.actor.ActorCell.invoke(ActorCell.scala:1) [info] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) [info] at akka.dispatch.Mailbox.run(Mailbox.scala:219) [info] at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) [info] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [info] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [info] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [info] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [info]

pvlugter commented 11 years ago

Okay, thanks. Earlier testing on Windows 8 worked okay. I'll try Windows 7.

Note that there's no problem with the exception from ActorA. This is expected and part of the sample. It's there to show what errors look like in the Console UI and traces.

proyb2 commented 11 years ago

Oh, that a good demo! Comment out that ActorA will remove the error?

pvlugter commented 11 years ago

The error in the sample is scheduled here:

https://github.com/sbt/sbt-atmos/blob/v0.1.2/sample/abc/src/main/scala/com/typesafe/atmos/sample/Sample.scala#L33

And thrown here:

https://github.com/sbt/sbt-atmos/blob/v0.1.2/sample/abc/src/main/scala/com/typesafe/atmos/sample/Sample.scala#L49

You can change the behaviour at those points.

pvlugter commented 11 years ago

I tried running the sample on a clean Windows 7 VM, with JDK 7 and sbt 0.12.4 installed. I got the exceptions from Sigar about loadAverage not being implemented. We'll keep those quiet. Everything else worked fine, and the Console UI displayed correctly.

sbt-atmos-win7

pvlugter commented 11 years ago

The sigar not implemented exceptions are now listed as warnings. Available in sbt-atmos 0.2.0 (with atmos 1.2.1).