This question has been flagged
1 Reply
8845 Views

Hi!

I'm trying to test out load behaviour on the functionalities of a custom module I've been developing with JMeter, but I'm not even getting authenticated correctly.

I've been following these instruction http://selvam4u.wordpress.com/2011/05/25/load-testing-openerp-with-jmeter/

I have the configuration as follows, but I keep getting an INTERNAL SERVER ERROR.

JMeter.png

Am I doing anything wrong? Do I have to enable xmlrpc somewhere and I didn't?

-----------------------------------------------

Message error on logs:

2014-07-01 15:09:01,067 1206 INFO ? werkzeug: 193.136.201.121 - - [01/Jul/2014 15:09:01] "POST /xmlrpc/common HTTP/1.1" 500 -
2014-07-01 15:09:01,074 1206 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 159, in run_wsgi
    execute(app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 146, in execute
    application_iter = app(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 417, in application
    return application_unproxied(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 403, in application_unproxied
    result = handler(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 224, in wsgi_xmlrpc_legacy
    params, method = xmlrpclib.loads(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1135, in loads
    p.feed(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
ExpatError: not well-formed (invalid token): line 1, column 12
2014-07-01 15:09:01,084 1206 INFO ? werkzeug: 193.136.201.121 - - [01/Jul/2014 15:09:01] "POST /xmlrpc/object HTTP/1.1" 500 -
2014-07-01 15:09:01,089 1206 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 159, in run_wsgi
    execute(app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 146, in execute
    application_iter = app(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 417, in application
    return application_unproxied(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 403, in application_unproxied
    result = handler(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 224, in wsgi_xmlrpc_legacy
    params, method = xmlrpclib.loads(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1135, in loads
    p.feed(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
ExpatError: not well-formed (invalid token): line 1, column 12
2014-07-01 15:09:04,574 1206 DEBUG ? openerp.service.cron: cron0 polling for jobs

The second part of the error is from the part I am trying to read from res_partners with the following XML calling http://193.136.200.176:8069/xmlrpc/object:

<?xmlversion="1.0"?>
<methodCall>
    <methodName>execute</methodName>
    <params>
        <param>
            <value><string>may_9</string></value>
        </param>
        <param>
            <value><int>UID</int></value>
        </param>
        <param>
            <value><string>admin</string></value>
        </param>

        <param>
            <value><string>res.partner</string></value>
        </param>
        <param>
            <value><string>read</string></value>
        </param>
        <param>
            <array>
                <data>
                    <int>1</int>
                </data>
                <data>
                    <int>2</int>
                </data>
            </array>
        </param>
        <param>
            <array>
                <data><string>name</string>
                </data>
                <data><string>title</string>
                </data>
            </array>
        </param>
    </params>
</methodCall>

Avatar
Discard

Hello, what are the error messages in the log?

Hi, Could you try a test with replace  <value><int>UID</int></value> by  <value><int>1</int></value> 1 =  admin's id

after testing it works for me: 1) I replaced the UID of my user ID like my previous message 2) Correct the error in the XMLRPC Partner by adding </ data> after <data> <int> 2 </ int> 3) activated the module api web openerp (I do not know if it has an influence)

Best Answer

after having tested your file xmlrpc partner, replace <? xmlVersion = "1.0"?> 
with <? xml version = "1.0"?> with a space between xml and Version

Avatar
Discard
Author

I just found it... And this is where the error was. After two days of banging my head agains my computer, somehow, copy paste messed with the format and erased that space! :) Thanks!