title: Akka Remote Actors- : can not able to establish a connection between local and remote actors
body: <p>Hi I am following this <a href="http://alvinalexander.com/scala/simple-akka-actors-remote-example" rel="nofollow">tutorial</a> and I copy pasted the code as it is except I changed the port from 5150 to 2552 and I am facing thease errors 
  HelloLocal project errors </p>
  
  <pre><code> [warn] there were 1 deprecation warning(s); re-run with -deprecation for details
  [warn] one warning found
  [info] Running HelloLocal 
  [INFO] [11/04/2014 22:37:50.707] [run-main-0] [Remoting] Starting remoting
  [INFO] [11/04/2014 22:37:51.857] [run-main-0] [Remoting] Remoting started; listening on addresses :[akka.tcp://LocalSystem@127.0.1.1:2552]
  [INFO] [11/04/2014 22:37:51.863] [run-main-0] [Remoting] Remoting now listens on addresses: [akka.tcp://LocalSystem@127.0.1.1:2552]
  [ERROR] [11/04/2014 22:37:51.904] [LocalSystem-akka.actor.default-dispatcher-3] [RemoteActorRefProvider] Error while looking up address [akka://HelloRemoteSystem@127.0.0.1:2552]
  akka.remote.RemoteTransportException: No transport is loaded for protocol: [akka], available protocols: [akka.tcp]
      at akka.remote.Remoting$.localAddressForRemote(Remoting.scala:88)
      at akka.remote.Remoting.localAddressForRemote(Remoting.scala:130)
      at akka.remote.RemoteActorRefProvider.actorFor(RemoteActorRefProvider.scala:321)
      at akka.actor.ActorRefFactory$class.actorFor(ActorRefProvider.scala:258)
      at akka.actor.ActorCell.actorFor(ActorCell.scala:369)
      at LocalActor.&lt;init&gt;(HelloLocal.scala:7)
      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 java.lang.Class.newInstance(Class.java:374)
      at akka.util.Reflect$.instantiate(Reflect.scala:45)
      at akka.actor.NoArgsReflectConstructor.produce(Props.scala:361)
      at akka.actor.Props.newActor(Props.scala:252)
      at akka.actor.ActorCell.newActor(ActorCell.scala:552)
      at akka.actor.ActorCell.create(ActorCell.scala:578)
      at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
      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)
  
  [INFO] [11/04/2014 22:37:51.913] [LocalSystem-akka.actor.default-dispatcher-5] [akka://HelloRemoteSystem@127.0.0.1:2552/user/RemoteActor] Message [java.lang.String] from Actor[akka://LocalSystem/user/LocalActor#543076206] to Actor[akka://HelloRemoteSystem@127.0.0.1:2552/user/RemoteActor] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
  </code></pre>
  
  <p>HelloRemote project errors are:</p>
  
  <pre><code>[info] Running HelloRemote 
  Remote Actor receive messgage : The remote actor is alive  
  [INFO] [11/04/2014 22:38:40.915] [HelloRemoteSystem-akka.actor.default-dispatcher-2] [akka://HelloRemoteSystem/deadLetters] Message [java.lang.String] from Actor[akka://HelloRemoteSystem/user/RemoteActor#-1308265074] to Actor[akka://HelloRemoteSystem/deadLetters] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
  </code></pre>
  
  <p>I am new in akka and for learning purpose I am following this tutorial and now there are errors please help me to solve them </p>
  
  <p>edit after following the akka-remitng 2.3.6 now i am having different errors
  aplication.conf (helloLocal)</p>
  
  <pre><code>akka {
  actor {
  provider = "akka.remote.RemoteActorRefProvider"
  }
  remote {
  enabled-transport =  ["akka.remote.netty.tcp"]
  netty.tcp {
  hostname = "127.0.0.1"
  port = 0
  }
  }
  }
  </code></pre>
  
  <p>HelloLoca.scala
  import akka.actor._</p>
  
  <pre><code>class LocalActor extends Actor {
    //create the remote actor 
    val remote = context.actorSelection("akka.tcp://HelloRemoteSystem@127.0.0.1:2552/user/RemoteActor")
  
    var counter = 0
  def receive = {
      case "START" =&gt;
          remote ! "Hello from the LocalActor"
      case msg: String =&gt;
          println(s"LocalActor received message: '$msg'")
          if (counter &lt; 5) {
              sender ! "Hello back to you"
              counter += 1
          }
    }
  }
  object HelloLocal extends App{
    implicit val system =ActorSystem("LocalSystem")
    val localActor =system.actorOf(Props[LocalActor],name="LocalActor")
    localActor ! "START"
  
  }
  </code></pre>
  
  <p>and HelloRemote application.conf is</p>
  
  <pre><code>    akka {
      actor {
      provider = "akka.remote.RemoteActorRefProvider"
      }
     remote {
      enabled-transport =  ["akka.remote.netty.tcp"]
      netty.tcp {
       hostname = "127.0.0.1"
      port = 2552
      }
      }
      }
  </code></pre>
  
  <p>These are the errors now 
  HelloLocal </p>
  
  <pre><code>[info] Running HelloLocal 
  [INFO] [11/05/2014 12:42:32.674] [run-main-1] [Remoting] Starting remoting
  [INFO] [11/05/2014 12:42:34.031] [run-main-1] [Remoting] Remoting started; listening on addresses :[akka.tcp://LocalSystem@127.0.0.1:45047]
  [INFO] [11/05/2014 12:42:34.040] [run-main-1] [Remoting] Remoting now listens on addresses: [akka.tcp://LocalSystem@127.0.0.1:45047]
  [WARN] [11/05/2014 12:42:34.367] [LocalSystem-akka.remote.default-remote-dispatcher-5] [akka.tcp://LocalSystem@127.0.0.1:45047/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FHelloRemoteSystem%40127.0.0.1%3A2552-0/endpointWriter] AssociationError [akka.tcp://LocalSystem@127.0.0.1:45047] -&gt; [akka.tcp://HelloRemoteSystem@127.0.0.1:2552]: Error [Invalid address: akka.tcp://HelloRemoteSystem@127.0.0.1:2552] [
  akka.remote.InvalidAssociation: Invalid address: akka.tcp://HelloRemoteSystem@127.0.0.1:2552
  Caused by: akka.remote.transport.Transport$InvalidAssociationException: Connection refused: /127.0.0.1:2552
  ]
  [WARN] [11/05/2014 12:42:34.419] [LocalSystem-akka.remote.default-remote-dispatcher-13] [Remoting] Tried to associate with unreachable remote address [akka.tcp://HelloRemoteSystem@127.0.0.1:2552]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: Connection refused: /127.0.0.1:2552
  [INFO] [11/05/2014 12:42:34.451] [LocalSystem-akka.actor.default-dispatcher-2] [akka://LocalSystem/deadLetters] Message [java.lang.String] from Actor[akka://LocalSystem/user/LocalActor#1798933307] to Actor[akka://LocalSystem/deadLetters] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
  </code></pre>
  
  <p>HelloRemote errors are </p>
  
  <pre><code>[info] Running HelloRemote 
  Remote Actor receive messgage : The remote actor is alive  
  [INFO] [11/05/2014 12:42:35.654] [HelloRemoteSystem-akka.actor.default-dispatcher-2] [akka://HelloRemoteSystem/deadLetters] Message [java.lang.String] from Actor[akka://HelloRemoteSystem/user/RemoteActor#1925624739] to Actor[akka://HelloRemoteSystem/deadLetters] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
  </code></pre>