亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
12下一頁
最近訪問板塊 發(fā)新帖
查看: 8036 | 回復(fù): 10
打印 上一主題 下一主題

[proxy] Apache Traffic Server 3.0正式版,我很失望! [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2011-07-07 15:10 |只看該作者 |倒序?yàn)g覽
本帖最后由 tao_627 于 2011-07-07 15:25 編輯

研究Traffic Server已經(jīng)幾個(gè)月了,最初看得是2.0.1穩(wěn)定版,后來看過2.1.4,直到最近,欣喜發(fā)現(xiàn)Apache已經(jīng)發(fā)布了3.0版本。于是趕緊下載安裝,搭建正向代理,調(diào)試探索,可是很失望,
因?yàn)橐恢憋@示502錯(cuò)誤,可是,我利用2.1.4搭建正向代理,一切正常沒有任何問題。下面是3.0版本的整個(gè)交互過程的信息,感興趣的朋友可以看看,我從不說假話的:


ATS 3.0搭建正向代理出現(xiàn)502錯(cuò)誤的整個(gè)交互流程:

root@tyx-System-Product-Name:/usr/local/bin# ./traffic_server
[TrafficServer] using root directory '/usr/local'
[Jul  6 08:56:36.765] {3077691088} STATUS: opened /usr/local/var/log/trafficserver/diags.log
[Jul  6 08:56:36.765] {3077691088} NOTE: updated diags config
[Jul  6 08:56:36.766] Server {3077691088} DEBUG: (http_aeua) [HttpConfig::init_aeua_filter] - Config: "/usr/local/etc/trafficserver/ae_ua.config"
[Jul  6 08:56:36.766] Server {3077691088} DEBUG: (http_aeua) [HttpConfig::init_aeua_filter] - Opening config "/usr/local/etc/trafficserver/ae_ua.config"
[Jul  6 08:56:36.766] Server {3077691088} DEBUG: (http_aeua) [HttpConfig::init_aeua_filter] - Added 0 REGEXP filters
[Jul  6 08:56:36.766] Server {3077691088} DEBUG: (http_aeua) [init_http_aeua_filter] - Total loaded 0 REGEXP for Accept-Enconding/User-Agent filtering
[Jul  6 08:56:36.768] Server {3077691088} NOTE: cache clustering disabled
[Jul  6 08:56:36.768] Server {3077691088} NOTE: clearing statistics
[Jul  6 08:56:36.770] Server {3077691088} DEBUG: (dns) ink_dns_init: called with init_called = 0
[Jul  6 08:56:36.779] Server {3077691088} DEBUG: (dns) localhost=tyx-System-Product-Name
[Jul  6 08:56:36.779] Server {3077691088} DEBUG: (dns) Round-robin nameservers = 0
[Jul  6 08:56:36.779] Server {3077691088} DEBUG: (hostdb) Storage path is /usr/local/var/trafficserver
[Jul  6 08:56:36.779] Server {3077691088} DEBUG: (hostdb) Opening host.db, size=200000
[Jul  6 08:56:36.779] Server {3077691088} WARNING: configuration changed: [hostdb.config] : reinitializing database
[Jul  6 08:56:36.779] Server {3077691088} NOTE: reconfiguring host database
[Jul  6 08:56:36.779] Server {3077691088} DEBUG: (hostdb) unable to unlink /usr/local/etc/trafficserver/internal/hostdb.config
[Jul  6 08:56:36.779] Server {3077691088} WARNING: Configured store too small, unable to reconfigure
[Jul  6 08:56:36.779] Server {3077691088} WARNING: unable to initialize database (too little storage)
: [hostdb.config] : disabling database
You may need to 'reconfigure' your cache manually.  Please refer to
the 'Configuration' chapter in the manual.

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2011-07-07 15:12 |只看該作者
[Jul  6 08:56:36.779] Server {3077691088} WARNING: could not initialize host database. Host database will be disabled
[Jul  6 08:56:36.779] Server {3077691088} WARNING: bad hostdb or storage configuration, hostdb disabled
[Jul  6 08:56:36.780] Server {3077691088} NOTE: cache clustering disabled
[Jul  6 08:56:36.834] Server {3057408880} WARNING: disk header different for disk /usr/local/var/trafficserver/cache.db: clearing the disk
[Jul  6 08:56:36.884] Server {3077691088} NOTE: logging initialized[7], logging_mode = 3
[Jul  6 08:56:36.887] Server {3077691088} DEBUG: (http_init) proxy.config.http.redirection_enabled = 0
[Jul  6 08:56:36.887] Server {3077691088} DEBUG: (http_init) proxy.config.http.number_of_redirections = 1
[Jul  6 08:56:36.887] Server {3077691088} DEBUG: (http_init) proxy.config.http.post_copy_size = 2048
[Jul  6 08:56:36.887] Server {3077691088} DEBUG: (http_tproxy) Primary listen socket transparency is off
[Jul  6 08:56:36.890] Server {3077691088} NOTE: traffic server running
[Jul  6 08:56:36.890] Server {3077691088} DEBUG: (dns) DNSHandler::startEvent: on thread 0
[Jul  6 08:56:36.890] Server {3077691088} DEBUG: (dns) open_con: opening connection 8.8.8.8:53
[Jul  6 08:56:36.890] Server {3077691088} DEBUG: (dns) random port = 42595
[Jul  6 08:56:36.890] Server {3077691088} DEBUG: (dns) opening connection 8.8.8.8:53 SUCCEEDED for 0
[Jul  6 08:56:36.918] Server {3058461552} NOTE: Clearing Disk: /usr/local/var/trafficserver/cache.db
[Jul  6 08:56:36.919] Server {3058461552} NOTE: clearing cache directory '/usr/local/var/trafficserver/cache.db 16384:24575'
[Jul  6 08:56:37.056] Server {3055303536} NOTE: cache enabled
[Jul  6 08:56:45.632] Server {3002059632} DEBUG: (http_tproxy) Marking accepted connect on b328c6e8 as not outbound transparent.
[Jul  6 08:56:45.632] Server {3077691088} DEBUG: (http_seq) HttpAccept:mainEvent] accepted connection
[Jul  6 08:56:45.632] Server {3077691088} DEBUG: (http_cs) [0] session born, netvc 0xa431d60
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http_cs) [0] using accept inactivity timeout [120 seconds]
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http_cs) [0] Starting transaction 1 using sm [0]
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http) [0] [HttpSM::main_handler, VC_EVENT_READ_READY]
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http) [0] [&HttpSM::state_read_client_request_header, VC_EVENT_READ_READY]
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http) [0] done parsing client request header
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http_trans) START HttpTransact::ModifyRequest
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http_trans) [ink_cluster_time] local: 1309913805, highest_delta: 0, cluster: 1309913805
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http_trans) END HttpTransact::ModifyRequest
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http_trans) Next action HTTP_API_READ_REQUEST_HDR; HttpTransact::StartRemapRequest
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http) [0] State Transition: STATE_UNDEFINED -> API_READ_REQUEST_HDR
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http_trans) START HttpTransact::StartRemapRequest
[Jul  6 08:56:45.633] Server {3077691088} DEBUG: (http_trans) Before Remapping:

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2011-07-07 15:13 |只看該作者
+++++++++ Incoming Request +++++++++
-- State Machine Id: 0
GET http://www.baidu.com/ HTTP/1.1
Host: www.baidu.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Cookie: BAIDUID=36C3F2905F6D124039D771A6F85E124A:FG=1

[Jul  6 08:56:45.653] Server {3077691088} DEBUG: (http_trans) [DecideCacheLookup] Will do cache lookup.
[Jul  6 08:56:45.653] Server {3077691088} DEBUG: (http_seq) [DecideCacheLookup] Will do cache lookup
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_trans) Next action CACHE_LOOKUP; NULL
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] State Transition: HTTP_API_POST_REMAP -> CACHE_LOOKUP
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_seq) [HttpSM::do_cache_lookup_and_read] [0] Issuing cache lookup for URL http://www.baidu.com/
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_cache) [0] [&HttpCacheSM::state_cache_open_read, CACHE_EVENT_OPEN_READ_FAILED]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] [HttpSM::main_handler, CACHE_EVENT_OPEN_READ_FAILED]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] [&HttpSM::state_cache_open_read, CACHE_EVENT_OPEN_READ_FAILED]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] cache_open_read - CACHE_EVENT_OPEN_READ_FAILED
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [state_cache_open_read] open read failed.
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_trans) [HttpTransact::HandleCacheOpenRead]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_trans) CacheOpenRead -- miss
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_trans) Next action DNS_LOOKUP; OSDNSLookup
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] State Transition: CACHE_LOOKUP -> DNS_LOOKUP
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_seq) [HttpStateMachineGet::do_hostdb_lookup] Doing DNS Lookup
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] DNS lookup failed for 'www.baidu.com'
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_trans) [HttpTransact::OSDNSLookup] This was attempt 1
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_seq) [HttpTransact::OSDNSLookup] DNS Lookup unsuccessful
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_trans) [WUTS code generation] Hit/Miss: 49, Log: 117, Hier: 49, Status: 805
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_trans) Adding Server: ATS/3.0.0
+++++++++ Proxy's Response 2 +++++++++
-- State Machine Id: 0
HTTP/1.1 502 Cannot find server.
Date: Wed, 06 Jul 2011 00:56:45 GMT
Proxy-Connection: keep-alive
Server: ATS/3.0.0

[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_trans) Next action PROXY_SEND_ERROR_CACHE_NOOP; NULL
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] State Transition: DNS_LOOKUP -> PROXY_SEND_ERROR_CACHE_NOOP
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_tunnel) [0] adding producer 'internal msg'
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_tunnel) [0] adding consumer 'user agent'
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_tunnel) tunnel_run started, p_arg is NULL
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_tunnel) [0] consumer_handler [user agent VC_EVENT_WRITE_COMPLETE]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] [&HttpSM::tunnel_handler_ua, VC_EVENT_WRITE_COMPLETE]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_cs) [0] session released by sm [0]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_cs) [0] initiating io for next header
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] [HttpSM::main_handler, HTTP_TUNNEL_EVENT_DONE]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] [&HttpSM::tunnel_handler, HTTP_TUNNEL_EVENT_DONE]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_redirect) [HttpTunnel::deallocate_postdata_copy_buffers]
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http_seq) [HttpStateMachineGet::update_stats] Logging transaction
[Jul  6 08:56:45.654] Server {3077691088} DEBUG: (http) [0] dellocating sm

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2011-07-07 15:22 |只看該作者
本帖最后由 tao_627 于 2011-07-07 15:24 編輯

大家一定要注意1樓最后幾句話,它說明traffic server無法使用hostdb,最終將導(dǎo)致502錯(cuò)誤發(fā)生,我詳細(xì)比較了2.1.4和3.0版本的配置文件,以及HostDB.cc和MultiCache.cc這幾個(gè)文件,并進(jìn)行了多次調(diào)試,最后發(fā)現(xiàn)它們幾乎100%相同,唯一修改的地方,就是我得到502錯(cuò)誤的地方,就是兩行代碼的修改,導(dǎo)致了這個(gè)錯(cuò)誤。我以及成功修復(fù)了這個(gè)502錯(cuò)誤的bug。

另外,我寫的plugin,在2.1.4版本上測(cè)試沒有發(fā)現(xiàn)問題,可是在3.0上卻經(jīng)常使程序退出,唯一的區(qū)別是plugin引用 的API不同,這說明3.0版本的API也存在問題。

可悲的是,現(xiàn)在Apache已經(jīng)不再提供2.1.9等unstable版本了,而這個(gè)他們很引以為傲的3.0,卻被我證實(shí)漏洞百出,令人失望。

我發(fā)這個(gè)帖子,期望有緣人共同探討,進(jìn)行技術(shù)切磋,希望Apache能引起重視,別無它意!

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2011-07-10 23:57 |只看該作者
Leif 在你提的Bug里的回復(fù)是準(zhǔn)確的,請(qǐng)按照提提到的2點(diǎn)檢查。
我們?yōu)槭裁磳?.1.x定義為unstable,并不是因?yàn)樗环(wěn)定,而是因?yàn)槲覀兠總(gè)版本間會(huì)做比較大的改動(dòng),不能保證各個(gè)版本間的升級(jí)不產(chǎn)生問題。

到了3.0穩(wěn)定版本中,我們將會(huì)保證版本的api abi以及配置文件等的一致性。

強(qiáng)力推薦rebase你的所有工作到v3.0上來。2.1.4是我們最后的小改動(dòng),2.1.5-2.1.9中間做的大改動(dòng)可就太多了。

有任何問題隨時(shí)反饋。

thanks

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2011-08-18 03:02 |只看該作者
樓主,方便提供以下配置文件嗎?我一直在找ats到正向代理配置。

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2011-08-18 09:29 |只看該作者
本帖最后由 yayu_myself 于 2011-08-18 09:34 編輯

回復(fù) 6# molecar


    呃。。正向代理很簡(jiǎn)單的。。只需要把record.conf中的
  1. CONFIG proxy.config.reverse_proxy.enabled INT 0
  2. CONFIG proxy.config.url_remap.remap_required INT 0
復(fù)制代碼
其實(shí)好像只把remap設(shè)置為0就可以,TS支持同時(shí)反響和正向代理

另外,先看官方管理手冊(cè),有中文的,但是后面的不太全,結(jié)合英文看吧http://trafficserver.apache.org/docs/v2/admin/,F(xiàn)AQ提到了如下:
Can Traffic Server run in forward proxy and reverse proxy modes at the same time?

Yes. When you enable reverse proxy mode, Traffic Server remaps incoming requests according to the map rules in the remap.config file. All other requests that do not match a map rule are simply served in forward proxy mode.
If you want to run in reverse proxy only mode (wherein Traffic Server does not serve requests that fail to match a map rule), then you must set the configuration variable proxy.config.url_remap.remap_required to 1 in the records.config file.

How do I enable forward proxy mode

Forward proxy mode is not enabled out of the box for security reasons. When enabling any proxy on the internet, you want to make sure you observe pertinent security restrictions. Having an open proxy available to internet users is a bad thing. If you understand this and are sure you know what you are doing, in records.config:
# Set this variable to 1 if you want Traffic Server to serve
# requests only from origin servers listed in the mapping rules
# of the remap.config file. If a request does not match, then
# the browser will receive an error.
CONFIG proxy.config.url_remap.remap_required INT 0


還可以看官方wiki里面有一些東西。不過感覺還算比較亂,里面同樣有FAQ:https://cwiki.apache.org/confluence/display/TS/FAQ

以及官方的社區(qū):https://issues.apache.org/jira/secure/IssueNavigator.jspa

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2012-01-31 12:47 |只看該作者
yayu_myself 發(fā)表于 2011-08-18 09:29
回復(fù) 6# molecar


非常感謝,糾結(jié)我兩天的問題終于解決了

論壇徽章:
49
15-16賽季CBA聯(lián)賽之福建
日期:2016-06-22 16:22:002015年亞洲杯之中國(guó)
日期:2015-01-23 16:25:12丑牛
日期:2015-01-20 09:39:23未羊
日期:2015-01-14 23:55:57巳蛇
日期:2015-01-06 18:21:36雙魚座
日期:2015-01-02 22:04:33午馬
日期:2014-11-25 09:58:35辰龍
日期:2014-11-18 10:40:07寅虎
日期:2014-11-13 22:47:15申猴
日期:2014-10-22 15:29:50摩羯座
日期:2014-08-27 10:49:43辰龍
日期:2014-08-21 10:47:58
9 [報(bào)告]
發(fā)表于 2012-03-07 17:42 |只看該作者
tao_627 發(fā)表于 2011-07-07 15:10
研究Traffic Server已經(jīng)幾個(gè)月了,最初看得是2.0.1穩(wěn)定版,后來看過2.1.4,直到最近,欣喜發(fā)現(xiàn)Apache已經(jīng)發(fā) ...

樓主不見了,嘿嘿

論壇徽章:
0
10 [報(bào)告]
發(fā)表于 2012-03-07 17:57 |只看該作者
啥情況,這個(gè)帖子的問題已經(jīng)close了的吧?
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP