试过了,将server的监听端口修改成了2553,但看log
[INFO] [02/14/2014 09:39:41.324] [main] [Remoting] Remoting started; 
listening on addresses :[akka.tcp://[email protected]:2552]
server端监听的仍然是2552,不知道是不是我的配置有问题?

*ServerSys {*
* include "common"*
*  akka {*
*  actor {*
*    provider = "akka.remote.RemoteActorRefProvider"*
*  }*
*   remote {*
*    transport = "akka.remote.netty.NettyRemoteTransport"*
*    netty {*
*      hostname = "127.0.0.1"*
*      port = 2553*
*    }*
*    }*
*  }*
*}*


光改端口好像也没有用,我使用的是akka2.2.1版本的
官网文档看到如下一段话:
The port number needs to be unique for each actor system on the same 
machine even if the actor systems have different names. This is because 
each actor system has its own network subsystem listening for connections 
and handling messages as not to interfere with other actor systems.

同一个端口只能有一个actor system ,不知道同一台机器怎么同时开两个actor system..


以上。


在 2014年2月13日星期四UTC+8下午7时13分46秒,chen ke写道:
>
> 顺便咨询下,你两台机器互发消息,吞吐量能达到多少?我只能到2万条消息/每秒。。。。
>
> 在 2014年2月13日星期四UTC+8下午1时47分16秒,闫冬写道:
>>
>> help
>> 求助
>>
>> only machine:
>>
>> *tomcat akka  <--> akka*
>>
>>
>> qa:
>>
>> use akka remote configure?
>>
>> Akka 2.2.1 version 
>>
>> client error info ↓
>>
>> org.jboss.netty.channel.ChannelException: Failed to bind to: 
>> /192.168.8.155:2552
>>
>> .....
>>
>> Caused by: java.net.BindException: Address already in use: bind
>>
>> .....
>>
>>
>>
>> 求助,在一台服务器上,如何实现可以本地调用,又可以远程调用?
>>
>> 怎么来实现才可以client端以及其他电脑的akka client端都可以调用此机器上的 akka server
>>
>>
>> 按照网上找的例子:使用akka2.0.5版本的没问题。
>>
>> 但使用2.2.1版本的,启动server后,再同一台电脑上启动client会报端口占用错误。
>>
>> 配置如下:
>>
>> ServerSys {
>>  include "common"
>>   akka {
>>      actor {
>>      provider = "akka.remote.RemoteActorRefProvider"
>>      }
>>    remote {
>>     transport = "akka.remote.netty.NettyRemoteTransport"
>>     netty {
>>       hostname = "127.0.0.1"
>>       port = 2552
>>     }
>>      }
>>   }
>> }
>>
>> ClientSys {
>>   include "common"
>>   akka {
>>      actor {
>>      provider = "akka.remote.RemoteActorRefProvider"
>>      
>>              deployment {
>>            /remoteServerActor {
>>              remote = "akka.tcp://[email protected]:2552"
>>            }
>>          }
>>        }
>>   }
>> }
>>
>>
>> Server:
>>
>>      public ServerActorSystem() {
>>              // load the configuration
>>              system = ActorSystem.create("ServerSys", ConfigFactory.load()
>>                              .getConfig("ServerSys"));
>>
>>              // create the actor
>>              ActorRef actor = system.actorOf(new Props(ServerActor.class),
>>                              "serverActor");
>>      }
>>
>> Client:
>>
>>      public ClientActorSystem() {
>>              system = ActorSystem.create("ClientSys", ConfigFactory.load()
>>                              .getConfig("ClientSys"));
>>              
>>      }
>>
>>
>> 谢谢
>>
>> thinks
>>
>>
>>
>>
>>
>>
>>
>>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to