GithubHelp home page GithubHelp logo

Comments (19)

junoyoon avatar junoyoon commented on July 19, 2024

Thanks for informing this. We'll release fix for this by this weekend.

from ngrinder.

junoyoon avatar junoyoon commented on July 19, 2024

Before then, you can add the your hostname and ip mapping to work around this issue.

http://stackoverflow.com/questions/2381316/java-inetaddress-getlocalhost-returns-127-0-0-1-how-to-get-real-ip

from ngrinder.

junoyoon avatar junoyoon commented on July 19, 2024

Could you check snapshot version ?
If it's work we will merge it.

https://www.dropbox.com/sh/2pvu4nuut9wxsez/fMFJkul8f0

from ngrinder.

Kiheung avatar Kiheung commented on July 19, 2024

Thanks for update, I will check that and let you know it.

BTW when I change AgentController.java -> getHostaddress() , then server display the agent list well,
But when I try to run test using that agent, agent fail with this error message
(Failed to connect to '/127.0.1.1:12006')

./run_agent.sh
2012-11-02 15:55:24,734 INFO  org.ngrinder.infra.AgentConfig:     System Environment:  NGRINDER_AGENT_HOME=
2012-11-02 15:55:24,737 INFO  org.ngrinder.infra.AgentConfig:     Java Sytem Property:  ngrinder.agent.home=
2012-11-02 15:55:24,745 TRACE org.ngrinder.common.util.PropertiesWrapper: The verbose is not defined in conf file. Use false instead.
2012-11-02 15:55:24,768 WARN  org.ngrinder.NGrinderStarter: JAVA_HOME is not set. NGrinder is trying to find the JAVA_HOME programically
2012-11-02 15:55:24,769 INFO  org.ngrinder.NGrinderStarter: tools.jar is found in file:/usr/lib/jvm/java-6-sun-1.6.0.16/lib/tools.jar
2012-11-02 15:55:24,783 INFO  org.ngrinder.NGrinderStarter: java.library.path : /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/amd64:./native_lib/::/usr/java/packages/lib/amd64:/lib:/usr/lib:/home/khpark/tools/ngrinder-core-3.0/./native_lib
2012-11-02 15:55:24,785 INFO  org.ngrinder.NGrinderStarter: - Passing mode agent
2012-11-02 15:55:24,785 INFO  org.ngrinder.NGrinderStarter: - nGrinder version 3.0
2012-11-02 15:55:24,792 INFO  org.ngrinder.NGrinderStarter: *************************
2012-11-02 15:55:24,792 INFO  org.ngrinder.NGrinderStarter: Start nGrinder Agent ...
2012-11-02 15:55:24,794 INFO  org.ngrinder.NGrinderStarter: with console: 10.89.3.55:16001
2012-11-02 15:55:24,803 INFO  agent controller daemon: agent controller daemon : started.
2012-11-02 15:55:25,353 INFO  agent controller: connected to agent controller server at /10.89.3.55:16001
2012-11-02 15:55:25,353 INFO  agent controller: waiting for agent controller server signal
2012-11-02 15:56:16,653 INFO  agent controller: received a start agent message
2012-11-02 15:56:16,653 INFO  agent controller: agent start message is revcieved from console net.grinder.messages.agent.StartGrinderMessage@6765f738
2012-11-02 15:56:16,654 INFO  agent controller: starting agent... for test_7
2012-11-02 15:56:16,655 INFO  net.grinder.AgentDaemon: Agent Daemon Agent conntected to port : 12006 is started.
2012-11-02 15:56:16,658 INFO  agent controller: agent started. waiting for agent controller signal
2012-11-02 15:56:16,661 INFO  net.grinder.AgentDaemon: The Grinder 3.9.1
2012-11-02 15:56:16,662 ERROR net.grinder.AgentDaemon: Failed to connect to '/127.0.1.1:12006'
2012-11-02 15:56:16,663 INFO  net.grinder.AgentDaemon: finished
2012-11-02 15:56:16,663 INFO  agent controller: send log for test_7

Should I change controller codes too?
main/java/org/ngrinder/infra/plugin/PluginManager.java:166: InetAddress addr = InetAddress.getLocalHost();
main/java/org/ngrinder/infra/plugin/PluginManager.java:187: InetAddress addr = InetAddress.getLocalHost();
main/java/org/ngrinder/infra/init/LockExDatabaseChangeLogGenerator.java:78: InetAddress localHost;

from ngrinder.

Kiheung avatar Kiheung commented on July 19, 2024

Hello,
I try your ngrinder-controller-3.0.2.war / ngrinder-core-3.0.2-agent-package.tar.gz

  • Agent list is displayed well with real ip address.
  • But when I try to run on that agent, it failed connect with the controller like below
    ( failed to connect to 127.0.0.1:12000 ( controller IP is 10.89.3.X not 127.0.0.1 ) )

$ ./run_agent.sh
2012-11-02 16:41:03,574 INFO  org.ngrinder.infra.AgentConfig:     System Environment:  NGRINDER_AGENT_HOME=
2012-11-02 16:41:03,577 INFO  org.ngrinder.infra.AgentConfig:     Java Sytem Property:  ngrinder.agent.home=
2012-11-02 16:41:03,583 TRACE org.ngrinder.common.util.PropertiesWrapper: The verbose is not defined in conf file. Use false instead.
2012-11-02 16:41:03,603 WARN  org.ngrinder.NGrinderStarter: JAVA_HOME is not set. NGrinder is trying to find the JAVA_HOME programically
2012-11-02 16:41:03,604 INFO  org.ngrinder.NGrinderStarter: tools.jar is found in file:/usr/lib/jvm/java-6-sun-1.6.0.16/lib/tools.jar
2012-11-02 16:41:03,616 INFO  org.ngrinder.NGrinderStarter: java.library.path : /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/amd64:./native_lib/::/usr/java/packages/lib/amd64:/lib:/usr/lib:/home/khpark/tools/ngrinder-core-3.0.2/./native_lib
2012-11-02 16:41:03,617 INFO  org.ngrinder.NGrinderStarter: - Passing mode agent
2012-11-02 16:41:03,618 INFO  org.ngrinder.NGrinderStarter: - nGrinder version 3.0.2
2012-11-02 16:41:03,625 INFO  org.ngrinder.NGrinderStarter: *************************
2012-11-02 16:41:03,625 INFO  org.ngrinder.NGrinderStarter: Start nGrinder Agent ...
2012-11-02 16:41:03,626 INFO  org.ngrinder.NGrinderStarter: with console: 10.89.3.55:16001
2012-11-02 16:41:03,637 INFO  agent controller daemon: agent controller daemon : started.
2012-11-02 16:41:04,183 INFO  agent controller: connected to agent controller server at /10.89.3.55:16001
2012-11-02 16:41:04,183 INFO  agent controller: waiting for agent controller server signal
2012-11-02 16:42:03,223 INFO  agent controller: received a start agent message
2012-11-02 16:42:03,224 INFO  agent controller: agent start message is revcieved from console net.grinder.messages.agent.StartGrinderMessage@31b446d1
2012-11-02 16:42:03,224 INFO  agent controller: starting agent... for test_1
2012-11-02 16:42:03,225 INFO  net.grinder.AgentDaemon: Agent Daemon Agent conntected to port : 12000 is started.
2012-11-02 16:42:03,227 INFO  agent controller: agent started. waiting for agent controller signal
2012-11-02 16:42:03,228 INFO  net.grinder.AgentDaemon: The Grinder 3.9.1
2012-11-02 16:42:03,230 ERROR net.grinder.AgentDaemon: Failed to connect to '/127.0.1.1:12000'
2012-11-02 16:42:03,230 INFO  net.grinder.AgentDaemon: finished
2012-11-02 16:42:03,230 INFO  agent controller: send log for test_1

from ngrinder.

junoyoon avatar junoyoon commented on July 19, 2024

https://www.dropbox.com/sh/2pvu4nuut9wxsez/fMFJkul8f0
Above issue is fixed.
You can download new 3.0.2. All you need is just downloading controller.
Please check if it's OK or not for your env.

from ngrinder.

Kiheung avatar Kiheung commented on July 19, 2024

Thanks for update.

but it also shows "Failed to connect to '/127.0.1.1:12000'"

$ ./run_agent.sh
2012-11-02 18:41:47,804 INFO  org.ngrinder.infra.AgentConfig:     System Environment:  NGRINDER_AGENT_HOME=
2012-11-02 18:41:47,806 INFO  org.ngrinder.infra.AgentConfig:     Java Sytem Property:  ngrinder.agent.home=
2012-11-02 18:41:47,813 TRACE org.ngrinder.common.util.PropertiesWrapper: The verbose is not defined in conf file. Use false instead.
2012-11-02 18:41:47,833 WARN  org.ngrinder.NGrinderStarter: JAVA_HOME is not set. NGrinder is trying to find the JAVA_HOME programically
2012-11-02 18:41:47,833 INFO  org.ngrinder.NGrinderStarter: tools.jar is found in file:/usr/lib/jvm/java-6-sun-1.6.0.16/lib/tools.jar
2012-11-02 18:41:47,846 INFO  org.ngrinder.NGrinderStarter: java.library.path : /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/amd64:./native_lib/::/usr/java/packages/lib/amd64:/lib:/usr/lib:/home/khpark/tools/ngrinder-core-3.0.2/./native_lib
2012-11-02 18:41:47,847 INFO  org.ngrinder.NGrinderStarter: - Passing mode agent
2012-11-02 18:41:47,847 INFO  org.ngrinder.NGrinderStarter: - nGrinder version 3.0.2
2012-11-02 18:41:47,855 INFO  org.ngrinder.NGrinderStarter: *************************
2012-11-02 18:41:47,855 INFO  org.ngrinder.NGrinderStarter: Start nGrinder Agent ...
2012-11-02 18:41:47,856 INFO  org.ngrinder.NGrinderStarter: with console: 10.89.3.55:16001
2012-11-02 18:41:47,867 INFO  agent controller daemon: agent controller daemon : started.
2012-11-02 18:41:48,408 INFO  agent controller: connected to agent controller server at /10.89.3.55:16001
2012-11-02 18:41:48,408 INFO  agent controller: waiting for agent controller server signal
2012-11-02 18:45:20,921 INFO  agent controller: received a start agent message
2012-11-02 18:45:20,921 INFO  agent controller: agent start message is revcieved from console net.grinder.messages.agent.StartGrinderMessage@2e61a907
2012-11-02 18:45:20,921 INFO  agent controller: starting agent... for test_1
2012-11-02 18:45:20,922 INFO  net.grinder.AgentDaemon: Agent Daemon Agent conntected to port : 12000 is started.
2012-11-02 18:45:20,925 INFO  agent controller: agent started. waiting for agent controller signal
2012-11-02 18:45:20,928 INFO  net.grinder.AgentDaemon: The Grinder 3.9.1
2012-11-02 18:45:20,930 ERROR net.grinder.AgentDaemon: Failed to connect to '/127.0.1.1:12000'
2012-11-02 18:45:20,930 INFO  net.grinder.AgentDaemon: finished
2012-11-02 18:45:20,930 INFO  agent controller: send log for test_1

and FYI my grinder.properties is
(controller IP: 10.89.3.55 , agent IP: 10.89.5.68)
is it related with console host ip?

khpark@khpark-desktop:~/.ngrinder_agent/file-store$ cat incoming/grinder.properties
#perftest_1_admin
#Tue Oct 30 21:04:20 KST 2012
grinder.threads=5
grinder.numberOfOldLogs=1
grinder.jvm.classpath=.
grinder.test.id=test_1
grinder.duration=60000
grinder.sleepTimeVariation=0.2
grinder.runs=0
grinder.useConsole=true
grinder.script=script.py
grinder.jvm=java
grinder.security=false
grinder.processIncrement=0
grinder.sleepTimeFactor=1
ngrinder.etc.hosts=10.89.3.55
grinder.reportTimesToConsole=true
grinder.debug.singleprocess=false
grinder.processes=2
grinder.ignoreSampleCount=0
grinder.reportToConsole.interval=500
grinder.dcrinstrumentation=false
grinder.logProcessStreams=true
khpark@khpark-desktop:~/.ngrinder_agent/file-store$
khpark@khpark-desktop:~/.ngrinder_agent/file-store$ cat current/grinder.properties
#perftest_1_admin
#Tue Oct 30 21:04:20 KST 2012
grinder.threads=5
grinder.numberOfOldLogs=1
grinder.jvm.classpath=.
grinder.test.id=test_1
grinder.duration=60000
grinder.sleepTimeVariation=0.2
grinder.runs=0
grinder.useConsole=true
grinder.script=script.py
grinder.jvm=java
grinder.security=false
grinder.processIncrement=0
grinder.sleepTimeFactor=1
ngrinder.etc.hosts=10.89.3.55
grinder.reportTimesToConsole=true
grinder.debug.singleprocess=false
grinder.processes=2
grinder.ignoreSampleCount=0
grinder.reportToConsole.interval=500
grinder.dcrinstrumentation=false
grinder.logProcessStreams=true
khpark@khpark-desktop:~/.ngrinder_agent/file-store$

I'll further check this issue tommorrow. Thanks.

from ngrinder.

junoyoon avatar junoyoon commented on July 19, 2024

Thanks for your patients. I've made some errors while fixing this issue.

https://www.dropbox.com/sh/2pvu4nuut9wxsez/fMFJkul8f0

It should be OK, now. Please let us know. We'll do our best until this works on your place.

from ngrinder.

Kiheung avatar Kiheung commented on July 19, 2024

Thanks for your help.

But it still failing.

10:28:28 WARN  org.ngrinder.NGrinderStarter  :  JAVA_HOME is not set. NGrinder is trying to find the JAVA_HOME programically
10:28:28 INFO  org.ngrinder.NGrinderStarter  :  tools.jar is found in file:/usr/lib/jvm/java-6-sun-1.6.0.16/lib/tools.jar
10:28:28 INFO  org.ngrinder.NGrinderStarter  :  java.library.path : /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/../lib/amd64:./native_lib/::/usr/java/packages/lib/amd64:/lib:/usr/lib:/home/khpark/tools/ngrinder-core-3.0.2/./native_lib
10:28:28 INFO  org.ngrinder.NGrinderStarter  :  - Passing mode agent
10:28:28 INFO  org.ngrinder.NGrinderStarter  :  - nGrinder version 3.0.2
10:28:28 INFO  org.ngrinder.NGrinderStarter  :  *************************
10:28:28 INFO  org.ngrinder.NGrinderStarter  :  Start nGrinder Agent ...
10:28:28 INFO  org.ngrinder.NGrinderStarter  :  with console: 10.89.3.55:16001
10:28:28 INFO  agent controller daemon  :  agent controller daemon : started.
10:28:29 INFO  agent controller  :  connected to agent controller server at /10.89.3.55:16001
10:28:29 INFO  agent controller  :  waiting for agent controller server signal
10:28:47 INFO  agent controller  :  received a start agent message
10:28:47 INFO  agent controller  :  agent start message is revcieved from console net.grinder.messages.agent.StartGrinderMessage@7f712b3a
10:28:47 INFO  agent controller  :  starting agent... for test_2
10:28:47 INFO  net.grinder.AgentDaemon  :  Agent Daemon Agent conntected to port : 12001 is started.
10:28:47 INFO  agent controller  :  agent started. waiting for agent controller signal
10:28:47 INFO  net.grinder.AgentDaemon  :  The Grinder 3.9.1
10:28:47 ERROR net.grinder.AgentDaemon  :  Failed to connect to '/127.0.1.1:12001'
10:28:47 INFO  net.grinder.AgentDaemon  :  finished
10:28:47 INFO  agent controller  :  send log for test_2

And this is .nginder_agent directory structure(after running test)

khpark@khpark-desktop:~/.ngrinder_agent$ find .
.
./pid
./agent.conf
./log
./log/agent.log

I think agent failed to get ginder.properties from the controller

from ngrinder.

junoyoon avatar junoyoon commented on July 19, 2024

grinderproperties are not related to this issue. nGrinder doesn transfer host connection info through grinder.properties. Instead, we do pass this by StartGrinderMessage through agent controller. I'm still suspecting your PC network configuration. Could you download NetworkUtil.class in https://www.dropbox.com/sh/2pvu4nuut9wxsez/fMFJkul8f0.
And run it with java NetworkUtil

It will show the your IP address ngrinder resolve. Please tell me the output

from ngrinder.

Kiheung avatar Kiheung commented on July 19, 2024

Here is my result.

khpark@khpark-desktop:~/tmp$ java NetworkUtil
10.89.5.68
khpark@khpark-desktop:~/tmp$ ifconfig
eth0      Link encap:Ethernet  HWaddr e8:11:32:33:fa:e3
          inet addr:10.89.5.68  Bcast:10.89.5.255  Mask:255.255.255.0
          inet6 addr: fe80::ea11:32ff:fe33:fae3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:59407281 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17304368 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17113494954 (17.1 GB)  TX bytes:5015971494 (5.0 GB)
          Interrupt:32 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:29025072 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29025072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6211884432 (6.2 GB)  TX bytes:6211884432 (6.2 GB)

khpark@khpark-desktop:~/tmp$ java NetworkUtil
10.89.5.68
khpark@khpark-desktop:~/tmp$

from ngrinder.

Kiheung avatar Kiheung commented on July 19, 2024

and controller try to listen only from the localhost
below is my "netstat -ant" result on the controller server

tcp6       0      0 127.0.1.1:12007         :::*                    LISTEN

from ngrinder.

Kiheung avatar Kiheung commented on July 19, 2024

Hello,
I touch some code in ConsoleManager.java (org/ngrinder/perftest/service/ConsoleManager.java)
(three lines which ends with //TMPFIX)

    public SingleConsole getAvailableConsole(String testIdentifier, ConsoleProperties baseConsoleProperties) {
        ConsoleEntry consoleEntry = null;
        SingleConsole singleConsole = null;
        try {
            consoleEntry = consoleQueue.poll(getMaxWaitingMiliSecond(), TimeUnit.MILLISECONDS);
            if (consoleEntry == null) {
                throw new NGrinderRuntimeException("no console entry available");
            }
            synchronized (this) {
                // FIXME : It might fail here
                String ip=config.getSystemProperties().getProperty("ngrinder.tmp.ip", "10.89.03.55"); //TMPFIX
                LOG.info("[khpark] ip={}",ip); //TMPFIX
                singleConsole = new SingleConsole(ip,consoleEntry.getPort(), baseConsoleProperties); //TMPFIX
                //singleConsole = new SingleConsole(consoleEntry.getPort(), baseConsoleProperties);
                getConsoleInUse().add(singleConsole);
                return singleConsole;
            }

and add below line in ~/.ngrinder/system.conf

ngrinder.tmp.ip=10.89.3.55

Then the test running well now.

Thanks.

from ngrinder.

junoyoon avatar junoyoon commented on July 19, 2024

Good!!! Actually I'm touching same file right now.. OK. I'll reflect your fix on the 3.0 branch. Thanks for cooperation

from ngrinder.

junoyoon avatar junoyoon commented on July 19, 2024

Anyway... Would you like to join us as a contributor. I think you have enough skill-set by seeing your fix.

If you're intersted in please email us (junoyoon at nhn.com).

from ngrinder.

junoyoon avatar junoyoon commented on July 19, 2024

This issue will be handled in http://jira.cubrid.org/browse/NGRINDER-337

from ngrinder.

amrithasanath avatar amrithasanath commented on July 19, 2024

2014-02-28 04:27:30,457 INFO agent config: NGRINDER_AGENT_HOME : /home/ec2-user/.ngrinder_agent
2014-02-28 04:27:30,733 INFO starter: ***************************************************
2014-02-28 04:27:30,744 INFO starter: Start nGrinder Agent ...
2014-02-28 04:27:30,744 INFO starter: ***************************************************
2014-02-28 04:27:30,745 INFO starter: JVM server mode is disabled.
2014-02-28 04:27:30,763 INFO starter: connecting to controller 54.254.164.130:16001
2014-02-28 04:27:30,833 INFO agent controller daemon: The agent controller daemon is started.
2014-02-28 04:27:31,511 INFO agent controller: Connected to agent controller server at /54.254.164.130:16001
2014-02-28 04:27:31,511 INFO agent controller: Waiting for agent controller server signal

but but still no response from agent controller

from ngrinder.

amrithasanath avatar amrithasanath commented on July 19, 2024

when i tried to run run_agent.sh i am getting below:

2014-02-28 04:27:30,457 INFO agent config: NGRINDER_AGENT_HOME : /home/ec2-user/.ngrinder_agent
2014-02-28 04:27:30,733 INFO starter: ***************************************************
2014-02-28 04:27:30,744 INFO starter: Start nGrinder Agent ...
2014-02-28 04:27:30,744 INFO starter: ***************************************************
2014-02-28 04:27:30,745 INFO starter: JVM server mode is disabled.
2014-02-28 04:27:30,763 INFO starter: connecting to controller 54.254.164.130:16001
2014-02-28 04:27:30,833 INFO agent controller daemon: The agent controller daemon is started.
2014-02-28 04:27:31,511 INFO agent controller: Connected to agent controller server at /54.254.164.130:16001
2014-02-28 04:27:31,511 INFO agent controller: Waiting for agent controller server signal

my netstat , telnet everything works fine . even i modified agent.conf with ip of controller . but still not working.

can anyone pls help me in this

from ngrinder.

Mavlarn avatar Mavlarn commented on July 19, 2024

What do you mean "not working"?
It said "Connected to agent controller ...", it means the agent has connected the controller, and waiting for the test job from controller.

You need to access the UI of controller and start a test to let the agent do the testing work.

from ngrinder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.