WCAT error: Invalid code received. Error accepting remote connection / faulty XML style sheet?RSS

7 replies

Last post Mar 01, 2012 07:19 AM by alftoo

  • WCAT error: Invalid code received. Error accepting remote connection / faulty XML style sheet?

    Dec 15, 2011 10:19 AM|alftoo|LINK

    Hi,

    I'm new to WCAT and Windows networking in general. I'm hoping someone can help me with these two problems I'm encountering while using WCAT. In short:

    1. When I use wcat.wsf according to instructions in the document, the run always terminates. The pertinent error messages seem to be "Invalid code received. Error accepting remote connection.
    2. I've managed to run the tests manually by first starting wcclient.exe and then wcctl.exe, but I'm not having any luck viewing the log.xml report. It appears that the report.xsl stylesheet doesn't get properly applied.

    Some elaboration:

    1. Invalid code received error during wcat.wsf

    System setup

    • 64-bit Win7 Ultimate
    • WCAT 6.3 (x86)
    • I've tested under my own account (with admin rights), then enabled the built-in Administrator account and tested under it: same results
    • I've tested with a 1-machine and a 2-machine setup, same error occurs under both setups

    This is what the command shell output looks like:

    C:\Program Files (x86)\wcat>wcat.wsf -terminate -run -clients mymachine -t ubr\scenario.ubr -f ubr\settings.ubr -s mymachine -singleip -x
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.

    wcat.wsf - WCAT Utility Script
    Copyright (c) 1995-2010 Microsoft Corporation.

     message: Parsing parameters...
     parameter: terminate
     parameter: run
     parameter: clients = mymachine
     parameter: server = mymachine
     parameter: {wcctl.exe command line} =  -t ubr\scenario.ubr -f ubr\settings.ubr -singleip -x -clients 1 -server mymachine
     message: Terminating all instances of wcclient...
     message: Terminating all local instances of wcctl.exe...
     message: Launching wcclient.exe on all clients...
     message: starting wcclient.exe on mymachine with command line of \\localhost\admin$\wcat\wcclient.exe mymachine -b...
     message: executing '"C:\Program Files (x86)\wcat\wcctl.exe" -t ubr\scenario.ubr -f ubr\settings.ubr -singleip -x -clients 1 -server mymachine'...
    Initializing performance counters...
    '\\mymachine\Processor(_Total)\% Processor Time'... Success!
    '\\mymachine\Processor(_Total)\% User Time'... Success!
    '\\mymachine\Processor(_Total)\% Privileged Time'... Success!
    '\\mymachine\System\Context Switches/sec'... Success!
    Performance counter initialization complete.

    Initializing performance counters...
    '\\mymachine\Processor(_Total)\% Processor Time'... Success!
    '\\mymachine\Processor(_Total)\% Privileged Time'... Success!
    '\\mymachine\Processor(_Total)\% User Time'... Success!
    '\\mymachine\Processor(_Total)\Interrupts/sec'... Success!
    '\\mymachine\Memory\Available KBytes'... Success!
    '\\mymachine\Process(w3wp)\Working Set'... Success!
    '\\mymachine\System\Context Switches/sec'... Success!
    '\\mymachine\System\System Calls/sec'... Success!
    '\\mymachine\Web Service(_Total)\Bytes Received/sec'... Success!
    '\\mymachine\Web Service(_Total)\Bytes Sent/sec'... Success!
    '\\mymachine\Web Service(_Total)\Connection Attempts/sec'... Success!
    '\\mymachine\Web Service(_Total)\Get Requests/sec'... Success!
    Performance counter initialization complete.

    Server: mymachine
    Clients: 1
    (1)     mymachine

    All clients connected, Test beginning.
    Invalid code received.
    Error accepting remote connection.
     message: Run error detected, terminating clients...
     message: Terminating all instances of wcclient...
     message: Terminating all local instances of wcctl.exe...

    C:\Program Files (x86)\wcat>

    The settings.ubr file:

    settings
    {
        clientfile     = "ubr\\scenario.ubr";
        server         = "mymachine";
        clients        = 1;
        virtualclients = 10;

        counters
        {
            interval = 10;

            counter = "Processor(_Total)\\% Processor Time";
            counter = "Processor(_Total)\\% Privileged Time";
            counter = "Processor(_Total)\\% User Time";
            counter = "Processor(_Total)\\Interrupts/sec";

            counter = "Memory\\Available KBytes";

            counter = "Process(w3wp)\\Working Set";

            counter = "System\\Context Switches/sec";
            counter = "System\\System Calls/sec";

            counter = "Web Service(_Total)\\Bytes Received/sec" ;
            counter = "Web Service(_Total)\\Bytes Sent/sec" ;
            counter = "Web Service(_Total)\\Connection Attempts/sec" ;
            counter = "Web Service(_Total)\\Get Requests/sec" ;
        }
    }

     The scenario.ubr file:

    scenario
    {
        name    = "scenario 1";

        warmup      = 20;
        duration    = 20;
        cooldown    = 10;

        default
        {
            setheader
            {
                name    = "Connection";
                value   = "keep-alive";
            }

            setheader
            {
                name    = "Host";
                value   = server();
            }

            version     = HTTP11;
            close       = ka;
            verb        = POST;
        }

        transaction
        {
            id = "transaction 1";
            weight = 1;

            request
            {
                url         = "/dss.asp";
                postdata    = <Req.xml>;
                statuscode  = 200;
            }
           
            {
                delay       = rand("1000", "5000");
            }

        }
    }

    Even though running the test by using wcat.wsf fails, I've managed to run the test by starting first the client manually, and then the controller, using the following 2 command lines (in 2 separate command prompts):

    wcclient.exe mymachine -b
    wcctl.exe -t ubr\scenario.ubr -f ubr\settings.ubr -singleip -x -clients 1 -server mymachine


     2. Invalid report.xsl style sheet?

    If I try to open the log.xml file (with report.xsl in the same directory) that was generated by running the test as described at the end of question 1 with IE9, the output is formatted very awkwardly (seems like all XML elements have just been separated by a space and there is no indentation or anything).

    If I try to open in Firefox, i get the error: Error during XSLT transformation: An unknown XPath extension function was called.

    If I try to open in XML Notepad 2007:

    • The XSL Output window says "Error Transforming XML. The variable or parameter 'rowID' is either not defined or it is out of scope."
    • The Error List window says "The 'report' element is not declared (log.xml: line 3)"

    What am I missing?

    WCAT iis7 error

  • Re: WCAT error: Invalid code received. Error accepting remote connection / faulty XML style sheet...

    Dec 22, 2011 03:01 PM|HCamper|LINK

    Hi,

    Sorry for late reply.

    For number 2. Check the browser mode for IE settings using the Developer Tool Function Key F12. 

    For number 1. "I've tested under my own account (with admin rights) seems to be part of the problems.

                             Try using RunAs Administrator or Search IIS Forums for "Elevated Command Prompt".

    Martin

     

                         

                         

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: WCAT error: Invalid code received. Error accepting remote connection / faulty XML style sheet...

    Jan 06, 2012 08:28 AM|HCamper|LINK

    Hello,

    I suggest you check the WCAT Trouble Shooting Guide

     http://blogs.iis.net/mukhtard/archive/2009/03/16/troubleshooting-wcat-web-capacity-analysis-tool-problems.aspx .

    Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: WCAT error: Invalid code received. Error accepting remote connection / faulty XML style sheet...

    Jan 09, 2012 03:03 PM|alftoo|LINK

    Thanks for both replies. Yes, I also noticed that I could read the XML if I swiched to compatibility mode using developer tools (F12). As I mentioned in the original post, I did also try the built-in admin account. And in all cases I used an elevated command prompt. The only way to get the tests run is by launching wcclient.exe and wcctl.exe manually. That's not a big problem, so getting the script to work no longer seems very important. Now my only gripe is that performance counters are not being polled throughout the test, as mentioned in the thread "WCAT 6.3 Performance Counters are only being read once" (http://forums.iis.net/p/1185935/2010181.aspx).
  • Re: WCAT error: Invalid code received. Error accepting remote connection / faulty XML style sheet...

    Jan 14, 2012 08:57 AM|HCamper|LINK

    Hello,

    WCAT errors remote problems connections ?

    Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: WCAT error: Invalid code received. Error accepting remote connection / faulty XML style sheet...

    Jan 22, 2012 06:11 AM|HCamper|LINK

     Hi,

    A Suggestion start out simple ( Kiss!) test piece wise.

    Begin with simple test.ubr  then add  the Performance Counters the run the tests.

    The add to the simple test  other items for Memory and other resouces.

    Just a suggestion,

    Martin

     

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: WCAT error: Invalid code received. Error accepting remote connection / faulty XML style sheet...

    Feb 08, 2012 04:35 AM|tjgalama|LINK

    Regarding the invalid style sheet (point 2);

    when I installed WCat 6.3 , the report.xsl contained the following errors:

    • Variable 'i' has not been declared (line: 52, column: 13)
    • The variable or parameter 'rowId' is either not defined or it is out of scope. (line: 1182, column: 37)
    • The variable or parameter 'state' is either not defined or it is out of scope. (line: 1185, column: 14)

    You can simply fix this manually:

    1. Cut the code on lines 1151-1157 and paste it on line 1146.  
    2. on line 51 add: var i=0;

    please let me know if this solves the problem.

    WCAT error

  • Re: WCAT error: Invalid code received. Error accepting remote connection / faulty XML style sheet...

    Mar 01, 2012 07:19 AM|alftoo|LINK

    Firefox will still show an error: "Error during XSLT transformation: An unknown XPath extension function was called." XML Notepad 2007 however manages to display the report after the changes you suggested.