You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Gleidson Antonio Henriques <gl...@predialnet.com.br> on 2012/05/07 23:20:41 UTC
CacheURL problem with 3.1.4-unstable - (build # 4713)
Hi all,
First off all, I would thank all guys that are involved with this
good project.
I'm trying to configure one TS server to cache youtube videos but
aparently the cacheurl plugin never rewrites the URL.
My question is: Is there a way to debug if the plugin has been
executed ?
Below are my settings and my logs.
Thanks in advance,
Best regards,
URL from youtube:
http://tc.v19.cache5.c.youtube.com/videoplayback?sparams=algorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire&algorithm=throttle-factor&burst=40&cm2=0&range=17817600-19599359&signature=65E2E06D69F4A4BE813B30B7AB5E006471D71BA4.2E6EC9DA291F81A3935F1C7B950EF6C81EAD1F61&ipbits=8&ip=189.0.0.0&upn=HtQV-XtQYrM&keepalive=yes&source=youtube&fexp=914055%252C906507%252C919306%252C913539&factor=1.25&sver=3&itag=34&expire=1336449025&id=6021714f70c3b1c2&cp=U0hSS1RPV19HT0NOMl9MSU
FBOmNibk9TaFk4eUps&key=yt1&redirect_counter=1
------------------------------------
cacheurl.config
# Youtube Test
http://tc.v[0-9].cache[0-9].c.youtube.com/(.*)
http://video-srv.example.com.TSINTERNAL/$1
------------------------
traffic.out
[May 7 18:04:13.983] Manager {0x7f2e19386740} NOTE:
[ClusterCom::ClusterCom] Node running on OS: 'Linux' Release:
'3.2.0-23-generic'
[May 7 18:04:13.983] Manager {0x7f2e19386740} NOTE:
[LocalManager::listenForProxy] Listening on port: 3128
[May 7 18:04:13.983] Manager {0x7f2e19386740} NOTE: [TrafficManager]
Setup complete
[May 7 18:04:15.001] Manager {0x7f2e19386740} NOTE:
[LocalManager::startProxy] Launching ts process
[TrafficServer] using root directory '/usr/local/cache'
[May 7 18:04:15.007] Manager {0x7f2e19386740} NOTE:
[LocalManager::pollMgmtProcessServer] New process connecting fd '11'
[May 7 18:04:15.008] Manager {0x7f2e19386740} NOTE:
[Alarms::signalAlarm] Server Process born
[May 7 18:04:16.023] {0x2b752d607a40} STATUS: opened
/usr/local/cache/var/log/trafficserver/diags.log
[May 7 18:04:16.023] {0x2b752d607a40} NOTE: updated diags config
[May 7 18:04:16.028] Server {0x2b752d607a40} NOTE: cache clustering
disabled
[May 7 18:04:16.058] Server {0x2b752d607a40} NOTE: cache clustering
disabled
[May 7 18:04:16.066] Server {0x2b752d607a40} NOTE: logging
initialized[15], logging_mode = 3
[May 7 18:04:16.069] Server {0x2b752d607a40} NOTE: loading plugin
'/usr/local/cache/libexec/trafficserver/cacheurl.so'
[May 7 18:04:16.071] Server {0x2b752d607a40} NOTE: traffic server running
[May 7 18:04:17.401] Server {0x2b7534a09700} NOTE: cache enabled
----------------------
cacheurl.log
20120507.18h04m16s Adding pattern/replacement pair:
'http://tc.v[0-9].cache[0-9].c.youtube.com/(.*)' ->
'http://video-srv.example.com.TSINTERNAL/$1'
--
----------------------------------------
Gleidson Antonio Henriques
Sistemas
PredialNet
Re: CacheURL problem with 3.1.4-unstable - (build # 4713)
Posted by Mark Harrison <ma...@omniti.com>.
If you are seeing entries in cacheurl.log, then the plugin has been loaded.
It should also log when any transformations have been made.
As for why you're not seeing the URL being rewritten, it looks like the
pattern needs a little tweaking:
http://tc.v[0-9].cache[0-9]....
will only match tc.v0.... through tc.v9...., and not v10 or above. Your
example url contains v19, which won't match. Something like the following
should work (I added + to the digits to match one or more of them):
http://tc.v[0-9]+.cache[0-9]+.c.youtube.com/(.*)
http://video-srv.example.com.TSINTERNAL/$1
Hope that helps,
Mark
On Mon, May 7, 2012 at 5:20 PM, Gleidson Antonio Henriques <
gleidson@predialnet.com.br> wrote:
> Hi all,
>
> First off all, I would thank all guys that are involved with this good
> project.
> I'm trying to configure one TS server to cache youtube videos but
> aparently the cacheurl plugin never rewrites the URL.
>
> My question is: Is there a way to debug if the plugin has been executed
> ?
>
> Below are my settings and my logs.
>
> Thanks in advance,
>
> Best regards,
>
>
> URL from youtube: http://tc.v19.cache5.c.**youtube.com/videoplayback?
> **sparams=algorithm%252Cburst%**252Ccp%252Cfactor%252Cid%**
> 252Cip%252Cipbits%252Citag%**252Csource%252Cupn%252Cexpire&**
> algorithm=throttle-factor&**burst=40&cm2=0&range=17817600-**
> 19599359&signature=**65E2E06D69F4A4BE813B30B7AB5E00**6471D71BA4.**
> 2E6EC9DA291F81A3935F1C7B950EF6**C81EAD1F61&ipbits=8&ip=189.0.**
> 0.0&upn=HtQV-XtQYrM&keepalive=**yes&source=youtube&fexp=**
> 914055%252C906507%252C919306%**252C913539&factor=1.25&sver=3&**
> itag=34&expire=1336449025&id=**6021714f70c3b1c2&cp=**
> U0hSS1RPV19HT0NOMl9MSU<http://tc.v19.cache5.c.youtube.com/videoplayback?sparams=algorithm%252Cburst%252Ccp%252Cfactor%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire&algorithm=throttle-factor&burst=40&cm2=0&range=17817600-19599359&signature=65E2E06D69F4A4BE813B30B7AB5E006471D71BA4.2E6EC9DA291F81A3935F1C7B950EF6C81EAD1F61&ipbits=8&ip=189.0.0.0&upn=HtQV-XtQYrM&keepalive=yes&source=youtube&fexp=914055%252C906507%252C919306%252C913539&factor=1.25&sver=3&itag=34&expire=1336449025&id=6021714f70c3b1c2&cp=U0hSS1RPV19HT0NOMl9MSU>
> FBOmNibk9TaFk4eUps&key=yt1&**redirect_counter=1
>
> ------------------------------**------
>
> cacheurl.config
>
> # Youtube Test
> http://tc.v[0-9].cache[0-9].c.**youtube.com/(.*)<http://c.youtube.com/(.*)>
> http://video-srv.example.com.**TSINTERNAL/$1<http://video-srv.example.com.TSINTERNAL/$1>
>
> ------------------------
>
> traffic.out
>
> [May 7 18:04:13.983] Manager {0x7f2e19386740} NOTE:
> [ClusterCom::ClusterCom] Node running on OS: 'Linux' Release:
> '3.2.0-23-generic'
> [May 7 18:04:13.983] Manager {0x7f2e19386740} NOTE:
> [LocalManager::listenForProxy] Listening on port: 3128
> [May 7 18:04:13.983] Manager {0x7f2e19386740} NOTE: [TrafficManager]
> Setup complete
> [May 7 18:04:15.001] Manager {0x7f2e19386740} NOTE:
> [LocalManager::startProxy] Launching ts process
> [TrafficServer] using root directory '/usr/local/cache'
> [May 7 18:04:15.007] Manager {0x7f2e19386740} NOTE: [LocalManager::**pollMgmtProcessServer]
> New process connecting fd '11'
> [May 7 18:04:15.008] Manager {0x7f2e19386740} NOTE: [Alarms::signalAlarm]
> Server Process born
> [May 7 18:04:16.023] {0x2b752d607a40} STATUS: opened
> /usr/local/cache/var/log/**trafficserver/diags.log
> [May 7 18:04:16.023] {0x2b752d607a40} NOTE: updated diags config
> [May 7 18:04:16.028] Server {0x2b752d607a40} NOTE: cache clustering
> disabled
> [May 7 18:04:16.058] Server {0x2b752d607a40} NOTE: cache clustering
> disabled
> [May 7 18:04:16.066] Server {0x2b752d607a40} NOTE: logging
> initialized[15], logging_mode = 3
> [May 7 18:04:16.069] Server {0x2b752d607a40} NOTE: loading plugin
> '/usr/local/cache/libexec/**trafficserver/cacheurl.so'
> [May 7 18:04:16.071] Server {0x2b752d607a40} NOTE: traffic server running
> [May 7 18:04:17.401] Server {0x2b7534a09700} NOTE: cache enabled
>
> ----------------------
>
> cacheurl.log
>
> 20120507.18h04m16s Adding pattern/replacement pair: 'http://tc.v
> [0-9].cache[0-9].c**.youtube.com/(.*) <http://c.youtube.com/(.*)>' -> '
> http://video-srv.example.com.**TSINTERNAL/$1<http://video-srv.example.com.TSINTERNAL/$1>
> '
>
>
> --
> ------------------------------**----------
>
> Gleidson Antonio Henriques
> Sistemas
> PredialNet
>
>
>