Il 06/02/2012 07:48, Miguel Godinho da Fonseca ha scritto:
But what I can't do is put it to work!
I've read that in Jmeter webpage and gave it a try. Configured three IP
addresses in my machine and with a CSV dataset I was trying to force the Source
IP address...
The thing is that the requests are still being sent by other address different
from the ones I have loaded from the CSV dataset file.te
no I did not use a variable ...
The way I worked was a little bit more complicated (but maybe someone has a
better way):
- I setup different instances (1 for each address); each instance has its own
RMIregistry, on a different port
- I passed the IP address as a property to each instance
Here I included the script I used to launch everything:
The network address is written in to the script, the last byte is passed as a
parameter.
Remember to:
- modify JMeter properties so that RMI registry is not launched automatically;
- use only HttpClient sampler
- split data (e.g. creddentials between instances), as if it were a distributed
installation
HTH
best regards
Sergio
Have you done something special for it to work?
Miguel Godinho da Fonseca
Direcção de Sistemas de Informação
-----Original Message-----
From: sergio [mailto:[email protected]]
Sent: quinta-feira, 2 de Fevereiro de 2012 17:59
To: JMeter Users List
Subject: Re: Can't put to Work the property from HTTP Request Source IP address
Il 02/02/2012 15:23, sebb ha scritto:
On 2 February 2012 14:14, Miguel Godinho da Fonseca
<[email protected]> wrote:
It's a Kind of restricted!
It's a Bank application that only allows each host or user (they ate not mutual
exclusive) to connected only once.
During login the web application reads the source IP Address and
matches it with a host on the database. So if I'm using Jmeter from
the same host... I'm in trouble :)
well, you can work around this, but you need to add ALL the IP address you need
to the Jmeter server LAN interface.
Then, you launch different Jmeter instances passing an IP address to each of
them, and using HTTPclient.
I did this to test a load balanced infrastructure,and worked pretty well, but I
think you find limitations to few IP addresses (maybe 8 or 10 or so) due to OS
limitations.
regards
You are also likely to be in trouble if you try and access the app
from behind a NAT router.
So I have thought about using HTTP-Request-Source-IP-address and create
separate LAN cards on my host and use these new addresses.
What I'm saying is that neither HTTP-Request-Source-IP-address or forcing a
host address via httpclient.localaddress.
Can you explain further what do you mean when you say "This only works using
HttpClient sampler "?
Have you read:
http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Requ
est
Read up on "Implementation".
Kind Regards,
Miguel
-----Original Message-----
From: Oliver Lloyd [mailto:[email protected]]
Sent: quinta-feira, 2 de Fevereiro de 2012 15:59
To: [email protected]
Subject: Re: Can't put to Work the property from HTTP Request Source
IP address
When you say 'validates' are you talking about load balancing or some form of
restricted access?
If restricted access then just get the IP addresses of the hosts you are
running jmeter on added to the relevant whitelist of IPs. If load balancing
then, basically, jmeter does not support ip spoofing. Depending on the exact
setup of the load balancer algorithm you can *potentially* get away with simply
using multiple hosts to run the test from (keep in mind some load balancers
base traffic on DNS, in this case do some research on 'Java DNS caching').
If your host has multiple IPs then httpclient.localaddress allows you to chose
one for each running instance of jmeter. This only works using HttpClient
sampler.
-----
http://www.http503.com/
--
View this message in context:
http://jmeter.512774.n5.nabble.com/Can-t-put-to-Work-the-property-fro
m-HTTP-Request-Source-IP-address-tp5450654p5450764.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Ing. Sergio Boso
Mail:
Web:
PEC:
Cell:
Linkedin:
Skype:
[email protected] <mailto:[email protected]>
www.bosoconsulting.it
[email protected] <mailto:[email protected]>
+39 335 7243 445
http://it.linkedin.com/in/sergioboso
<http://www.linkedin.com/pub/sergio-boso/1/29b/255>
sbos61
In caso di erronea ricezione da parte di persona diversa, siete pregati di eliminare il messaggio e i suoi allegati in modo
definitivo dai vostri archivi e di volercelo comunicare immediatamente restituendoci il messaggio via e-mail al seguente
[email protected] <mailto:[email protected]>
L’interessato può, inoltre, esercitare tutti i diritti di accesso sui propri dati previsti dal decreto 196/2003, tra i quali i
diritti di rettifica, aggiornamento e cancellazione, inviando un messaggio all’indirizzo:[email protected]
<mailto:[email protected]>
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
rem ===============================================================
rem Enviroment variables
rem SERVER_PORT (optional) - define the rmiregistry and server port
rem
rem JVM_ARGS - Java flags - these are handled by jmeter.bat
rem
rem ===============================================================
rem **** start parameters
set SRV=%1
set SRVNET=172.16.210.
set WDIR=%CD%
set WDIR=%WDIR%\%SRV%
set SERVER_PORT=13%SRV%
set JAVA_HOME=C:\Program_files\Java\jre6
set JMETER_HOME=C:\Program_files\jakarta-jmeter-2.5
echo server code %SRV%
echo server port %SERVER_PORT%
echo starting from %WDIR%
rem **** end parameters
REM Protect environment against changes if possible:
if NOT "%OS%"=="Windows_NT" goto NotSupported
if not exist %JMETER_HOME%\bin\jmeter.bat goto NotFound
if not exist %WDIR% goto NotFound2
echo Changing to JMeter home directory
cd /D %~dp0
:winNT1
:setCP
REM Launch a specific intance for each server
set
CLASSPATH=%JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;%JMETER_HOME%\lib\jorphan.jar;%JMETER_HOME%\lib\logkit-1.2.jar
start %JAVA_HOME%\bin\rmiregistry %SERVER_PORT%
:doneStart
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.
rem setup command for local address
set LOCADDRPROP=httpclient.localaddress=%SRVNET%%SRV%
echo %LOCADDR%
cd %WDIR%
start %JMETER_HOME%\bin\jmeter -Dserver_port=%SERVER_PORT% -s -j
%WDIR%\jmeter-server%SRV%.log -d%WDIR% -J%LOCADDRPROP%
cd ..
goto exit
:NotSupported
echo %OS% not supported
goto exit
:NotFound
echo Jmeter not found in %JMETER_HOME%\bin
goto exit
:NotFound2
echo Server directory %WDIR% not found
goto exit
:end
:exit
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]