免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: aaaaaa
打印 上一主题 下一主题

[proxy] Apache Traffic Server 3.2.0 正式版,附srpm包 [复制链接]

论坛徽章:
0
181 [报告]
发表于 2011-12-25 19:08 |只看该作者
这个问题我在trunk 3.0.x 以及3.0.2上,都没复现出来,奇怪了唉

论坛徽章:
0
182 [报告]
发表于 2011-12-26 10:34 |只看该作者
deep linking protection
请问这个功能是什么

论坛徽章:
0
183 [报告]
发表于 2011-12-26 12:11 |只看该作者
就是防盗链

论坛徽章:
0
184 [报告]
发表于 2011-12-26 13:27 |只看该作者
prefetch资源泄漏

[Dec 26 10:07:44.129] Server {2964810608} WARNING: too many connections, throttling
[Dec 26 10:17:44.176] Server {2964810608} WARNING: too many connections, throttling




FATAL: ink_memalign: couldn't allocate 524288 bytes at alignment 4096 - insufficient memory
/usr/local/bin/traffic_server - STACK TRACE:
FATAL: ink_memalign: couldn't allocate 524288 bytes at alignment 4096 - insufficient memory
FATAL: ink_memalign: couldn't allocate 524288 bytes at alignment 4096 - insufficient memory
/usr/local/bin/traffic_server - STACK TRACE:
/usr/local/bin/traffic_server - STACK TRACE:
FATAL: ink_memalign: couldn't allocate 524288 bytes at alignment 4096 - insufficient memory
/usr/local/bin/traffic_server - STACK TRACE:
FATAL: ink_memalign: couldn't allocate 524288 bytes at alignment 4096 - insufficient memory
/usr/local/bin/traffic_server - STACK TRACE:
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
  
  

#0  0x0012e416 in __kernel_vsyscall ()
#1  0x005c9941 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x005cce42 in abort () at abort.c:92
#3  0x00520055 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#4  0x0051df35 in ?? () from /usr/lib/libstdc++.so.6
#5  0x0051df72 in std::terminate() () from /usr/lib/libstdc++.so.6
#6  0x0051e0e1 in __cxa_throw () from /usr/lib/libstdc++.so.6
#7  0x0051e677 in operator new(unsigned int) () from /usr/lib/libstdc++.so.6
#8  0x0051e74d in operator new[](unsigned int) () from /usr/lib/libstdc++.so.6
#9  0x081488fd in DynArray<char>::resize (this=0x748ff4c, new_size=64) at ../lib/ts/DynArray.h:174
#10 0x0815d5da in DynArray<char>:perator() (this=0x748ff4c, idx=0) at ../lib/ts/DynArray.h:122
#11 0x0815a9bb in HtmlParser::ScanHtmlForURL (this=0x748ff3c, r=0xbabb3ac0, url=0xb70921ec, url_end=0xb70921e at Update.cc:1874
#12 0x0815a86a in HtmlParser:arseHtml (this=0x748ff3c, r=0xbabb3ac0, url=0xb70921ec, url_end=0xb70921e at Update.cc:1820
#13 0x08140816 in PrefetchTransform::parse_data (this=0x748fe88, reader=0xbabb3ac0) at Prefetch.cc:543
#14 0x0813ffe8 in PrefetchTransform::handle_event (this=0x748fe88, event=1, edata=0x5991b530) at Prefetch.cc:435
#15 0x08104ba5 in Continuation::handleEvent (this=0x748fe88, event=1, data=0x5991b530)
    at ../iocore/eventsystem/I_Continuation.h:146
#16 0x0830a9f5 in EThread::process_event (this=0xb7497008, e=0x5991b530, calling_code=1) at UnixEThread.cc:140
#17 0x0830ac38 in EThread::execute (this=0xb749700 at UnixEThread.cc:189
#18 0x0830900e in spawn_thread_internal (a=0x895df2 at Thread.cc:88
#19 0x00165cc9 in start_thread (arg=0xb7092b70) at pthread_create.c:304
#20 0x0066f69e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

论坛徽章:
0
185 [报告]
发表于 2011-12-26 14:35 |只看该作者
整个TS中,udp应该是不work的才对

论坛徽章:
0
186 [报告]
发表于 2011-12-26 14:36 |只看该作者
我现在使用反向代理功能
修改remap.config
map http://www.xxx.com/ http://www.sina.com/
reverse_map http://www.sina.com/  http://www.xxx.com/

然后通过www.xxx.com打开了新浪的网页,但是在新浪首页上,我随意点击超级链接,网址都回到了sina.com的域名上
请问如果我想把新浪的其他网页连接就通过xxx.com来管理缓存,应该如何设置

论坛徽章:
0
187 [报告]
发表于 2011-12-26 15:19 |只看该作者
回复 186# xierui54


    你这个需求的目的值得商榷。TS是cache,本质上来讲,TS不会改变源服务器给的content body,所以一定程度上来说,你的需求与http cache的原则相违背。TS有相关的API可以帮助你完成这个功能,查看TS代码里的example目录下的append-transform gzip-transform例子。并参考官方SDK文档。

论坛徽章:
0
188 [报告]
发表于 2011-12-28 14:54 |只看该作者
谢谢指点
请问编译生成的TS如何添加使用插件

论坛徽章:
0
189 [报告]
发表于 2011-12-28 15:16 |只看该作者
本帖最后由 yunfeichen119 于 2011-12-29 09:22 编辑

我测试traffic server时遇到了下面的问题:

[Dec 28 19:27:59.286] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 19:37:59.316] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 19:47:59.360] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 19:57:59.404] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 20:07:59.448] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 20:17:59.479] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 20:27:59.484] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 20:38:14.312] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 20:48:14.339] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 20:58:14.345] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 21:08:14.367] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 21:18:14.386] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 21:28:14.502] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 21:38:14.528] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 21:48:14.557] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 21:58:14.577] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 22:08:14.611] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 22:18:14.622] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 22:28:14.624] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 22:38:14.636] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 22:48:14.650] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 22:58:14.665] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 23:08:14.670] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 23:18:14.703] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 23:28:14.739] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 23:38:14.765] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 23:48:14.769] Server {2973739888} WARNING: too many connections, throttling
[Dec 28 23:58:14.818] Server {2973739888} WARNING: too many connections, throttling

连接数应该没有这么大呀。这是什么原因造成的?有没有解决办法呀

论坛徽章:
0
190 [报告]
发表于 2011-12-28 17:39 |只看该作者
本帖最后由 LnBSD 于 2011-12-30 13:42 编辑

请教一下cacheurl 插件的问题
我添加了cacherul的扩展和配置,经过测试没有实现需求,测试结果如下
按照我配置的,应该访问http://2a.tttt-img.com.cn/mon.gif  一次后,我再访问http://2b.tttt-img.com.cn/mon.gif 应该是命中的状态,结果还是miss

今天看了一下error日志,发现有报错
20111230.13h40m26s [cacheurl] Plugin requires Traffic Server 2.0 or later

20111230.13h40m26s [i] Unable to initialize plugin (disabled).

看来cacheurl不支持ats3.x
  1. [root@ trafficserver]# sed '/^#/d' plugin.config
  2. stats_over_http.so
  3. cacheurl.so
  4. [root@ trafficserver]# sed '/^#/d'  cacheurl.config
  5. http://2[a-z].tttt-img.com.cn/(.*)  http://img2.tttt.com.cn.TSINTERNAL/$1


  6. [root@admin2 ~]# curl --proxy "10.15.184.139:80" -v  -o /dev/null http://2a.tttt-img.com.cn/mon.gif   
  7. * About to connect() to proxy 10.15.184.139 port 80
  8. *   Trying 10.15.184.139... connected
  9. * Connected to 10.15.184.139 (10.15.184.139) port 80
  10. > GET http://2a.tttt-img.com.cn/mon.gif HTTP/1.1
  11. > User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
  12. > Host: 2a.tttt-img.com.cn
  13. > Pragma: no-cache
  14. > Accept: */*
  15. > Proxy-Connection: Keep-Alive
  16. >
  17. < HTTP/1.1 200 OK
  18. < Date: Wed, 28 Dec 2011 09:29:21 GMT
  19. < Server: ATS/3.0.2
  20. < Last-Modified: Wed, 14 Apr 2010 14:26:28 GMT
  21. < Accept-Ranges: bytes
  22. < Content-Length: 3825
  23. < Cache-Control: max-age=315360000
  24. < Expires: Sat, 25 Dec 2021 09:29:21 GMT
  25. < Content-Type: image/gif
  26. < Age: 0
  27. < Proxy-Connection: keep-alive
  28. < Via: http/1.1 zats-ttttttttt (zcache/3.0.2 [cMsSfW])
  29.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  30.                                  Dload  Upload   Total   Spent    Left  Speed
  31. 100  3825  100  3825    0     0   176k      0 --:--:-- --:--:-- --:--:-- 3735kConnection #0 to host 10.15.184.139 left intact

  32. * Closing connection #0
  33. [root@admin2 ~]# curl --proxy "10.15.184.139:80" -v  -o /dev/null http://2a.tttt-img.com.cn/mon.gif
  34. * About to connect() to proxy 10.15.184.139 port 80
  35. *   Trying 10.15.184.139... connected
  36. * Connected to 10.15.184.139 (10.15.184.139) port 80
  37. > GET http://2a.tttt-img.com.cn/mon.gif HTTP/1.1
  38. > User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
  39. > Host: 2a.tttt-img.com.cn
  40. > Pragma: no-cache
  41. > Accept: */*
  42. > Proxy-Connection: Keep-Alive
  43. >
  44. < HTTP/1.1 200 OK
  45. < Date: Wed, 28 Dec 2011 09:29:21 GMT
  46. < Server: ATS/3.0.2
  47. < Last-Modified: Wed, 14 Apr 2010 14:26:28 GMT
  48. < Accept-Ranges: bytes
  49. < Content-Length: 3825
  50. < Cache-Control: max-age=315360000
  51. < Expires: Sat, 25 Dec 2021 09:29:21 GMT
  52. < Content-Type: image/gif
  53. < Age: 5
  54. < Proxy-Connection: keep-alive
  55. < Via: http/1.1 zats-ttttttttt (zcache/3.0.2 [cHs f ])
  56.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  57.                                  Dload  Upload   Total   Spent    Left  Speed
  58. 100  3825  100  3825    0     0   290k      0 --:--:-- --:--:-- --:--:--     0Connection #0 to host 10.15.184.139 left intact

  59. * Closing connection #0
  60. [root@admin2 ~]# curl --proxy "10.15.184.139:80" -v  -o /dev/null http://2b.tttt-img.com.cn/mon.gif
  61. * About to connect() to proxy 10.15.184.139 port 80
  62. *   Trying 10.15.184.139... connected
  63. * Connected to 10.15.184.139 (10.15.184.139) port 80
  64. > GET http://2b.tttt-img.com.cn/mon.gif HTTP/1.1
  65. > User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
  66. > Host: 2b.tttt-img.com.cn
  67. > Pragma: no-cache
  68. > Accept: */*
  69. > Proxy-Connection: Keep-Alive
  70. >
  71. < HTTP/1.1 200 OK
  72. < Date: Wed, 28 Dec 2011 09:29:29 GMT
  73. < Server: ATS/3.0.2
  74. < Last-Modified: Wed, 14 Apr 2010 14:26:28 GMT
  75. < Accept-Ranges: bytes
  76. < Content-Length: 3825
  77. < Cache-Control: max-age=315360000
  78. < Expires: Sat, 25 Dec 2021 09:29:29 GMT
  79. < Content-Type: image/gif
  80. < Age: 0
  81. < Proxy-Connection: keep-alive
  82. < Via: http/1.1 zats-ttttttttt (zcache/3.0.2 [cMsSfW])
  83.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  84.                                  Dload  Upload   Total   Spent    Left  Speed
  85. 100  3825  100  3825    0     0   113k      0 --:--:-- --:--:-- --:--:--     0Connection #0 to host 10.15.184.139 left intact

  86. * Closing connection #0
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP