You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Johan Caripson <jo...@director.se> on 2013/04/02 18:45:03 UTC

Working with PUSH in traffic server

Hi!

Have anyone been working with PUSH in trafficserver?.
I'm trying to push up a txt file but get this error message.
Any ideas on what to do?

[root@ds etc]# perl push.pl -f fooo.txt -u http://localhost/test/fooo.txt
HTTP/1.0 400 Response Not Cachable
Date: Tue, 02 Apr 2013 16:28:59 GMT
Server: ATS/3.2.0
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>

*Have updated the records.config with*
proxy.config.http.push_method_enabled = 1

*And my ip_allow.config look like this *

src_ip=127.0.0.1                                  action=ip_allow method=ALL
src_ip=::1                                        action=ip_allow method=ALL
# Deny PURGE, DELETE, and PUSH for all (this implies allow other methods
for all)
src_ip=0.0.0.0-255.255.255.255                    action=ip_allow
 method=PUSH|PURGE|DELETE
src_ip=::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff action=ip_deny
 method=PUSH|PURGE|DELETE

*My remap.config look like this*

map http://localhost/:80    http://localhost/:80

regards
Johan

Re: Working with PUSH in traffic server

Posted by Johan Caripson <jo...@director.se>.
fooo.txt is just a simpel text file with some numbers.

I found this post. And made all the changes. But get 404 error.

####################

I managed to finally push content into ATS cache. I used lots of online
tutorials as well as ATS support team, Here is how to do so in case anybody
else is interested:

Open your records.config in an editor. You can find the file under
/usr/local/etc/trafficserver/and perform the following modification:

·         Make sure ATS cache option is enabled CONFIG
proxy.config.http.cache.http INT 1

·         In order to enable push content into cache first you need to be
able to do HTTP PUSH, set CONFIG proxy.config.http.push_method_enabled INT 1

·         Have ATS ignore the cahce object age CONFIG
Proxy.config.http.cache.ignore_client_cc_max_age INT 1

·         Other cache configuration should look like following :

·         CONFIG proxy.config.http.cache.ignore_client_no_cache INT 1

·         CONFIG proxy.config.http.cache.ims_on_client_no_cache INT 0

·         CONFIG proxy.config.http.cache.ignore_server_no_cache INT 1

·         Set ATS to never validate cache objects CONFIG
Proxy.config.http.cache.when_to_revalidate INT 3

Then you need to open ip_allow.config file in the same folder and do the
following modification.ip_allow.config is the configuration file which
declare IPs and the action each IP is allowed to perform. In order to allow
local host to push requests have the following line in the ip_allow.config
file:

src_ip=127.0.0.1                                  action=ip_allow
method=ALL

Now your ATS is set to accept push cache. Open a terminal and test by doing
the below steps:

# telnet 127.0.0.1 8080



Trying 127.0.0.1...

Connected to 127.0.0.1.

Escape character is '^]'.

(here you paste what you want to push, have in mind it should be VALID http
push request!)

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>

(the following is what you should get after a successful push into cache)

HTTP/1.0 200 OK

Date: Tue, 05 Feb 2013 16:00:22 GMT

Server: ATS/3.2.0

Content-Length: 0



Connection closed by foreign host.

And Finally answers to my questions:

1) proxy.config.http.quick_filter.mask has been moved from records.config to
ip_allow.config. You can have ATS read the them from different file by
changing CONFIG proxy.config.cache.ip_allow.filename STRING ip_allow.config
 in records.config file.

2) SinceI managed to work with telnet, I refused using the script.

###################

Regards

Johan


2013/4/3 Leif Hedstrom <zw...@apache.org>

> On Apr 2, 2013, at 10:45 AM, Johan Caripson <jo...@director.se> wrote:
>
> > Hi!
> >
> > Have anyone been working with PUSH in trafficserver?.
> > I'm trying to push up a txt file but get this error message.
> > Any ideas on what to do?
>
> Well, what's in fooo.txt ? A wild, crazy thought is that it's perhaps not
> cacheable ? :)
>
> Cheers,
>
> -- Leif

Re: Working with PUSH in traffic server

Posted by Leif Hedstrom <zw...@apache.org>.
On Apr 2, 2013, at 10:45 AM, Johan Caripson <jo...@director.se> wrote:

> Hi!
> 
> Have anyone been working with PUSH in trafficserver?.
> I'm trying to push up a txt file but get this error message.
> Any ideas on what to do?

Well, what's in fooo.txt ? A wild, crazy thought is that it's perhaps not cacheable ? :)

Cheers,

-- Leif