a issue when running the "Simple tests" with a proxy
rousskov at measurement-factory.com
Mon Mar 10 16:05:54 UTC 2014
On 03/10/2014 02:02 AM, xu tony wrote:
> I've been using the "Simple tests" introdued by polygraph's User
> manual to test my squid server. During testing, I found my squid can't
> pull the resource from orign(that is polygraph-server) successfully.
> 3、The command i used for starting polygraph-server and polygraph-client
> is ,
> /usr/local/polygraph/bin/polygraph-client --config
> ../workdir/my_simple.pg --verb_lvl 10 --proxy
> During test, i found squid have got requests from
> ploygraph-client,but using a wrong url to pull resource (that is
> polygraph-server).Part of my squid access log is showed as below:
> 220.127.116.11 - - [10/Mar/2014:15:58:49 +0800] "GET
> http://w1cbc2601.7f1c694f:8/t03/_00000003 HTTP/1.1" 503 1513 "-" "-"
> TCP_MISS DIRECT 0 -
The wrong domain name in the above log implies that your Squid is
confused as to where the requests are going. This would not happen with
a regular Squid configuration. Starting with a simple forward proxy
configuration for Squid may be a good idea before moving on to more
complex stuff (squid.conf.default may work after adding http_access
rules to allow Polygraph traffic).
> I snapped http-request packets from polygraph-client, and found
> request-line of http-request is not what squid expected,which caused the
> squid can't pull resource from polyserver.The request-line in
> http-request sent by polyclient is like that :
> "GET http://18.104.22.168/w1cbc0feb.0fea1bae:00000008/t03/_00000001
Yes, this is what you told Polygraph to send. In a forward proxy test
that you are running (from Polygraph point of view), the URL should look
like the one logged above.
> The right request-line which the squid expected ,i think, shoud be like:
> "GET /22.214.171.124/w1cbc02ee.0c726ba0:00000008/t03/_00000015 HTTP/1.0"
No, but if you are testing a reverse proxy, the Request URI that Squid
expects should look like this:
GET /w1cbc02ee.0c726ba0:00000008/t03/_00000015 HTTP/...
It would still be logged as a full URL (with a host name) by Squid IIRC,
but the packet capture should show from-Polygraph Request URIs without
the protocol scheme and host name components.
Please note that some packet capture GUIs such as Wireshark sometimes
"restore" the full URL when rendering high-level details of the captured
packet, even when a full URL is not present in the packet. Make sure you
look at what has been actually sent and what what was rendered by GUI.
> So, i want to know which part is wrong in my test, if i have made
> some mistakes in test, or polyclient sent http-request with wrong
> request-line, or my squid had some problems ,or anything else? How can i
> fix it?
You have configured Polygraph for a forward proxy test (the --proxy
option does that). One possibility is that you have also configured your
Squid to be a reverse proxy. If the two configurations are out of sync,
bad things like the one you have described may happen.
If you want to test a reverse proxy, you have to change Polygraph
configuration. Do not use --proxy at all (reverse proxies are origin
servers from the HTTP protocol point of view). Add a PGL AddrMap that
maps proxy address (126.96.36.199:8101) to the Polygraph server address
(S.addresses). And use map.names for Robot's origins field (R.origins)
instead of S.addresses you are using there now. The WebAxe workload
configuration distributed with Polygraph has a [more complex] example on
how to do that.
If you do not want to test a reverse proxy, reconfigure your Squid to be
a regular forward proxy (starting with squid.conf.default may be a good
More information about the Users