Tsung load test from mac os x
Asked Answered
S

3

7

I am trying to fire off a Tsung request from my Mac OS X machine and i'm not having much luck.

I have edited the ~/.tsung/tsung.xml config file and even tried changing the location of that file on several occasions with the -f parameter.

When I run tsung start it returns this output

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}]}]}

My config file looks like this:

<?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>

Being new to Tsung I cannot work out the problem here and the error reporting is pretty low level stuff and makes little sense.

Subnormal answered 3/5, 2013 at 12:29 Comment(0)
T
14

I used Homebrew to install tsung on osx and was getting this error when using the example xml files.

Config Error, aborting ! dtd_not_found

Replacing the doc type line with this fixed it:

<!DOCTYPE tsung SYSTEM "/usr/local/Cellar/tsung/1.6.0/share/tsung/tsung-1.0.dtd">
Tel answered 6/10, 2016 at 22:42 Comment(2)
that solved my issue, after upgrading tsung to 1.7.0 so the first line becomes <!DOCTYPE tsung SYSTEM "/usr/local/Cellar/tsung/1.7.0/share/tsung/tsung-1.0.dtd">Lifesaver
For me it was: "/opt/homebrew/Cellar/tsung/1.7.0/share/tsung/tsung-1.0.dtd"Neckwear
L
5

This error is related to a dtd file missing, could you check that the file /usr/share/tsung/tsung-1.0.dtd exists, it seems not. Secondly your xml file seems to contains a syntax error on a non close tag

Regards

Lander answered 6/5, 2013 at 21:36 Comment(0)
P
0

There might be another path in case you are using some other Linux distributions (not mac os):

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

note local part

Produce answered 18/7, 2019 at 15:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.