Script error in performance test

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Script error in performance test

viji1188
I have nGrinder controller version 3.0.4, nGrinder agent version 3.0.3 and Apache Tomcat Version 6.0.36.
I receive a SCRIPT_ERROR on running a performance test in nGrinder.
A Default script was generated on performing performance test for "http://www.google.com" which is as follows:

from net.grinder.script.Grinder import grinder
from net.grinder.script import Test
from net.grinder.plugin.http import HTTPRequest

test1 = Test(1, "Test1")
request1 = test1.wrap(HTTPRequest())

class TestRunner:
        def __call__(self):
                grinder.statistics.delayReports=True
               
                result = request1.GET("http://www.google.com")
               
                if result.getStatusCode() == 200 :
                        grinder.statistics.forLastTest.success = 1
                else :
                        grinder.statistics.forLastTest.success = 0

What's the script error in the above code?

The nGrinder log file consisted of following error:

12:02:18 INFO  SingleConsole.java:1064 :  Sampling is started
12:02:21 ERROR PerfTestRunnable.java:393 :  Abnormal test 6 by SCRIPT_ERROR
12:02:23 ERROR PerfTestRunnable.java:445 :  Terminate 6
12:02:23 INFO  PerfTestService.java:1029 :  Total Statistics for test 6  is {}
12:02:23 INFO  SingleConsole.java:1080 :  Sampling is stopped
12:02:23 INFO  PerfTestRunnable.java:360 :  remove monitors on

[org.ngrinder.agent.model.AgentInfo@e8ed8a[ip=www.google.com,port=13243,agentIdentity=<null>,hostName=,status=<null>,region=<null>

,approved=false,id=<null>]] for perftest 6
12:02:23 ERROR MonitorAgentService.java:73 :  Error occurs while remove monitor for www.google.com
12:02:24 ERROR PerfTestService.java:776 :  Report data for 6 in TPS does not exisit.
12:02:24 ERROR PerfTestService.java:819 :  Report data for 6 in TPS does not exisit.
Reply | Threaded
Open this post in threaded view
|

RE: Script error in performance test

junoyoon
Administrator

Hi. There.


Usually www.google.com responses the other http response code(302 redirect)


So the test is failed by the response code checking (result.getStatusCode() == 200)


http://www.google.com/ -> 302 Found, 221 bytes [Redirect, ensure the next URL is <a href="http://www.google.co.kr/]">http://www.google.co.kr/]



You can try the other site.


Regards.


JunHo Yoon
Global Platform Development Lab
/ Senior Engineer

13th FL., Bundang First Tower, 266-1, Seohyeon-dong, Bundang-gu, Seongnam-si, Gyeonggi-do, 463-824, KOREA
Tel 031-600-9071   Fax --   Mobile 010-6255-0559
Email  [hidden email]

NHN Business & Platform NAVER HANGAME 쥬니어네이버 해피빈 미투데이


-----Original Message-----
From: "viji1188 [via ngrinder]"<[hidden email]>
To: "junoyoon"<[hidden email]>;
Cc:
Sent: 2012-12-26 (수) 16:36:15
Subject: Script error in performance test

I have nGrinder controller version 3.0.4, nGrinder agent version 3.0.3 and Apache Tomcat Version 6.0.36.
I receive a SCRIPT_ERROR on running a performance test in nGrinder.
A Default script was generated on performing performance test for "http://www.google.com" which is as follows:

from net.grinder.script.Grinder import grinder
from net.grinder.script import Test
from net.grinder.plugin.http import HTTPRequest

test1 = Test(1, "Test1")
request1 = test1.wrap(HTTPRequest())

class TestRunner:
        def __call__(self):
                grinder.statistics.delayReports=True
               
                result = request1.GET("http://www.google.com")
               
                if result.getStatusCode() == 200 :
                        grinder.statistics.forLastTest.success = 1
                else :
                        grinder.statistics.forLastTest.success = 0

What's the script error in the above code?

The nGrinder log file consisted of following error:

12:02:18 INFO  SingleConsole.java:1064 :  Sampling is started
12:02:21 ERROR PerfTestRunnable.java:393 :  Abnormal test 6 by SCRIPT_ERROR
12:02:23 ERROR PerfTestRunnable.java:445 :  Terminate 6
12:02:23 INFO  PerfTestService.java:1029 :  Total Statistics for test 6  is {}
12:02:23 INFO  SingleConsole.java:1080 :  Sampling is stopped
12:02:23 INFO  PerfTestRunnable.java:360 :  remove monitors on

[org.ngrinder.agent.model.AgentInfo@e8ed8a[ip=www.google.com,port=13243,agentIdentity=<null>,hostName=,status=<null>,region=<null>

,approved=false,id=<null>]] for perftest 6
12:02:23 ERROR MonitorAgentService.java:73 :  Error occurs while remove monitor for www.google.com
12:02:24 ERROR PerfTestService.java:776 :  Report data for 6 in TPS does not exisit.
12:02:24 ERROR PerfTestService.java:819 :  Report data for 6 in TPS does not exisit.


If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/Script-error-in-performance-test-tp90.html
To start a new topic under ngrinder-user, email [hidden email]
To unsubscribe from ngrinder-user, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

RE: Script error in performance test

viji1188
Hi

I tried with the response code 302, but i still receive the error (SCRIPT_ERROR). I tried another URL i.e. "http://www.jumpstart.com/" with response code 200 and received SCRIPT_ERROR again.
Script:

from net.grinder.script.Grinder import grinder
from net.grinder.script import Test
from net.grinder.plugin.http import HTTPRequest

test1 = Test(1, "Test1")
request1 = test1.wrap(HTTPRequest())

class TestRunner:
        def __call__(self):
                grinder.statistics.delayReports=True
               
                result = request1.GET("http://www.jumpstart.com/")
               
                if result.getStatusCode() == 200 :
                        grinder.statistics.forLastTest.success = 1
                else :
                        grinder.statistics.forLastTest.success = 0

Could you please help with this.
Reply | Threaded
Open this post in threaded view
|

RE: Script error in performance test

junoyoon
Administrator

Did you run validation on the script?


if every thing is OK in validation,  You can send me the agent log which is available test result page.


Regards.



JunHo Yoon
Global Platform Development Lab
/ Senior Engineer

13th FL., Bundang First Tower, 266-1, Seohyeon-dong, Bundang-gu, Seongnam-si, Gyeonggi-do, 463-824, KOREA
Tel 031-600-9071   Fax --   Mobile 010-6255-0559
Email  [hidden email]

NHN Business & Platform NAVER HANGAME 쥬니어네이버 해피빈 미투데이


-----Original Message-----
From: "viji1188 [via ngrinder]"<[hidden email]>
To: "junoyoon"<[hidden email]>;
Cc:
Sent: 2012-12-26 (수) 17:59:19
Subject: RE: Script error in performance test

Hi

I tried with the response code 302, but i still receive the error (SCRIPT_ERROR). I tried another URL i.e. "http://www.jumpstart.com/" with response code 200 and received SCRIPT_ERROR again.
Script:

from net.grinder.script.Grinder import grinder
from net.grinder.script import Test
from net.grinder.plugin.http import HTTPRequest

test1 = Test(1, "Test1")
request1 = test1.wrap(HTTPRequest())

class TestRunner:
        def __call__(self):
                grinder.statistics.delayReports=True
               
                result = request1.GET("http://www.jumpstart.com/")
               
                if result.getStatusCode() == 200 :
                        grinder.statistics.forLastTest.success = 1
                else :
                        grinder.statistics.forLastTest.success = 0

Could you please help with this.


If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/Script-error-in-performance-test-tp90p92.html
To start a new topic under ngrinder-user, email [hidden email]
To unsubscribe from ngrinder-user, click here.
NAML

log.png (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Script error in performance test

viji1188
This post was updated on .
Hi, I clicked on "Validate script" button for validation. It shows an error "Error: Could not find or load main class and".
The script is the default script for "http://www.jumpstart.com/".
Reply | Threaded
Open this post in threaded view
|

RE: Script error in performance test

junoyoon
Administrator

I think there was no valid class path was set.

 

Could you tell me the version of tomcat and java?

 

And also where did you install the controller war file?

 

It should be located at tomcat webapps/ngrinder-controller-{VERSION}.war or ROOT.war (with renaming)

 

 

JunHo Yoon
Global Platform Development Lab
/ Senior Engineer

13th FL., Bundang First Tower, 266-1, Seohyeon-dong, Bundang-gu, Seongnam-si, Gyeonggi-do, 463-824, KOREA
Tel 031-600-9071   Fax --   Mobile 010-6255-0559
Email  [hidden email]

NHN Business & Platform NAVER HANGAME 쥬니어네이버 해피빈 미투데이

 

-----Original Message-----
From: "viji1188 [via ngrinder]"<[hidden email]>
To: "junoyoon"<[hidden email]>;
Cc:
Sent: 2012-12-26 (수) 20:14:37
Subject: RE: Script error in performance test

Hi, I clicked on "Validate script" button for validation. It shows an error "Error: Could not find or load main class and".
The script is the default script for "http://www.jumpstart.com/".


If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/Script-error-in-performance-test-tp90p94.html
To start a new topic under ngrinder-user, email [hidden email]
To unsubscribe from ngrinder-user, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

RE: Script error in performance test

viji1188
Hi,
I have nGrinder controller version 3.0.4,
nGrinder agent version 3.0.3,
Apache Tomcat Version 6.0.36 and
JDK version 1.7.0_10

I followed the instruction as per the installation guide in following link:

"http://www.cubrid.org/wiki_ngrinder/entry/installation-guide"

I renamed the controller war file to "ngrindercontroller" and placed it in Webapps folder of "Apache Tomcat".
I am using link "http://localhost:8081/ngrindercontroller" to use nGrinder.

Is there any specific port for the access?

Thanks
Reply | Threaded
Open this post in threaded view
|

RE: Script error in performance test

junoyoon
Administrator
I've tried to reproduce your cases with the same configuration. But I failed..

I need more detailed info. Could you tell me followings?

- What was CLASSPATH env var when you run Tomcat? It should not be set.
- What version of OS do you use?

Don't give up.. We will do our best to make nGrinder work in your env.
Reply | Threaded
Open this post in threaded view
|

RE: Script error in performance test

viji1188
Hi Junoyoon,

I provided only "JAVA_HOME" and "CATALINA_HOME" environment variables.
OS version in my system is "Windows XP Professional (5.1, Build 2600) Service Pack 3"
Following are the env variables in my system:

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\VijethaK\Application Data
CATALINA_HOME=C:\Documents and Settings\VijethaK\My Documents\Downloads\apache-tomcat-6.0.36
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=KAI-DT34
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\VijethaK
IS_NITRO_DIR=C:\Program Files\INTELLIGENT SYSTEMS\IS-NITRO-DEBUGGER\
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_10
LOGONSERVER=\\KAI-ADS
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1706
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\VijethaK\LOCALS~1\Temp
TMP=C:\DOCUME~1\VijethaK\LOCALS~1\Temp

Could you tell me which version of Apache Tomcat, JDK, nGrinder controller and agent you are using?

Don't worry I won't give up on nGrinder!
Reply | Threaded
Open this post in threaded view
|

Re: Script error in performance test

junoyoon
Administrator
I think there are some problem running ngrinder in windows

promise to reproduce your env here by tomorrow

나의 iPhone에서 보냄

2012. 12. 27. 오후 6:45 "viji1188 [via ngrinder]" <[hidden email]> 작성:

Hi Junoyoon,

I provided only "JAVA_HOME" and "CATALINA_HOME" environment variables.
OS version in my system is "Windows XP Professional (5.1, Build 2600) Service Pack 3"
Following are the env variables in my system:

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\VijethaK\Application Data
CATALINA_HOME=C:\Documents and Settings\VijethaK\My Documents\Downloads\apache-tomcat-6.0.36
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=KAI-DT34
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\VijethaK
IS_NITRO_DIR=C:\Program Files\INTELLIGENT SYSTEMS\IS-NITRO-DEBUGGER\
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_10
LOGONSERVER=\\KAI-ADS
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1706
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\VijethaK\LOCALS~1\Temp
TMP=C:\DOCUME~1\VijethaK\LOCALS~1\Temp

Could you tell me which version of Apache Tomcat, JDK, nGrinder controller and agent you are using?

Don't worry I won't give up on nGrinder!


If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/Script-error-in-performance-test-tp90p98.html
To start a new topic under ngrinder-user, email [hidden email]
To unsubscribe from ngrinder-user, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Script error in performance test

junoyoon
Administrator
In reply to this post by viji1188
I think you should install tomcat in the folder without space in the path like c:\tomcat  

The spaces in the current tomcat installation make it run abnormally. 

Same to agent. Please locate it in the spaceless folder location. 

나의 iPhone에서 보냄

2012. 12. 27. 오후 6:45 "viji1188 [via ngrinder]" <[hidden email]> 작성:

Hi Junoyoon,

I provided only "JAVA_HOME" and "CATALINA_HOME" environment variables.
OS version in my system is "Windows XP Professional (5.1, Build 2600) Service Pack 3"
Following are the env variables in my system:

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\VijethaK\Application Data
CATALINA_HOME=C:\Documents and Settings\VijethaK\My Documents\Downloads\apache-tomcat-6.0.36
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=KAI-DT34
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\VijethaK
IS_NITRO_DIR=C:\Program Files\INTELLIGENT SYSTEMS\IS-NITRO-DEBUGGER\
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_10
LOGONSERVER=\\KAI-ADS
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1706
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\VijethaK\LOCALS~1\Temp
TMP=C:\DOCUME~1\VijethaK\LOCALS~1\Temp

Could you tell me which version of Apache Tomcat, JDK, nGrinder controller and agent you are using?

Don't worry I won't give up on nGrinder!


If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/Script-error-in-performance-test-tp90p98.html
To start a new topic under ngrinder-user, email [hidden email]
To unsubscribe from ngrinder-user, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Script error in performance test

viji1188
Hi Junoyoon,

I placed the agent and controller in "F:\tomcat\" and I changed the path of the env var (CATALINA_HOME).
I restarted the system and validated the script in nGrinder. I still receive the error message "Error: Could not find or load main class and".
The error message is not complete, it does not display anything after "and". Is there any way to check the detailed error message?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Script error in performance test

junoyoon
Administrator
The reason might be that your script would be checkout still c:\Document and Settings\youraccount\.ngrinder\script\...

ngrinder uses {user account}\.ngrinder path for data.
There are still spaces... in the path.
OK. You can provide NGRINDER_HOME env var for controller data folder
For example,

NGRINDER_HOME=f:\ngrinder\controller\home
NGRINDER_AGENT_HOME=f:\ngrinder\agent\home

And restart the agent and controller.


Reply | Threaded
Open this post in threaded view
|

Re: Script error in performance test

junoyoon
Administrator
In reply to this post by viji1188
I'm describing the more detailed guide.

Several stuffs seems to be affected..
At first your .ngrinder and .ngrinder_agent folder which save the data should be located in the space-less path. However ngrinder create the them in the your account folder (which already has space)
 
In such a case, you should set the env var for them.
Please set env var in the following ways in advance. (Please don't forget to create c:\ngrinder folder in advance)
 
- NGRINDER_AGENT_HOME=c:\ngrinder\agent_home
- NGRINDER_HOME=c:\ngrinder\controller_home
- CATALINA_HOME=c:\ngrinder\controller
 
Then locate the tomcat in the following folder.
- c:\ngrinder\controller
 
Then place the ngrinder.war in the following folder
- c:\ngrinder\controller\webapps
 
If you're running agent in the same machine you should locate the agent in the folder
- c:\ngrinder\agent
 
Then start agent and controllers by running
- c:\ngrinder\agent\run_agent.bat and c:\ngrinder\controller\bin\startup.bat respectively.
 
If you're running Tomcat as Windows Service, you should set the env var in the system env var not user env var.
Tomcat running as Windows Service is only affected by the system env var. You may need restart the Windows to be system env var is affected.
 
Reply | Threaded
Open this post in threaded view
|

Re: Script error in performance test

viji1188
Hey junoyoon! It works! I changed the folder and env var as you said and it works now. Thank you so much for helping me out.

-viji :)
Reply | Threaded
Open this post in threaded view
|

Re: Script error in performance test

junoyoon
Administrator
It was really hard to make it work in old os like windows XP. :-)

Please upgrade it to Win7 later  :-)

Anyway.. If you have any question about nGrinder. please let us know.

We'll help you as long as we can do.