You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by cihat güzel <c....@gmail.com> on 2013/09/11 11:54:13 UTC

why hostname is localhost?

hi all.

I try jmeter-server on linux (fedora18). It says "Created remote
object:*localhost
*:44750" . But the hostname should not be  "localhost" . It should be
hostname as like "10.6.149.95".

So my jmeter master is failed, if I try the following command at another
server :

./jmeter -n -t  myRequest.jmx -R 10.6.149.95
or
./jmeter -n -t  myRequest.jmx -r

The failed logs :

Created the tree successfully using /root/myRequest.jmx
Configuring remote engine for *10.6.149.95*
Using remote object: *127.0.0.1*:44750 *(null)*
Starting remote engines
Starting the test @ Wed Sep 11 14:01:48 TRST 2013 (1378897308614)
*An error occurred*: method java.util.ResourceBundle.containsKey with
signature (Ljava.lang.String;)Z was not found.


My /etc/hosts file:

127.0.0.1   localhost localhost.localdomain localhost4
localhost4.localdomain4
::1         localhost localhost.localdomain localhost6
localhost6.localdomain6
10.6.149.95 host-10-6-149-95

 Why the hostname is 127.0.0.1? How to solve this problem?

Thanks.

Re: why hostname is localhost?

Posted by cihat güzel <c....@gmail.com>.
I've tried it in two different version of Java (openjdk6-bin-1.6.0.2_22
and jdk1.7.0_25)


2013/9/11 sebb <se...@gmail.com>

> On 11 September 2013 10:54, cihat güzel <c....@gmail.com> wrote:
> > hi all.
> >
> > I try jmeter-server on linux (fedora18). It says "Created remote
> > object:*localhost
> > *:44750" . But the hostname should not be  "localhost" . It should be
> > hostname as like "10.6.149.95".
> >
> > So my jmeter master is failed, if I try the following command at another
> > server :
> >
> > ./jmeter -n -t  myRequest.jmx -R 10.6.149.95
> > or
> > ./jmeter -n -t  myRequest.jmx -r
> >
> > The failed logs :
> >
> > Created the tree successfully using /root/myRequest.jmx
> > Configuring remote engine for *10.6.149.95*
> > Using remote object: *127.0.0.1*:44750 *(null)*
> > Starting remote engines
> > Starting the test @ Wed Sep 11 14:01:48 TRST 2013 (1378897308614)
> > *An error occurred*: method java.util.ResourceBundle.containsKey with
> > signature (Ljava.lang.String;)Z was not found.
>
> That error suggests you are not using a standard JVM, or there is a
> classpath error as that is a standard method.
> Fixing that might possibly fix the host error.
>
> >
> > My /etc/hosts file:
> >
> > 127.0.0.1   localhost localhost.localdomain localhost4
> > localhost4.localdomain4
> > ::1         localhost localhost.localdomain localhost6
> > localhost6.localdomain6
> > 10.6.149.95 host-10-6-149-95
>
> There are hosts files on the client and server nodes.
> Ensure you check both.
>
> >  Why the hostname is 127.0.0.1? How to solve this problem?
> >
> > Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: why hostname is localhost?

Posted by sebb <se...@gmail.com>.
On 11 September 2013 10:54, cihat güzel <c....@gmail.com> wrote:
> hi all.
>
> I try jmeter-server on linux (fedora18). It says "Created remote
> object:*localhost
> *:44750" . But the hostname should not be  "localhost" . It should be
> hostname as like "10.6.149.95".
>
> So my jmeter master is failed, if I try the following command at another
> server :
>
> ./jmeter -n -t  myRequest.jmx -R 10.6.149.95
> or
> ./jmeter -n -t  myRequest.jmx -r
>
> The failed logs :
>
> Created the tree successfully using /root/myRequest.jmx
> Configuring remote engine for *10.6.149.95*
> Using remote object: *127.0.0.1*:44750 *(null)*
> Starting remote engines
> Starting the test @ Wed Sep 11 14:01:48 TRST 2013 (1378897308614)
> *An error occurred*: method java.util.ResourceBundle.containsKey with
> signature (Ljava.lang.String;)Z was not found.

That error suggests you are not using a standard JVM, or there is a
classpath error as that is a standard method.
Fixing that might possibly fix the host error.

>
> My /etc/hosts file:
>
> 127.0.0.1   localhost localhost.localdomain localhost4
> localhost4.localdomain4
> ::1         localhost localhost.localdomain localhost6
> localhost6.localdomain6
> 10.6.149.95 host-10-6-149-95

There are hosts files on the client and server nodes.
Ensure you check both.

>  Why the hostname is 127.0.0.1? How to solve this problem?
>
> Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: why hostname is localhost?

Posted by cihat güzel <c....@gmail.com>.
My problem is solved.

Sorry, my server default java version is 1.5.

java version "1.5.0"
gij (GNU libgcj) version 4.4.7 20120313 (Red Hat 4.4.7-3)

I upgrade java version. jmeter is not support java 1.5

Thanks for sebb & Flavio .



2013/9/12 sebb <se...@gmail.com>

> On 12 September 2013 08:42, cihat güzel <c....@gmail.com> wrote:
> > (server) my jmeter-server.log as follows:
> >
> > 2013/09/12 12:23:24 INFO  - jmeter.JMeter: IP: 10.6.149.95 Name:
> > host-10-6-149-95 FullName: host-10-6-149-95
> > 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl:
> Starting
> > backing engine on 1099
> > 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
> > address=10.6.149.95
> > 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: *IP
> > address is a site-local address; this may cause problems with remote
> access.
> > *
> > * Can be overridden by defining the system property
> > 'java.rmi.server.hostname' - see jmeter-server script file*
> > *
> > *
>
> Are your client and server on the same network?
>
> > (client) my .jmeter.log as follows:
> >
> > 2013/09/12 12:28:59 INFO  - jmeter.JMeter: Configuring remote engine for
> > 10.6.149.95
> > 2013/09/12 12:28:59 INFO  - jmeter.JMeter: Starting remote engines
> > 2013/09/12 12:28:59 INFO  - jmeter.engine.ClientJMeterEngine: running
> > clientengine run method
> > 2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
> > Function class names must contain the string: '.functions.'
> > 2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
> > Function class names must not contain the string: '.gui.'
> > FATAL - jmeter.JMeter: An error occurred:  java.lang.NoSuchMethodError:
> > method java.util.ResourceBundle.containsKey with signature
> > (Ljava.lang.String;)Z was not found.
> >    at
> >
> org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:500)
> >    at
> >
> org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:481)
> >    at
> org.apache.jmeter.util.JMeterUtils.getResString(JMeterUtils.java:434)
> >    at org.apache.jmeter.functions.BeanShell.<clinit>(BeanShell.java:51)
> >    at java.lang.Class.initializeClass(libgcj.so.10)
> >    at java.lang.Class.forName(libgcj.so.10)
> >    at
> >
> org.apache.jmeter.engine.util.CompoundVariable.<clinit>(CompoundVariable.java:76)
> >    at java.lang.Class.initializeClass(libgcj.so.10)
> >    at
> > org.apache.jmeter.engine.util.ValueReplacer.<init>(ValueReplacer.java:43)
> >    at org.apache.jmeter.engine.PreCompiler.<init>(PreCompiler.java:57)
> >    at
> >
> org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:111)
> >    at org.apache.jmeter.JMeter.runNonGui(JMeter.java:818)
> >    at org.apache.jmeter.JMeter.startNonGui(JMeter.java:724)
> >    at org.apache.jmeter.JMeter.start(JMeter.java:388)
> >    at java.lang.reflect.Method.invoke(libgcj.so.10)
> >    at org.apache.jmeter.NewDriver.main(NewDriver.java:218)
> >
> >
>
> Need the following lines from clien log:
>
> INFO  - jmeter.JMeter: IP:
>
>
> > 2013/9/12 sebb <se...@gmail.com>
> >
> >> On 11 September 2013 18:09, sebb <se...@gmail.com> wrote:
> >> > On 11 September 2013 13:04, Flavio Cysne <fl...@gmail.com>
> wrote:
> >> >> Two possible solutions:
> >> >>
> >> >> 1. As suggested by sebb, localhost in /etc/hosts should be
> associated to
> >> >> your current IP, not to 127.0.0.1 (loopback). You'll have to edit
> >> >> /etc/hosts and change 127.0.0.1 with your current IP.
> >> >
> >> > I don't recall suggesting that.
> >> >
> >> > The problem normally arises if the host name for the client or server
> >> > is defined as the loopback address.
> >> > Of course if you call your host "localhost" then that would cause
> issues!
> >> >
> >> > The local address should be shown in the client and server logs, e.g.:
> >> >
> >> > 2013/09/11 17:59:59 INFO  - jmeter.JMeter: IP: a.b.c.d Name: client
> >> > FullName: Client
> >> > 2013/09/11 18:00:00 INFO  - jmeter.JMeter: Configuring remote engine
> for
> >> p.q.r.s
> >> >
> >> > 2013/09/11 17:59:47 INFO  - jmeter.JMeter: IP: p.q.r.s Name: server
> >> > FullName: Server
> >> > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl:
> >> > Starting backing engine on 1099
> >> > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
> >> > address=a.b.c.d
> >> >
> >> > It is the last line that is important.
> >>
> >> Sorry, that's wrong.
> >> The last line is also the local IP address (of the server host), so it
> >> should be p.q.r.s
> >>
> >> > The client tells the server what IP to reply on, based on the IP
> >> > address it finds for itself (this is part of RMI)
> >> > The server will reply on that address; if the client says to reply on
> >> > 127.0.0.1 of course it won't work (unless both client and server are
> >> > on same host).
> >>
> >> That's still true, but the log does not currently show the remote IP
> >> address that was sent over RMI.
> >> We'll add it for the next release.
> >>
> >> >> 2. If machines' IPs change a lot (because of DHCP server) you could
> use
> >> >> -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[
> \t]*\([^
> >> >> ]*\) .*/\1/p") in your command line.
> >> >> This command line will return your current IP (if the network
> interface
> >> >> used is other than eth0, change it).
> >> >>
> >> >> As described in jmeter-server file, you have to add the variable
> below
> >> to
> >> >> command line if you can neither change /etc/hosts nor fixate IP
> address.
> >> >> jmeter-server executable command-line will look like this
> >> >> $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> >> >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
> >> >>
> >> >>
> >> >> Both solutions work also for jmeter executable file. The second one
> is a
> >> >> bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
> >> >> $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> >> >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> >> For additional commands, e-mail: user-help@jmeter.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: why hostname is localhost?

Posted by sebb <se...@gmail.com>.
On 12 September 2013 08:42, cihat güzel <c....@gmail.com> wrote:
> (server) my jmeter-server.log as follows:
>
> 2013/09/12 12:23:24 INFO  - jmeter.JMeter: IP: 10.6.149.95 Name:
> host-10-6-149-95 FullName: host-10-6-149-95
> 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: Starting
> backing engine on 1099
> 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
> address=10.6.149.95
> 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: *IP
> address is a site-local address; this may cause problems with remote access.
> *
> * Can be overridden by defining the system property
> 'java.rmi.server.hostname' - see jmeter-server script file*
> *
> *

Are your client and server on the same network?

> (client) my .jmeter.log as follows:
>
> 2013/09/12 12:28:59 INFO  - jmeter.JMeter: Configuring remote engine for
> 10.6.149.95
> 2013/09/12 12:28:59 INFO  - jmeter.JMeter: Starting remote engines
> 2013/09/12 12:28:59 INFO  - jmeter.engine.ClientJMeterEngine: running
> clientengine run method
> 2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
> Function class names must contain the string: '.functions.'
> 2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
> Function class names must not contain the string: '.gui.'
> FATAL - jmeter.JMeter: An error occurred:  java.lang.NoSuchMethodError:
> method java.util.ResourceBundle.containsKey with signature
> (Ljava.lang.String;)Z was not found.
>    at
> org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:500)
>    at
> org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:481)
>    at org.apache.jmeter.util.JMeterUtils.getResString(JMeterUtils.java:434)
>    at org.apache.jmeter.functions.BeanShell.<clinit>(BeanShell.java:51)
>    at java.lang.Class.initializeClass(libgcj.so.10)
>    at java.lang.Class.forName(libgcj.so.10)
>    at
> org.apache.jmeter.engine.util.CompoundVariable.<clinit>(CompoundVariable.java:76)
>    at java.lang.Class.initializeClass(libgcj.so.10)
>    at
> org.apache.jmeter.engine.util.ValueReplacer.<init>(ValueReplacer.java:43)
>    at org.apache.jmeter.engine.PreCompiler.<init>(PreCompiler.java:57)
>    at
> org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:111)
>    at org.apache.jmeter.JMeter.runNonGui(JMeter.java:818)
>    at org.apache.jmeter.JMeter.startNonGui(JMeter.java:724)
>    at org.apache.jmeter.JMeter.start(JMeter.java:388)
>    at java.lang.reflect.Method.invoke(libgcj.so.10)
>    at org.apache.jmeter.NewDriver.main(NewDriver.java:218)
>
>

Need the following lines from clien log:

INFO  - jmeter.JMeter: IP:


> 2013/9/12 sebb <se...@gmail.com>
>
>> On 11 September 2013 18:09, sebb <se...@gmail.com> wrote:
>> > On 11 September 2013 13:04, Flavio Cysne <fl...@gmail.com> wrote:
>> >> Two possible solutions:
>> >>
>> >> 1. As suggested by sebb, localhost in /etc/hosts should be associated to
>> >> your current IP, not to 127.0.0.1 (loopback). You'll have to edit
>> >> /etc/hosts and change 127.0.0.1 with your current IP.
>> >
>> > I don't recall suggesting that.
>> >
>> > The problem normally arises if the host name for the client or server
>> > is defined as the loopback address.
>> > Of course if you call your host "localhost" then that would cause issues!
>> >
>> > The local address should be shown in the client and server logs, e.g.:
>> >
>> > 2013/09/11 17:59:59 INFO  - jmeter.JMeter: IP: a.b.c.d Name: client
>> > FullName: Client
>> > 2013/09/11 18:00:00 INFO  - jmeter.JMeter: Configuring remote engine for
>> p.q.r.s
>> >
>> > 2013/09/11 17:59:47 INFO  - jmeter.JMeter: IP: p.q.r.s Name: server
>> > FullName: Server
>> > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl:
>> > Starting backing engine on 1099
>> > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
>> > address=a.b.c.d
>> >
>> > It is the last line that is important.
>>
>> Sorry, that's wrong.
>> The last line is also the local IP address (of the server host), so it
>> should be p.q.r.s
>>
>> > The client tells the server what IP to reply on, based on the IP
>> > address it finds for itself (this is part of RMI)
>> > The server will reply on that address; if the client says to reply on
>> > 127.0.0.1 of course it won't work (unless both client and server are
>> > on same host).
>>
>> That's still true, but the log does not currently show the remote IP
>> address that was sent over RMI.
>> We'll add it for the next release.
>>
>> >> 2. If machines' IPs change a lot (because of DHCP server) you could use
>> >> -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[ \t]*\([^
>> >> ]*\) .*/\1/p") in your command line.
>> >> This command line will return your current IP (if the network interface
>> >> used is other than eth0, change it).
>> >>
>> >> As described in jmeter-server file, you have to add the variable below
>> to
>> >> command line if you can neither change /etc/hosts nor fixate IP address.
>> >> jmeter-server executable command-line will look like this
>> >> $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
>> >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
>> >>
>> >>
>> >> Both solutions work also for jmeter executable file. The second one is a
>> >> bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
>> >> $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
>> >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: why hostname is localhost?

Posted by sebb <se...@gmail.com>.
On 12 September 2013 12:46, Flavio Cysne <fl...@gmail.com> wrote:
> Just to check, have you tried to remove jmeter folders (server and client),
> download it and extract JMeter again?
> It's a weird problem and I don't think is related to JMeter directly.
> What version of java is displayed when "java -version" command is executed
> on prompt?

In case there are multiple JVMs installed, it's better to look in the
jmeter log for the lines:

2013/09/12 12:43:33 INFO  - jmeter.JMeter: Version
2013/09/12 12:43:33 INFO  - jmeter.JMeter: java.version=
2013/09/12 12:43:33 INFO  - jmeter.JMeter: java.vm.name=
2013/09/12 12:43:33 INFO  - jmeter.JMeter: os.name=

>
> 2013/9/12 cihat güzel <c....@gmail.com>
>
>> (server) my jmeter-server.log as follows:
>>
>> 2013/09/12 12:23:24 INFO  - jmeter.JMeter: IP: 10.6.149.95 Name:
>> host-10-6-149-95 FullName: host-10-6-149-95
>> 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: Starting
>> backing engine on 1099
>> 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
>> address=10.6.149.95
>> 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: *IP
>> address is a site-local address; this may cause problems with remote
>> access.
>> *
>> * Can be overridden by defining the system property
>> 'java.rmi.server.hostname' - see jmeter-server script file*
>> *
>> *
>> (client) my .jmeter.log as follows:
>>
>> 2013/09/12 12:28:59 INFO  - jmeter.JMeter: Configuring remote engine for
>> 10.6.149.95
>> 2013/09/12 12:28:59 INFO  - jmeter.JMeter: Starting remote engines
>> 2013/09/12 12:28:59 INFO  - jmeter.engine.ClientJMeterEngine: running
>> clientengine run method
>> 2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
>> Function class names must contain the string: '.functions.'
>> 2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
>> Function class names must not contain the string: '.gui.'
>> FATAL - jmeter.JMeter: An error occurred:  java.lang.NoSuchMethodError:
>> method java.util.ResourceBundle.containsKey with signature
>> (Ljava.lang.String;)Z was not found.
>>    at
>>
>> org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:500)
>>    at
>>
>> org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:481)
>>    at org.apache.jmeter.util.JMeterUtils.getResString(JMeterUtils.java:434)
>>    at org.apache.jmeter.functions.BeanShell.<clinit>(BeanShell.java:51)
>>    at java.lang.Class.initializeClass(libgcj.so.10)
>>    at java.lang.Class.forName(libgcj.so.10)
>>    at
>>
>> org.apache.jmeter.engine.util.CompoundVariable.<clinit>(CompoundVariable.java:76)
>>    at java.lang.Class.initializeClass(libgcj.so.10)
>>    at
>> org.apache.jmeter.engine.util.ValueReplacer.<init>(ValueReplacer.java:43)
>>    at org.apache.jmeter.engine.PreCompiler.<init>(PreCompiler.java:57)
>>    at
>>
>> org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:111)
>>    at org.apache.jmeter.JMeter.runNonGui(JMeter.java:818)
>>    at org.apache.jmeter.JMeter.startNonGui(JMeter.java:724)
>>    at org.apache.jmeter.JMeter.start(JMeter.java:388)
>>    at java.lang.reflect.Method.invoke(libgcj.so.10)
>>    at org.apache.jmeter.NewDriver.main(NewDriver.java:218)
>>
>>
>>
>>
>> 2013/9/12 sebb <se...@gmail.com>
>>
>> > On 11 September 2013 18:09, sebb <se...@gmail.com> wrote:
>> > > On 11 September 2013 13:04, Flavio Cysne <fl...@gmail.com>
>> wrote:
>> > >> Two possible solutions:
>> > >>
>> > >> 1. As suggested by sebb, localhost in /etc/hosts should be associated
>> to
>> > >> your current IP, not to 127.0.0.1 (loopback). You'll have to edit
>> > >> /etc/hosts and change 127.0.0.1 with your current IP.
>> > >
>> > > I don't recall suggesting that.
>> > >
>> > > The problem normally arises if the host name for the client or server
>> > > is defined as the loopback address.
>> > > Of course if you call your host "localhost" then that would cause
>> issues!
>> > >
>> > > The local address should be shown in the client and server logs, e.g.:
>> > >
>> > > 2013/09/11 17:59:59 INFO  - jmeter.JMeter: IP: a.b.c.d Name: client
>> > > FullName: Client
>> > > 2013/09/11 18:00:00 INFO  - jmeter.JMeter: Configuring remote engine
>> for
>> > p.q.r.s
>> > >
>> > > 2013/09/11 17:59:47 INFO  - jmeter.JMeter: IP: p.q.r.s Name: server
>> > > FullName: Server
>> > > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl:
>> > > Starting backing engine on 1099
>> > > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
>> > > address=a.b.c.d
>> > >
>> > > It is the last line that is important.
>> >
>> > Sorry, that's wrong.
>> > The last line is also the local IP address (of the server host), so it
>> > should be p.q.r.s
>> >
>> > > The client tells the server what IP to reply on, based on the IP
>> > > address it finds for itself (this is part of RMI)
>> > > The server will reply on that address; if the client says to reply on
>> > > 127.0.0.1 of course it won't work (unless both client and server are
>> > > on same host).
>> >
>> > That's still true, but the log does not currently show the remote IP
>> > address that was sent over RMI.
>> > We'll add it for the next release.
>> >
>> > >> 2. If machines' IPs change a lot (because of DHCP server) you could
>> use
>> > >> -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[
>> \t]*\([^
>> > >> ]*\) .*/\1/p") in your command line.
>> > >> This command line will return your current IP (if the network
>> interface
>> > >> used is other than eth0, change it).
>> > >>
>> > >> As described in jmeter-server file, you have to add the variable below
>> > to
>> > >> command line if you can neither change /etc/hosts nor fixate IP
>> address.
>> > >> jmeter-server executable command-line will look like this
>> > >> $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
>> > >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
>> > >>
>> > >>
>> > >> Both solutions work also for jmeter executable file. The second one
>> is a
>> > >> bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
>> > >> $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
>> > >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> > For additional commands, e-mail: user-help@jmeter.apache.org
>> >
>> >
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: why hostname is localhost?

Posted by Flavio Cysne <fl...@gmail.com>.
Just to check, have you tried to remove jmeter folders (server and client),
download it and extract JMeter again?
It's a weird problem and I don't think is related to JMeter directly.
What version of java is displayed when "java -version" command is executed
on prompt?


2013/9/12 cihat güzel <c....@gmail.com>

> (server) my jmeter-server.log as follows:
>
> 2013/09/12 12:23:24 INFO  - jmeter.JMeter: IP: 10.6.149.95 Name:
> host-10-6-149-95 FullName: host-10-6-149-95
> 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: Starting
> backing engine on 1099
> 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
> address=10.6.149.95
> 2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: *IP
> address is a site-local address; this may cause problems with remote
> access.
> *
> * Can be overridden by defining the system property
> 'java.rmi.server.hostname' - see jmeter-server script file*
> *
> *
> (client) my .jmeter.log as follows:
>
> 2013/09/12 12:28:59 INFO  - jmeter.JMeter: Configuring remote engine for
> 10.6.149.95
> 2013/09/12 12:28:59 INFO  - jmeter.JMeter: Starting remote engines
> 2013/09/12 12:28:59 INFO  - jmeter.engine.ClientJMeterEngine: running
> clientengine run method
> 2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
> Function class names must contain the string: '.functions.'
> 2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
> Function class names must not contain the string: '.gui.'
> FATAL - jmeter.JMeter: An error occurred:  java.lang.NoSuchMethodError:
> method java.util.ResourceBundle.containsKey with signature
> (Ljava.lang.String;)Z was not found.
>    at
>
> org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:500)
>    at
>
> org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:481)
>    at org.apache.jmeter.util.JMeterUtils.getResString(JMeterUtils.java:434)
>    at org.apache.jmeter.functions.BeanShell.<clinit>(BeanShell.java:51)
>    at java.lang.Class.initializeClass(libgcj.so.10)
>    at java.lang.Class.forName(libgcj.so.10)
>    at
>
> org.apache.jmeter.engine.util.CompoundVariable.<clinit>(CompoundVariable.java:76)
>    at java.lang.Class.initializeClass(libgcj.so.10)
>    at
> org.apache.jmeter.engine.util.ValueReplacer.<init>(ValueReplacer.java:43)
>    at org.apache.jmeter.engine.PreCompiler.<init>(PreCompiler.java:57)
>    at
>
> org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:111)
>    at org.apache.jmeter.JMeter.runNonGui(JMeter.java:818)
>    at org.apache.jmeter.JMeter.startNonGui(JMeter.java:724)
>    at org.apache.jmeter.JMeter.start(JMeter.java:388)
>    at java.lang.reflect.Method.invoke(libgcj.so.10)
>    at org.apache.jmeter.NewDriver.main(NewDriver.java:218)
>
>
>
>
> 2013/9/12 sebb <se...@gmail.com>
>
> > On 11 September 2013 18:09, sebb <se...@gmail.com> wrote:
> > > On 11 September 2013 13:04, Flavio Cysne <fl...@gmail.com>
> wrote:
> > >> Two possible solutions:
> > >>
> > >> 1. As suggested by sebb, localhost in /etc/hosts should be associated
> to
> > >> your current IP, not to 127.0.0.1 (loopback). You'll have to edit
> > >> /etc/hosts and change 127.0.0.1 with your current IP.
> > >
> > > I don't recall suggesting that.
> > >
> > > The problem normally arises if the host name for the client or server
> > > is defined as the loopback address.
> > > Of course if you call your host "localhost" then that would cause
> issues!
> > >
> > > The local address should be shown in the client and server logs, e.g.:
> > >
> > > 2013/09/11 17:59:59 INFO  - jmeter.JMeter: IP: a.b.c.d Name: client
> > > FullName: Client
> > > 2013/09/11 18:00:00 INFO  - jmeter.JMeter: Configuring remote engine
> for
> > p.q.r.s
> > >
> > > 2013/09/11 17:59:47 INFO  - jmeter.JMeter: IP: p.q.r.s Name: server
> > > FullName: Server
> > > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl:
> > > Starting backing engine on 1099
> > > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
> > > address=a.b.c.d
> > >
> > > It is the last line that is important.
> >
> > Sorry, that's wrong.
> > The last line is also the local IP address (of the server host), so it
> > should be p.q.r.s
> >
> > > The client tells the server what IP to reply on, based on the IP
> > > address it finds for itself (this is part of RMI)
> > > The server will reply on that address; if the client says to reply on
> > > 127.0.0.1 of course it won't work (unless both client and server are
> > > on same host).
> >
> > That's still true, but the log does not currently show the remote IP
> > address that was sent over RMI.
> > We'll add it for the next release.
> >
> > >> 2. If machines' IPs change a lot (because of DHCP server) you could
> use
> > >> -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[
> \t]*\([^
> > >> ]*\) .*/\1/p") in your command line.
> > >> This command line will return your current IP (if the network
> interface
> > >> used is other than eth0, change it).
> > >>
> > >> As described in jmeter-server file, you have to add the variable below
> > to
> > >> command line if you can neither change /etc/hosts nor fixate IP
> address.
> > >> jmeter-server executable command-line will look like this
> > >> $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> > >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
> > >>
> > >>
> > >> Both solutions work also for jmeter executable file. The second one
> is a
> > >> bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
> > >> $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> > >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>

Re: why hostname is localhost?

Posted by cihat güzel <c....@gmail.com>.
(server) my jmeter-server.log as follows:

2013/09/12 12:23:24 INFO  - jmeter.JMeter: IP: 10.6.149.95 Name:
host-10-6-149-95 FullName: host-10-6-149-95
2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: Starting
backing engine on 1099
2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
address=10.6.149.95
2013/09/12 12:23:24 INFO  - jmeter.engine.RemoteJMeterEngineImpl: *IP
address is a site-local address; this may cause problems with remote access.
*
* Can be overridden by defining the system property
'java.rmi.server.hostname' - see jmeter-server script file*
*
*
(client) my .jmeter.log as follows:

2013/09/12 12:28:59 INFO  - jmeter.JMeter: Configuring remote engine for
10.6.149.95
2013/09/12 12:28:59 INFO  - jmeter.JMeter: Starting remote engines
2013/09/12 12:28:59 INFO  - jmeter.engine.ClientJMeterEngine: running
clientengine run method
2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
Function class names must contain the string: '.functions.'
2013/09/12 12:28:59 INFO  - jmeter.engine.util.CompoundVariable: Note:
Function class names must not contain the string: '.gui.'
FATAL - jmeter.JMeter: An error occurred:  java.lang.NoSuchMethodError:
method java.util.ResourceBundle.containsKey with signature
(Ljava.lang.String;)Z was not found.
   at
org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:500)
   at
org.apache.jmeter.util.JMeterUtils.getResStringDefault(JMeterUtils.java:481)
   at org.apache.jmeter.util.JMeterUtils.getResString(JMeterUtils.java:434)
   at org.apache.jmeter.functions.BeanShell.<clinit>(BeanShell.java:51)
   at java.lang.Class.initializeClass(libgcj.so.10)
   at java.lang.Class.forName(libgcj.so.10)
   at
org.apache.jmeter.engine.util.CompoundVariable.<clinit>(CompoundVariable.java:76)
   at java.lang.Class.initializeClass(libgcj.so.10)
   at
org.apache.jmeter.engine.util.ValueReplacer.<init>(ValueReplacer.java:43)
   at org.apache.jmeter.engine.PreCompiler.<init>(PreCompiler.java:57)
   at
org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:111)
   at org.apache.jmeter.JMeter.runNonGui(JMeter.java:818)
   at org.apache.jmeter.JMeter.startNonGui(JMeter.java:724)
   at org.apache.jmeter.JMeter.start(JMeter.java:388)
   at java.lang.reflect.Method.invoke(libgcj.so.10)
   at org.apache.jmeter.NewDriver.main(NewDriver.java:218)




2013/9/12 sebb <se...@gmail.com>

> On 11 September 2013 18:09, sebb <se...@gmail.com> wrote:
> > On 11 September 2013 13:04, Flavio Cysne <fl...@gmail.com> wrote:
> >> Two possible solutions:
> >>
> >> 1. As suggested by sebb, localhost in /etc/hosts should be associated to
> >> your current IP, not to 127.0.0.1 (loopback). You'll have to edit
> >> /etc/hosts and change 127.0.0.1 with your current IP.
> >
> > I don't recall suggesting that.
> >
> > The problem normally arises if the host name for the client or server
> > is defined as the loopback address.
> > Of course if you call your host "localhost" then that would cause issues!
> >
> > The local address should be shown in the client and server logs, e.g.:
> >
> > 2013/09/11 17:59:59 INFO  - jmeter.JMeter: IP: a.b.c.d Name: client
> > FullName: Client
> > 2013/09/11 18:00:00 INFO  - jmeter.JMeter: Configuring remote engine for
> p.q.r.s
> >
> > 2013/09/11 17:59:47 INFO  - jmeter.JMeter: IP: p.q.r.s Name: server
> > FullName: Server
> > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl:
> > Starting backing engine on 1099
> > 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
> > address=a.b.c.d
> >
> > It is the last line that is important.
>
> Sorry, that's wrong.
> The last line is also the local IP address (of the server host), so it
> should be p.q.r.s
>
> > The client tells the server what IP to reply on, based on the IP
> > address it finds for itself (this is part of RMI)
> > The server will reply on that address; if the client says to reply on
> > 127.0.0.1 of course it won't work (unless both client and server are
> > on same host).
>
> That's still true, but the log does not currently show the remote IP
> address that was sent over RMI.
> We'll add it for the next release.
>
> >> 2. If machines' IPs change a lot (because of DHCP server) you could use
> >> -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[ \t]*\([^
> >> ]*\) .*/\1/p") in your command line.
> >> This command line will return your current IP (if the network interface
> >> used is other than eth0, change it).
> >>
> >> As described in jmeter-server file, you have to add the variable below
> to
> >> command line if you can neither change /etc/hosts nor fixate IP address.
> >> jmeter-server executable command-line will look like this
> >> $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
> >>
> >>
> >> Both solutions work also for jmeter executable file. The second one is a
> >> bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
> >> $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> >> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: why hostname is localhost?

Posted by sebb <se...@gmail.com>.
On 11 September 2013 18:09, sebb <se...@gmail.com> wrote:
> On 11 September 2013 13:04, Flavio Cysne <fl...@gmail.com> wrote:
>> Two possible solutions:
>>
>> 1. As suggested by sebb, localhost in /etc/hosts should be associated to
>> your current IP, not to 127.0.0.1 (loopback). You'll have to edit
>> /etc/hosts and change 127.0.0.1 with your current IP.
>
> I don't recall suggesting that.
>
> The problem normally arises if the host name for the client or server
> is defined as the loopback address.
> Of course if you call your host "localhost" then that would cause issues!
>
> The local address should be shown in the client and server logs, e.g.:
>
> 2013/09/11 17:59:59 INFO  - jmeter.JMeter: IP: a.b.c.d Name: client
> FullName: Client
> 2013/09/11 18:00:00 INFO  - jmeter.JMeter: Configuring remote engine for p.q.r.s
>
> 2013/09/11 17:59:47 INFO  - jmeter.JMeter: IP: p.q.r.s Name: server
> FullName: Server
> 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl:
> Starting backing engine on 1099
> 2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
> address=a.b.c.d
>
> It is the last line that is important.

Sorry, that's wrong.
The last line is also the local IP address (of the server host), so it
should be p.q.r.s

> The client tells the server what IP to reply on, based on the IP
> address it finds for itself (this is part of RMI)
> The server will reply on that address; if the client says to reply on
> 127.0.0.1 of course it won't work (unless both client and server are
> on same host).

That's still true, but the log does not currently show the remote IP
address that was sent over RMI.
We'll add it for the next release.

>> 2. If machines' IPs change a lot (because of DHCP server) you could use
>> -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[ \t]*\([^
>> ]*\) .*/\1/p") in your command line.
>> This command line will return your current IP (if the network interface
>> used is other than eth0, change it).
>>
>> As described in jmeter-server file, you have to add the variable below to
>> command line if you can neither change /etc/hosts nor fixate IP address.
>> jmeter-server executable command-line will look like this
>> $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
>> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
>>
>>
>> Both solutions work also for jmeter executable file. The second one is a
>> bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
>> $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
>> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: why hostname is localhost?

Posted by sebb <se...@gmail.com>.
On 11 September 2013 13:04, Flavio Cysne <fl...@gmail.com> wrote:
> Two possible solutions:
>
> 1. As suggested by sebb, localhost in /etc/hosts should be associated to
> your current IP, not to 127.0.0.1 (loopback). You'll have to edit
> /etc/hosts and change 127.0.0.1 with your current IP.

I don't recall suggesting that.

The problem normally arises if the host name for the client or server
is defined as the loopback address.
Of course if you call your host "localhost" then that would cause issues!

The local address should be shown in the client and server logs, e.g.:

2013/09/11 17:59:59 INFO  - jmeter.JMeter: IP: a.b.c.d Name: client
FullName: Client
2013/09/11 18:00:00 INFO  - jmeter.JMeter: Configuring remote engine for p.q.r.s

2013/09/11 17:59:47 INFO  - jmeter.JMeter: IP: p.q.r.s Name: server
FullName: Server
2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl:
Starting backing engine on 1099
2013/09/11 17:59:47 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP
address=a.b.c.d

It is the last line that is important.
The client tells the server what IP to reply on, based on the IP
address it finds for itself (this is part of RMI)
The server will reply on that address; if the client says to reply on
127.0.0.1 of course it won't work (unless both client and server are
on same host).

> 2. If machines' IPs change a lot (because of DHCP server) you could use
> -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[ \t]*\([^
> ]*\) .*/\1/p") in your command line.
> This command line will return your current IP (if the network interface
> used is other than eth0, change it).
>
> As described in jmeter-server file, you have to add the variable below to
> command line if you can neither change /etc/hosts nor fixate IP address.
> jmeter-server executable command-line will look like this
> $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
>
>
> Both solutions work also for jmeter executable file. The second one is a
> bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
> $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: why hostname is localhost?

Posted by cihat güzel <c....@gmail.com>.
Yes I did as follows:

1. I already had edited /etc/hosts file.
2. I used a static IP instead of DHCP server.
3. RMI_HOST_DEF="-Djava.rmi.server.hostname=10.6.149.95
       or
    RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
'2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')"
 at "./jmeter-server"
4. JVM_ARGS="-Djava.rmi.server.hostname=10.6.149.95
      or
    JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
'2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')"
at "./jmeter"


It didn't change.


2013/9/11 Flavio Cysne <fl...@gmail.com>

> Did you configure both JMeter server and client?
>
> The first solution, suggested by sebb, is what I'm using here and it did
> work for me.
>
>
> 2013/9/11 cihat güzel <c....@gmail.com>
>
> > Thanks Flavio,
> >
> > I tried your solution but it didn't change.
> >
> >
> > 2013/9/11 Flavio Cysne <fl...@gmail.com>
> >
> > > Two possible solutions:
> > >
> > > 1. As suggested by sebb, localhost in /etc/hosts should be associated
> to
> > > your current IP, not to 127.0.0.1 (loopback). You'll have to edit
> > > /etc/hosts and change 127.0.0.1 with your current IP.
> > >
> > > 2. If machines' IPs change a lot (because of DHCP server) you could use
> > > -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[
> \t]*\([^
> > > ]*\) .*/\1/p") in your command line.
> > > This command line will return your current IP (if the network interface
> > > used is other than eth0, change it).
> > >
> > > As described in jmeter-server file, you have to add the variable below
> to
> > > command line if you can neither change /etc/hosts nor fixate IP
> address.
> > > jmeter-server executable command-line will look like this
> > > $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> > > '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
> > >
> > >
> > > Both solutions work also for jmeter executable file. The second one is
> a
> > > bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
> > > $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> > > '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter
> > >
> >
>

Re: why hostname is localhost?

Posted by Flavio Cysne <fl...@gmail.com>.
Did you configure both JMeter server and client?

The first solution, suggested by sebb, is what I'm using here and it did
work for me.


2013/9/11 cihat güzel <c....@gmail.com>

> Thanks Flavio,
>
> I tried your solution but it didn't change.
>
>
> 2013/9/11 Flavio Cysne <fl...@gmail.com>
>
> > Two possible solutions:
> >
> > 1. As suggested by sebb, localhost in /etc/hosts should be associated to
> > your current IP, not to 127.0.0.1 (loopback). You'll have to edit
> > /etc/hosts and change 127.0.0.1 with your current IP.
> >
> > 2. If machines' IPs change a lot (because of DHCP server) you could use
> > -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[ \t]*\([^
> > ]*\) .*/\1/p") in your command line.
> > This command line will return your current IP (if the network interface
> > used is other than eth0, change it).
> >
> > As described in jmeter-server file, you have to add the variable below to
> > command line if you can neither change /etc/hosts nor fixate IP address.
> > jmeter-server executable command-line will look like this
> > $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> > '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
> >
> >
> > Both solutions work also for jmeter executable file. The second one is a
> > bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
> > $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> > '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter
> >
>

Re: why hostname is localhost?

Posted by cihat güzel <c....@gmail.com>.
Thanks Flavio,

I tried your solution but it didn't change.


2013/9/11 Flavio Cysne <fl...@gmail.com>

> Two possible solutions:
>
> 1. As suggested by sebb, localhost in /etc/hosts should be associated to
> your current IP, not to 127.0.0.1 (loopback). You'll have to edit
> /etc/hosts and change 127.0.0.1 with your current IP.
>
> 2. If machines' IPs change a lot (because of DHCP server) you could use
> -Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[ \t]*\([^
> ]*\) .*/\1/p") in your command line.
> This command line will return your current IP (if the network interface
> used is other than eth0, change it).
>
> As described in jmeter-server file, you have to add the variable below to
> command line if you can neither change /etc/hosts nor fixate IP address.
> jmeter-server executable command-line will look like this
> $> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server
>
>
> Both solutions work also for jmeter executable file. The second one is a
> bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
> $> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
> '2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter
>

Re: why hostname is localhost?

Posted by Flavio Cysne <fl...@gmail.com>.
Two possible solutions:

1. As suggested by sebb, localhost in /etc/hosts should be associated to
your current IP, not to 127.0.0.1 (loopback). You'll have to edit
/etc/hosts and change 127.0.0.1 with your current IP.

2. If machines' IPs change a lot (because of DHCP server) you could use
-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n "2s/[^:]*:[ \t]*\([^
]*\) .*/\1/p") in your command line.
This command line will return your current IP (if the network interface
used is other than eth0, change it).

As described in jmeter-server file, you have to add the variable below to
command line if you can neither change /etc/hosts nor fixate IP address.
jmeter-server executable command-line will look like this
$> RMI_HOST_DEF="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
'2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter-server


Both solutions work also for jmeter executable file. The second one is a
bit different 'cause you'll have to change RMI_HOST_DEF with JVM_ARGS
$> JVM_ARGS="-Djava.rmi.server.hostname=$(ifconfig eth0 | sed -n
'2s/[^:]*:[ \t]*\([^ ]*\) .*/\1/p')" ./jmeter