【问题标题】:Tsung load test from mac os x来自 mac os x 的 Tsung 负载测试
【发布时间】:2013-05-03 12:29:13
【问题描述】:

我正在尝试从我的 Mac OS X 机器上触发一个 Tsung 请求,但我运气不佳。

我已经编辑了 ~/.tsung/tsung.xml 配置文件,甚至尝试使用 -f 参数多次更改该文件的位置。

当我运行 tsung start 它返回这个输出

dave:/Applications/MAMP/htdocs/barebonessite/wp-content/themes/barebones $ tsung -f      ~/.tsung/tsung.xml -l . start
Starting Tsung
"Log directory is: /Applications/MAMP/htdocs/barebonessite/wp-   content/themes/barebones/./20130503-1325"
Config Error, aborting ! {{case_clause,{error,enoent}},
                      [{xmerl_scan,fetch_DTD,2,
                           [{file,"xmerl_scan.erl"},{line,1283}]},
                       {xmerl_scan,scan_doctype2,3,
                           [{file,"xmerl_scan.erl"},{line,1227}]},
                       {xmerl_scan,scan_prolog,4,
                           [{file,"xmerl_scan.erl"},{line,722}]},
                       {xmerl_scan,scan_document,2,
                           [{file,"xmerl_scan.erl"},{line,563}]},
                       {xmerl_scan,file,2,
                           [{file,"xmerl_scan.erl"},{line,249}]},
                       {ts_config,read,2,
                           [{file,"src/tsung_controller/ts_config.erl"},
                            {line,68}]},
                       {ts_config_server,handle_call,3,
                           [{file,
                                "src/tsung_controller/ts_config_server.erl"},
                            {line,198}]},
                       {gen_server,handle_msg,5,
                           [{file,"gen_server.erl"},{line,588}]}]}

我的配置文件如下所示:

<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0">

  <clients>
    <client host='localhost' use_controller_vm='true'/>
  </clients>    

<servers>
    <server host="54.225.212.193" port="80" type="tcp"></server
</servers>

<load>
    <arrivalphase phase="1" duration="10" unit="minute">
        <users maxnumber="650" arrivalrate="8" unit="second"/>
    </arrivalphase>
</load>

<sessions>
    <session probability="100" name="ab" type="ts_http">
        <for from="1" to="20" var="i">
            <request> <http url="/" method="GET" version="1.1"/>   </request>
        </for>
    </session>
</sessions>
</tsung>

作为 Tsung 的新手,我无法解决这里的问题,而且错误报告是相当低级的东西,没有什么意义。

【问题讨论】:

标签: php load tsung


【解决方案1】:

我使用 Homebrew 在 osx 上安装 tsung,但在使用示例 xml 文件时出现此错误。

Config Error, aborting ! dtd_not_found

用这个替换文档类型行修复它:

<!DOCTYPE tsung SYSTEM "/usr/local/Cellar/tsung/1.6.0/share/tsung/tsung-1.0.dtd">

【讨论】:

  • 解决了我的问题,在将tsung 升级到1.7.0 后,第一行变为&lt;!DOCTYPE tsung SYSTEM "/usr/local/Cellar/tsung/1.7.0/share/tsung/tsung-1.0.dtd"&gt;
【解决方案2】:

此错误与缺少 dtd 文件有关,您能否检查文件 /usr/share/tsung/tsung-1.0.dtd 是否存在,似乎不存在。 其次,您的 xml 文件似乎在非关闭标签上包含语法错误

问候

【讨论】:

    【解决方案3】:

    如果您使用其他一些 Linux 发行版(不是 mac os),可能还有其他路径:

    /usr/local/share/tsung/tsung-1.0.dtd
    

    注意local 部分

    【讨论】:

      猜你喜欢
      • 2022-07-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多