Hi JunHo,
I use Ubuntu 12.10 and JDK "jdk-7u15-linux-i586.tar.gz" from link: "http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html" I set the env var as: export JAVA_HOME=/usr/lib/jvm/jdk1.7.0 export PATH=/usr/lib/jvm/jdk1.7.0/bin:/home/ubantu/Programs/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games The version on running command "java -version" is: java version "1.7.0_15" Java(TM) SE Runtime Environment (build 1.7.0_15-b03) Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode) I placed the controller war (named: ngrindercontroller.war) file in "/var/lib/tomcat6/webapps" Next I edited "JAVA_OPTS" in catalina.sh file. The tomcat apache page opens On opening url "http://http://192.168.0.64:8080/". But I receive 404 error on opening url "http://http://192.168.0.64:8080/ngrindercontroller/". How can this be accessible? Thanks Vij |
Administrator
|
It's generic tomcat issue. |
Administrator
|
In reply to this post by viji1188
Please upload the catalinia.out file and server.conf. And finally describe what's in the webapps folder . just do ls -al /var/lib/tomcat6/webapps
|
Hi JunHo
Following are the files: catalina.out catalina.out The default tomcat file from /etc/default/tomcat6 tomcat6 I hope this is the servern.conf file you mentioned (from /etc/tomcat6/server.xml) server.xml The webapps folder had the following: total 60228 drwxrwxr-x 4 tomcat6 tomcat6 4096 Mar 1 13:16 . drwxr-xr-x 6 root root 4096 Feb 26 17:26 .. drwxr-xr-x 9 tomcat6 tomcat6 4096 Mar 1 13:16 ngrindercontroller -rw-r--r-- 1 tomcat6 tomcat6 61656776 Feb 27 12:38 ngrindercontroller.war drwxr-xr-x 3 root root 4096 Feb 26 17:26 ROOT Thanks Vij |
Administrator
|
I found the following settings.
# Run Tomcat as this user ID. Not setting this or leaving it blank will use the # default of tomcat6. TOMCAT6_USER=tomcat6 # Run Tomcat as this group ID. Not setting this or leaving it blank will use # the default of tomcat6. TOMCAT6_GROUP=tomcat6
and following error.
Caused by: java.io.IOException: Destination '/usr/share/tomcat6/.ngrinder/database.conf' directory cannot be created
Which mean.. that you run the tomcat with tomcat6 account and ngrinder tries to create .ngrinder folder in /usr/share folder but finally it fails..
To be summarized.. it's the file permission problem.
Please make another account in your system which is not root (root is very dangerous to run ngrinder)
and set the TOMCAT6_USER, TOMCAT6_GROUP with the new account then run tomcat again.
Please make sure that java is workable in the new account.
One more stuff you should consider is...to delete ROOT folder in webapps folder. |
Hi JunHo,
After following your instructions the controller started working. I installed the agent and ran a few tests which worked fine. The graphs also appeared. Now I ran a 1 minute test on following script: from net.grinder.script.Grinder import grinder from net.grinder.script import Test from net.grinder.plugin.http import HTTPRequest from java.lang import System class TestRunner: def __init__(self): grinder.statistics.delayReports=True def __call__(self): Google() Jumpstart() request1 = Test(2, "Google").wrap(HTTPRequest()) def Google(): currentTime = System.currentTimeMillis() result = request1.GET("http://www.google.com") timeTaken = System.currentTimeMillis() googlet = timeTaken - currentTime grinder.logger.info(" vij google time " + str(googlet)) if result.getStatusCode() == 200 : grinder.statistics.forLastTest.success = 0 else : grinder.statistics.forLastTest.success = 1 request2 = Test(1, "Jumpstart").wrap(HTTPRequest()) def Jumpstart(): currentTime = System.currentTimeMillis() result = request2.GET("http://www.jumpstart.com") timeTaken = System.currentTimeMillis() jst = timeTaken - currentTime grinder.logger.info(" vij jumpstart time " + str(jst)) if result.getStatusCode() == 200 : grinder.statistics.forLastTest.success = 1 else : grinder.statistics.forLastTest.success = 0 But the graphs still do not appear. What might have gone wrong? |
Administrator
|
Could you run only google not jumpsrart? 나의 iPhone에서 보냄
|
I used only google url "http://www.google.com" in both the methods in the above script. The graphs still don't appear.
|
Administrator
|
I meant to try with google method 나의 iPhone에서 보냄
|
I tried with just google method:
from net.grinder.script.Grinder import grinder from net.grinder.script import Test from net.grinder.plugin.http import HTTPRequest from java.lang import System class TestRunner: def __init__(self): grinder.statistics.delayReports=True def __call__(self): Google() request = Test(1, "Google").wrap(HTTPRequest()) def Google(): currentTime = System.currentTimeMillis() result = request.GET("http://www.google.com") timeTaken = System.currentTimeMillis() googlet = timeTaken - currentTime grinder.logger.info(" vij google time " + str(googlet)) if result.getStatusCode() == 200 : grinder.statistics.forLastTest.success = 0 else : grinder.statistics.forLastTest.success = 1 No luck again..The graphs don't appear. |
Administrator
|
Which version of ngrinder do u use? 나의 iPhone에서 보냄
|
ngrinder controller 3.1.2 and agent 3.1.2.
|
Administrator
|
testscript.py
Please upload this file and run the test. Important.. upload this file into ngrinder not copy & paste. And let's see what's going on. If it works, please upload the your previous script by downloading the script from ngrinder and upload it here. Do not post the content here using copy&paste. I should see the raw file. |
Hi JunHo,
I ran a test after uploading the script which you attached in the previous message. The test completed successfully and the graphs also appeared. My script which wasn't working earlier, I pasted it in a notepad and saved it as a new script. I uploaded the new script in nGrinder and ran a test. The test again complete successfully and all the graphs appeared. What is the reason behind uploading the file and not directly copy/pasting the script. Any script on uploading and running the test works fine. Thanks Vij |
Administrator
|
No. It's not about uploading or copy&paste.
I believe you mistakenly added some invisible character in the script editor or.. you made wrong alignment with mixed space or tab. |
Hi JunHo,
It works fine now. I need to schedule a test on daily basis and send out the final report with the graphs to the higher management. What would you suggest on this matter. How can I send out all the graphs on daily basis as a part of the report. Could you please provide me suggestions? Thanks Vij |
Many managers interested in the reports.. Using some pdf printer, We can print the page as pdf file which can be shared to managers.. I am also looking for some built in Reporting features in nGrinder..
|
Administrator
|
In reply to this post by viji1188
Your wish is out of our current use case.
There are several options you can try. * Use Grinder instead - You can use The Grinder and Grinder Jenkins plugin to realize your req. * Develop nGrinder plugin by yourself. - nGrinder provide a extension which is invoked every test execution and terminiation. - It uses Atlassian Plugin Framework. so if you take some time to develop this, You might easily develop it. - Check out sample plugin. https://github.com/nhnopensource/ngrinder-networkoverflow * Ask a professional service - http://www.cubrid.org/wiki_ngrinder/entry/professional-service - You can ask a paid service for this scenario. See above. Regards. |
Hi Junoyoon,
I am interested to develop custom plugin.. When I try the ngrinder-networkoverflow plugin, I couldn't able to build because of some Jar's missing in the repository.. Ofcourse I am new to atlasian plugin and the maven usage.. Can you please share one more sample plugin and some documentation about configuring custom plugin in nGrinder instance.. That will be really helpful.. Thanks, Balaji |
Administrator
|
OK. I'll make the basic description of how to develop plugins by next Tuesday.
|
Free forum by Nabble | Edit this page |