Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

funkload parse xml fail #156

Open
daoiqi opened this issue Nov 18, 2016 · 0 comments
Open

funkload parse xml fail #156

daoiqi opened this issue Nov 18, 2016 · 0 comments

Comments

@daoiqi
Copy link

daoiqi commented Nov 18, 2016

when nginx report 502 error, funkload parse xml fail

<funkload version="1.17.1" time="2016-11-17T21:11:56.634668">
<config key="sleep_time_min" value="0.0" />
<config key="node" value="VM_96_146_centos" />
<config key="startup_delay" value="0.0" />
<config key="cycles" value="[1, 4, 8, 10, 15, 20, 25, 30, 40, 80, 160]" />
<config key="cycle_time" value="12.0" />
<config key="description" value="No test description" />
<config key="configuration_file" value="/tmp/funkload-bench-sandbox/host1cpu5/413c69d3c70a0fd246a524003c35c8cb/Simple.conf" />
<config key="class_title" value="Simple FunkLoad tests" />
<config key="server_url" value="http://web_all.com/" />
<config key="module" value="run_web" />
<config key="id" value="test_launch" />
<config key="class_description" value="Simply testing a default static page" />
<config key="sleep_time" value="0.01" />
<config key="sleep_time_max" value="0.0" />
<config key="duration" value="20" />
<config key="method" value="test_launch" />
<config key="log_xml" value="/tmp/funkload-bench-sandbox/host1cpu5/413c69d3c70a0fd246a524003c35c8cb/simple-bench.xml" />
<config key="class" value="Simple" />
<config key="python_version" value="2.7.8" />
<response cycle="000" cvus="001" thread="000" suite="Simple" name="test_launch" step="001" number="001" type="post" result="Successful" url="/web/cgi" code="200" description="add host tag" time="1479388316.64" duration="1.774091959" />
<testResult cycle="008" cvus="040" thread="038" suite="Simple" name="test_launch"  time="1479388604.73" result="Successful" steps="1" duration="5.10684895515" connection_duration="5.10645508766" requests="1" pages="1" xmlrpc="0" redirects="0" images="0" links="0" />
<response cycle="008" cvus="040" thread="039" suite="Simple" name="test_launch" step="001" number="001" type="post" result="Successful" url="/web/cgi" code="200" description="add host tag" time="1479388604.71" duration="5.1419210434" />
<testResult cycle="008" cvus="040" thread="039" suite="Simple" name="test_launch"  time="1479388604.71" result="Successful" steps="1" duration="5.1423060894" connection_duration="5.1419210434" requests="1" pages="1" xmlrpc="0" redirects="0" images="0" links="0" />
<response cycle="008" cvus="040" thread="035" suite="Simple" name="test_launch" step="001" number="001" type="post" result="Successful" url="/web/cgi" code="200" description="add host tag" time="1479388604.73" duration="5.13349485397" />
<testResult cycle="008" cvus="040" thread="035" suite="Simple" name="test_launch"  time="1479388604.73" result="Successful" steps="1" duration="5.13394498825" connection_duration="5.13349485397" requests="1" pages="1" xmlrpc="0" redirects="0" images="0" links="0" />
<response cycle="008" cvus="040" thread="032" suite="Simple" name="test_launch" step="001" number="001" type="post" result="Successful" url="/web/cgi" code="200" description="add host tag" time="1479388604.74" duration="5.14450097084" />
<testResult cycle="008" cvus="040" thread="032" suite="Simple" name="test_launch"  time="1479388604.74" result="Successful" steps="1" duration="5.14501214027" connection_duration="5.14450097084" requests="1" pages="1" xmlrpc="0" redirects="0" images="0" links="0" />
<testResult cycle="009" cvus="080" thread="075" suite="Simple" name="test_launch"  time="1479388629.51" result="Failure" steps="1" duration="0.0518209934235" connection_duration="0.0511910915375" requests="1" pages="0" xmlrpc="0" redirects="0" images="0" links="0" traceback="Traceback (most recent call last):&#10;   File &quot;/tmp/funkload-bench-sandbox/host1cpu5/413c69d3c70a0fd246a524003c35c8cb/lib/python2.7/site-packages/funkload-1.17.1-py2.7.egg/funkload/FunkLoadTestCase.py&quot;, line 1019, in __call__&#10;    testMethod()&#10;   File &quot;/tmp/funkload-bench-sandbox/host1cpu5/413c69d3c70a0fd246a524003c35c8cb/run_web.py&quot;, line 199, in test_launch&#10;    res = self.post(server_url, params=data, description='add host tag')&#10;   File &quot;/tmp/funkload-bench-sandbox/host1cpu5/413c69d3c70a0fd246a524003c35c8cb/lib/python2.7/site-packages/funkload-1.17.1-py2.7.egg/funkload/FunkLoadTestCase.py&quot;, line 421, in post&#10;    follow_redirect=follow_redirect)&#10;   File &quot;/tmp/funkload-bench-sandbox/host1cpu5/413c69d3c70a0fd246a524003c35c8cb/lib/python2.7/site-packages/funkload-1.17.1-py2.7.egg/funkload/FunkLoadTestCase.py&quot;, line 332, in _browse&#10;    response = self._connect(url, params, ok_codes, method, description)&#10;   File &quot;/tmp/funkload-bench-sandbox/host1cpu5/413c69d3c70a0fd246a524003c35c8cb/lib/python2.7/site-packages/funkload-1.17.1-py2.7.egg/funkload/FunkLoadTestCase.py&quot;, line 245, in _connect&#10;    raise self.failureException, str(value.response)&#10; AssertionError: /web/cgi&#10;HTTP Response 502: Bad Gateway&#10;" />
<response cycle="009" cvus="080" thread="071" suite="Simple" name="test_launch" step="001" number="001" type="post" result="Failure" url="/web/cgi" code="502" description="add host tag" time="1479388629.53" duration="0.0398890972137">
  <headers>
    <header name="date" value="Thu, 17 Nov 2016 13:17:09 GMT" />
    <header name="connection" value="close" />
    <header name="content-type" value="text/html" />
    <header name="content-length" value="3695" />
    <header name="server" value="nginx/1.0.15" />
  </headers>
  <body><![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>The page is temporarily unavailable</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <style type="text/css">
            /*<![CDATA[*/
            body {
                background-color: #fff;
                color: #000;
                font-size: 0.9em;
                font-family: sans-serif,helvetica;
                margin: 0;
                padding: 0;
            }
            :link {
                color: #c00;
            }
            :visited {
                color: #c00;
            }
            a:hover {
                color: #f50;
            }
            h1 {
                text-align: center;
                margin: 0;
                padding: 0.6em 2em 0.4em;
                background-color: #294172;
                color: #fff;
                font-weight: normal;
                font-size: 1.75em;
                border-bottom: 2px solid #000;
            }
            h1 strong {
                font-weight: bold;
                font-size: 1.5em;
            }
            h2 {
                text-align: center;
                background-color: #3C6EB4;
                font-size: 1.1em;
                font-weight: bold;
                color: #fff;
                margin: 0;
                padding: 0.5em;
                border-bottom: 2px solid #294172;
            }
            h3 {
                text-align: center;
                background-color: #ff0000;
                padding: 0.5em;
                color: #fff;
            }
            hr {
                display: none;
            }
            .content {
                padding: 1em 5em;
            }
            .alert {
                border: 2px solid #000;
            }

            img {
                border: 2px solid #fff;
                padding: 2px;
                margin: 2px;
            }
            a:hover img {
                border: 2px solid #294172;
            }
            .logos {
                margin: 1em;
                text-align: center;
            }
            /*]]>*/
        </style>
    </head>

    <body>
        <h1><strong>nginx error!</strong></h1>

        <div class="content">

            <h3>The page you are looking for is temporarily unavailable.  Please try again later.</h3>

            <div class="alert">
                <h2>Website Administrator</h2>
                <div class="content">
                    <p>Something has triggered an error on your
                    website.  This is the default error page for
                    <strong>nginx</strong> that is distributed with
                    EPEL.  It is located
                    <tt>/usr/share/nginx/html/50x.html</tt></p>

                    <p>You should customize this error page for your own
                    site or edit the <tt>error_page</tt> directive in
                    the <strong>nginx</strong> configuration file
                    <tt>/etc/nginx/nginx.conf</tt>.</p>

                </div>
            </div>

            <div class="logos">
                <a href="http://nginx.net/"><img
                    src="/nginx-logo.png"
                    alt="[ Powered by nginx ]"
                    width="121" height="32" /></a>

                <a href="http://fedoraproject.org/"><img
                    src="/poweredby.png"
                    alt="[ Powered by Fedora EPEL ]"
                    width="88" height="31" /></a>
            </div>
        </div>
    </body>
</html>

]]>
  </body>
</response>
</funkload>

>>> ElementTree(file='host1cpu5-simple-bench.xml')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 546, in __init__
    self.parse(file)
  File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 586, in parse
    parser.feed(data)
  File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 1245, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 117, column 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant