0

I am setting up apache traffic server as forward proxy and want to push some objects in the cache from out side. I tried following instructions given here.

when I try to push an object following is the output I get

telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
PUSH http://www.company.com HTTP/1.0
Content-length: 84

HTTP/1.0 200 OK
Content-type: text/html
Content-length: 17

<HTML>
a
</HTML>
HTTP/1.0 400 Response Not Cachable
Date: Sun, 02 Aug 2015 16:55:41 GMT
Server: ATS/3.2.4
Cache-Control: no-store
Content-Type: text/html
Content-Language: en
Content-Length: 200

<HEAD><TITLE>Response Not Cachable</TITLE></HEAD>
<BODY BGCOLOR="white" FGCOLOR="black">
<FONT FACE="Helvetica,Arial"><B>
</B></FONT>

<!-- default "Response Not Cachable" response (400) -->
</BODY>
Connection closed by foreign host.
Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

Yeah, you have to submit the PUSH request with a correct, cacheable response header. Depending on your ATS settings, that could either be something as simple as a Last-Modified header, or, more likely (ATS defaults) a properly specified Cache-Control: max-age= header.

Edit: Take a look at the traffic_primer script that comes with the ATS source, or from github at https://github.com/apache/trafficserver/blob/master/tools/traffic_primer . It doesn't do exactly what you are asking for, but what it does is to "replay" a request from an origin to other ATS boxes, using PUSH.

Leif Hedstrom
  • 275
  • 1
  • 8
  • Hi Thanks alot for you help. I was trying to set this up as forward proxy and followed the instructions i.e. to change these two lines in record.config----- CONFIG proxy.config.url_remap.remap_required INT 0 CONFIG proxy.config.reverse_proxy.enabled INT 0 ----- Unfortunately its not working I am either getting a not found error or appache page say it works. – user4993781 Aug 03 '15 at 10:54
  • Hard to say without more details. Are you seeing anything in the logs? Does DNS work? What are the exact errors? – Leif Hedstrom Aug 03 '15 at 14:04
  • 20150803.14h32m08s RESPONSE: sent 10.225.6.65 status 404 (Not Found) for 'notify4.dropbox.com:443/' 20150803.14h32m08s RESPONSE: sent 10.225.6.65 status 404 (Not Found) for 'notify4.dropbox.com:443/' 20150803.14h32m08s RESPONSE: sent 10.225.6.65 status 404 (Not Found) for 'http://www.espncricinfo.com/ci/content/rss/extension2.json' – user4993781 Aug 03 '15 at 17:36
  • all the error log is like above whatever I requested. – user4993781 Aug 03 '15 at 17:36
  • Sounds like you are trying to proxy HTTPS? That can only be done using CONNECT in forward proxy mode, and certainly not in intercepting proxy (Tproxy). Not sure what your setup is. I should say, not possible unless you setup your proxy to be a man-in-the middle "attacker" on TLS. E.g. using http://wiki.squid-cache.org/Features/SslBump – Leif Hedstrom Aug 03 '15 at 19:01