Hi

22 views
Skip to first unread message

Lee Phahladira

unread,
Aug 6, 2013, 3:00:13 PM8/6/13
to simple-b...@googlegroups.com
I want to create a cluster of nodes using the sbt console but I can't seem to get my classpath to read my config file which specifies the libraries that are to be used. I reference to http://doc.akka.io/docs/akka/2.1.2/cluster/cluster-usage-scala.html, I have defined src/main/resources/application.conf as follows:
  1. akka {
  2. actor {
  3. provider = "akka.cluster.ClusterActorRefProvider"
  4. }
  5. remote {
  6. transport = "akka.remote.netty.NettyRemoteTransport"
  7. log-remote-lifecycle-events = off
  8. netty {
  9. hostname = "127.0.0.1"
  10. port = 0
  11. }
  12. }
  13.  
  14. cluster {
  15. seed-nodes = [
  16. "akka://Cluste...@127.0.0.1:2551",
  17. "akka://Cluste...@127.0.0.1:2552"]
  18.  
  19. auto-down = on
  20. }
  21. }
and I have specified in my .bashrc file the exact location where the JVM should find the libraries as follows:

CLASSPATH=$CLASSPATH:/usr/share/java
export CLASSPATH
  1. run-main sample.cluster.simple.SimpleClusterApp 2551

but whenevrer i run the cluster using the command
  1. run-main sample.cluster.simple.SimpleClusterApp 2551
I get the following error:
 
[error] (run-main) akka.ConfigurationException: ActorSystem [akka://ClusterSystem] needs to have a 'ClusterActorRefProvider' enabled in the configuration, currently uses [akka.actor.LocalActorRefProvider]
akka.ConfigurationException: ActorSystem [akka://ClusterSystem] needs to have a 'ClusterActorRefProvider' enabled in the configuration, currently uses [akka.actor.LocalActorRefProvider]
    at akka.cluster.Cluster.<init>(Cluster.scala:66)
    at akka.cluster.Cluster$.createExtension(Cluster.scala:41)
    at akka.cluster.Cluster$.createExtension(Cluster.scala:36)
    at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:657)
    at akka.actor.ExtensionId$class.apply(Extension.scala:36)
    at akka.cluster.Cluster$.apply(Cluster.scala:36)
    at sample.cluster.simple.SimpleClusterApp$.main(clustering.scala:19)
    at sample.cluster.simple.SimpleClusterApp.main(clustering.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
[trace] Stack trace suppressed: run last compile:run for the full output.

I don't know if i'm missing something, Please help.:-( Thanks

Lee
------
Reply all
Reply to author
Forward
0 new messages