기본 테스트(http://naver.com, 1분) 에서 30부분에 테스트 실패

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

기본 테스트(http://naver.com, 1분) 에서 30부분에 테스트 실패

devin cook
안녕하세요.
엔그라인더 구축과정으로 1분간 수행하는 테스트를 돌리면 30초 부근에 아래와 같은 오류가 발생하면서 테스트가 종료됩니다.

즐거운 주말 되세요.

[컨트롤러 로그모니터링]
2013-11-15 21:53:37,168 INFO PerfTestService.java:754 : Grinder Properties : {grinder.threads=1, grinder.numberOfOldLogs=1, grinder.jvm.classpath=., grinder.test.id=test_98, grinder.duration=60000, grinder.sleepTimeVariation=0.2, grinder.runs=0, grinder.useConsole=true, grinder.script=TestRunner.groovy, grinder.jvm=java, grinder.security=false, grinder.processIncrement=0, grinder.sleepTimeFactor=1, ngrinder.etc.hosts=naver.com, grinder.user=admin, grinder.reportTimesToConsole=true, grinder.debug.singleprocess=false, grinder.processes=1, grinder.ignoreSampleCount=0, grinder.reportToConsole.interval=500, grinder.agents=1, grinder.dcrinstrumentation=true, grinder.logProcessStreams=true}
2013-11-15 21:53:37,169 DEBUG PerfTestService.java:431 : Progress : Test - 98 : 1 agents are starting.
2013-11-15 21:53:37,176 INFO AgentManager.java:394 : 1 agents are starting for user admin
2013-11-15 21:53:37,177 INFO AgentManager.java:396 : - Agent diginori-pc
2013-11-15 21:53:37,434 DEBUG PerfTestService.java:431 : Progress : Test - 98 : 1 agents are ready.
2013-11-15 21:53:37,442 DEBUG PerfTestService.java:431 : Progress : Test - 98 : All necessary files are being distributed.
2013-11-15 21:53:37,470 DEBUG PerfTestService.java:431 : Progress : Test - 98 : - TestRunner.groovy
2013-11-15 21:53:38,935 DEBUG PerfTestService.java:431 : Progress : Test - 98 : All necessary files are distributed.
2013-11-15 21:53:38,945 DEBUG PerfTestService.java:431 : Progress : Test - 98 : The test is ready to start.
2013-11-15 21:53:38,953 DEBUG PerfTestService.java:431 : Progress : Test - 98 : The test is started.
2013-11-15 21:53:38,967 DEBUG MonitorClientSerivce.java:69 : Created MonitorClientSerivce.
2013-11-15 21:53:38,968 DEBUG MonitorClientSerivce.java:85 : Init MonitorClientSerivce for naver.com:13243
2013-11-15 21:53:38,971 INFO SingleConsole.java:1304 : Sampling is started
2013-11-15 21:53:41,783 DEBUG FileEntryRepository.java:174 : findAll() to the not existing folder naver.com/lib/
2013-11-15 21:53:41,836 DEBUG FileEntryRepository.java:174 : findAll() to the not existing folder naver.com/resources/
2013-11-15 21:54:01,246 DEBUG MBeanClient.java:86 : Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: naver.com; nested exception is:
java.net.ConnectException: Connection timed out: connect]
2013-11-15 21:54:02,568 WARN SingleConsole.java:903 : Stop the test because the count of test error is more than half of total tps for last 10 seconds.
2013-11-15 21:54:02,571 DEBUG PerfTestService.java:431 : Progress : Test - 98 : Too many errors
2013-11-15 21:54:02,582 ERROR PerfTestRunnable.java:404 : Abnormal test 98 due to TOO_MANY_ERRORS
2013-11-15 21:54:03,027 ERROR PerfTestRunnable.java:478 : Terminate 98
2013-11-15 21:54:03,027 INFO SingleConsole.java:1317 : Sampling is stopped
2013-11-15 21:54:03,027 INFO MonitorCollectorListener.java:92 : remove monitors on [org.ngrinder.model.AgentInfo@6204f391[ip=naver.com,port=13243,agentIdentity=,hostName=,status=,systemStat=,region=,number=0,approved=false,id=]]
2013-11-15 21:54:03,029 INFO PerfTestService.java:1176 : Total Statistics for test 98 is {Peak_TPS=0.0, Tests=0.0, Mean_time_to_first_byte=0.0, Response_bytes_per_second=0.0, Errors=3.0, TPS=0.0, Mean_Test_Time_(ms)=0.0}
2013-11-15 21:54:03,029 DEBUG PerfTestService.java:431 : Progress : Test - 98 : Stoped by error
2013-11-15 21:54:22,253 DEBUG MBeanClient.java:86 : Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: naver.com; nested exception is:
java.net.ConnectException: Connection timed out: connect]
2013-11-15 21:54:22,254 ERROR MonitorClientSerivce.java:150 : Error while MonitorExecutorWorker is running. Disconnect this MBean client.
java.lang.NullPointerException: null
at org.ngrinder.perftest.service.monitor.MonitorClientSerivce.getMonitorData(MonitorClientSerivce.java:138) [MonitorClientSerivce.class:na]
at org.ngrinder.perftest.service.monitor.MonitorClientSerivce.saveDataCache(MonitorClientSerivce.java:193) [MonitorClientSerivce.class:na]
at org.ngrinder.perftest.service.monitor.MonitorTask.run(MonitorTask.java:115) [MonitorTask.class:na]
at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.7.0_21]
at java.util.TimerThread.run(Timer.java:505) [na:1.7.0_21]


[agent 콘솔 화면 로그]
2013-11-15 21:53:39,026 INFO  net.grinder.AgentDaemon: worker diginori-pc-0 started
2013-11-15 21:53:43,515 INFO  diginori-pc-0: starting threads
2013-11-15 21:53:43,548 INFO  diginori-pc-0: will shut down after 60000 ms
2013-11-15 21:54:03,042 INFO  net.grinder.AgentDaemon: received a stop message
2013-11-15 21:54:03,044 INFO  net.grinder.AgentDaemon: dont start anymore by message from controller.
2013-11-15 21:54:03,049 INFO  diginori-pc-0: waiting for threads to terminate
2013-11-15 21:54:06,057 INFO  net.grinder.AgentDaemon: received a stop message
2013-11-15 21:54:07,664 INFO  diginori-pc-0: finished
2013-11-15 21:54:08,059 INFO  net.grinder.AgentDaemon: communication shut down
2013-11-15 21:54:08,060 INFO  net.grinder.AgentDaemon: Terminating unresponsive processes by force
2013-11-15 21:54:08,164 INFO  net.grinder.AgentDaemon: all workers are finished
2013-11-15 21:54:08,167 INFO  net.grinder.AgentDaemon: finished
2013-11-15 21:54:08,168 INFO  agent controller: send log for test_98

[테스트 코드]
package org.ngrinder;

import static net.grinder.script.Grinder.grinder
import static org.junit.Assert.*
import static org.hamcrest.Matchers.*
import net.grinder.plugin.http.HTTPRequest
import net.grinder.plugin.http.HTTPPluginControl;
import net.grinder.script.GTest
import net.grinder.script.Grinder
import net.grinder.scriptengine.groovy.junit.GrinderRunner
import net.grinder.scriptengine.groovy.junit.annotation.BeforeProcess
import net.grinder.scriptengine.groovy.junit.annotation.BeforeThread
// import static net.grinder.util.GrinderUtils.* // You can use this if you're using nGrinder after 3.2.3
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Test
import org.junit.runner.RunWith

import HTTPClient.HTTPResponse
import HTTPClient.NVPair

/**
 * A simple example using the HTTP plugin that shows the retrieval of a
 * single page via HTTP.
 *
 * This script is automatically generated by ngrinder.
 *
 * @author admin
 */
@RunWith(GrinderRunner)
class TestRunner {
        public static GTest test
        public static HTTPRequest request

        @BeforeProcess
        public static void beforeProcess() {
                HTTPPluginControl.getConnectionDefaults().timeout = 6000
                test = new GTest(1, "naver.com")
                request = new HTTPRequest()
                test.record(request);
                grinder.logger.info("before process.");
        }

        @BeforeThread
        public void beforeThread() {
                grinder.statistics.delayReports=true;
                grinder.logger.info("before thread.");
        }

        @Test
        public void test(){
                HTTPResponse result = request.GET("http://naver.com")

                if (result.statusCode == 301 || result.statusCode == 302) {
                        grinder.logger.warn("Warning. The response may not be correct. The response code was {}.", result.statusCode);
                } else {
                        assertThat(result.statusCode, is(200));
                }
        }
}

Reply | Threaded
Open this post in threaded view
|

RE: 기본 테스트(http://naver.com, 1분) 에서 30부분에 테스트 실패

junoyoon
Administrator

에러가 아닌 것으로 보이네요. 아래 로그중 에러 부분은 naver.com 을 모니터링 하려고 시도하다가 실패하는 부분(의도된 처리입니다.)과, 

에이전트에 비정상적인 스크립트가 실행될때, 이를 강제로 정지하는 과정입니다.

 

지금 테스트가 naver.com 으로 시도되는데, 일단 저희 대신에 구글로 쏴주시구요(^^)...

naver.com 이 아무래도 에이전트에서 방화벽으로 접근 못하게 되어 있는 듯 하네요.

 

Reply | Threaded
Open this post in threaded view
|

RE: 기본 테스트(http://naver.com, 1분) 에서 30부분에 테스트 실패

devin cook
넵 감사합니다. 처음 몇번은 된엇는데요. 차단되어 그런가 보네요. 즐거운 주말 되세욤.