0

我在一个 EC2 实例上加载了 Tsung,我还有另一个带有 eJabberd 的 EC2 实例。我想用 Tsung 加载测试 eJabberd。所有端口和安全组都配置为所有入站和所有出站。我得到的错误:

ssh: Could not resolve hostname ec2-xx-xxx-xxx-xxx: Name or service not known

供参考我的 Tsung 配置:

    <clients>
       <client host="ec2-xx-xxx-xxx-xxx.us-west-1.compute.amazonaws.com" use_controller_vm="true" maxusers="15000"></client>
    </clients>

    <servers>
     <server host="xx.xxx.xxx.xxx" port="5222" type="tcp"></server>
    </servers>

  <load>
      <arrivalphase phase="1" duration="10" unit="minute">
       <users maxnumber="15000" interarrival="0.04" unit="second"></users>
      </arrivalphase>
     </load>


  <options>
     <option type="ts_jabber" name="global_number" value="15000"></option>
     <option type="ts_jabber" name="userid_max" value="15000"></option>
     <option type="ts_jabber" name="domain" value="http://www.ec2-xx-xxx-xxx-xxx.us-west-1.compute.amazonaws.com"></option>
     <option type="ts_jabber" name="username" value=""></option>
     <option type="ts_jabber" name="passwd" value="test"></option>
    </options>

  <sessions> 
  <session probability="100" name="jabber-example" type="ts_jabber">
    <request><jabber type="connect" ack="local"></jabber></request>
    <thinktime value="2"></thinktime>

    <transaction name="authenticate">
      <request> <jabber type="auth_get" ack="local"></jabber></request>
      <request> <jabber type="auth_set_plain" ack="local"></jabber></request>
    </transaction>

    <request><jabber type="presence:initial" ack="global"></jabber></request>
    <thinktime value="600"></thinktime> 

    <transaction name="close">
      <request> <jabber type="close" ack="local"></jabber></request>
    </transaction>
  </session>
   </sessions>
4

1 回答 1

-1

在您的情况下,将客户端主机设置为“localhost”:

<client host="localhost" ...

如果你有更多安装了 tsung 的机器,它们通过 ssh 连接。因此,请从 shell 检查与 ssh 的连接性。

如果您阅读http://tsung.erlang-projects.org/user_manual/conf-client-server.htmlhttp://tsung.erlang-projects.org/user_manual/faq.html,您将获得有用的信息。

于 2014-03-11T06:56:38.817 回答