From users-return-5357-apmail-trafficserver-users-archive=trafficserver.apache.org@trafficserver.apache.org Fri Jan 22 15:51:30 2016 Return-Path: X-Original-To: apmail-trafficserver-users-archive@www.apache.org Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0DA5189B5 for ; Fri, 22 Jan 2016 15:51:30 +0000 (UTC) Received: (qmail 72703 invoked by uid 500); 22 Jan 2016 15:51:30 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 72641 invoked by uid 500); 22 Jan 2016 15:51:30 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 72626 invoked by uid 99); 22 Jan 2016 15:51:30 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2016 15:51:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B4D1D1804C8 for ; Fri, 22 Jan 2016 15:51:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -12.098 X-Spam-Level: X-Spam-Status: No, score=-12.098 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, URIBL_BLOCKED=0.001, USER_IN_DEF_WHITELIST=-15, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=yahoo-inc.com header.b=ZZ+uqGaX; dkim=pass (1024-bit key) header.d=yahoo-inc.com header.b=GoF4hFko Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qjY_xeNGyegn for ; Fri, 22 Jan 2016 15:51:18 +0000 (UTC) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id C245620506 for ; Fri, 22 Jan 2016 15:51:17 +0000 (UTC) Received: from omp1042.mail.ne1.yahoo.com (omp1042.mail.ne1.yahoo.com [98.138.89.250]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id u0MFoofo003365 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 22 Jan 2016 07:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1453477851; bh=nMK7HUJ0wygXtjiz6RD7j58qXjiQcorRdPhKXzW/UYk=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject; b=ZZ+uqGaXlDI0breRc5ZexMNK5Yp1rItLMIi+9J719FdbUPNZrXfua4rhjZlGg+RvA xdZrE69WJWPkGGGIk8G5z1AZxivZCLJYRKgqUTXxOX1NsfXlqRXCUMFh6HvFjt/VRn 1trzwb3fhBn7+lSXljKTUM3MQIfBUsyp8lwhD7lw= Received: (qmail 71878 invoked by uid 1000); 22 Jan 2016 15:50:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo-inc.com; s=ginc1024; t=1453477850; bh=ktSACo/Ho6o/IqzlRrLgQCS8+9NV7pCK+0Uyjortg4Q=; h=Date:From:Reply-To:To:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type; b=GoF4hFkoQWandrQvcdst2hpxdZ6cP0eLog1xoOxrxPzMvhpKc2ibegzKL+iNpAtOh8wiP7DQ5Pi+YDSWxdCc9cIDhvNbBnLpsN3xbmIsUeeZS3FAGaj2HwrIHRJJRBXJPx4BU+R7GNoDMPTBy4am9/87wenIxcEfPQ04ehRiPbM= X-YMail-OSG: B7XgKloVM1mJYwAqxpmowS1Ymh.6pMKO3sHCO_YXg_zR0oedbSykKNLFohIv8qC 38oegcy5Zl1pbZ4QsIj3m4QEDOuC.ukQMu3y9OLZsLaV8tcnheTLN_m.BE0.JJIDDY1MPDYgPO4k 98LJeOOX8hNZP.x8abdfqbBcu0O2tucJONcofX4WHTMEzmB_OUP8pNZDfnarhbk__Gd2lDSAu1C5 nt_YP_EpCXgERKABQcYngPJjbWaFdDGY2uOxYfA-- Received: by 98.138.101.171; Fri, 22 Jan 2016 15:50:48 +0000 Date: Fri, 22 Jan 2016 15:50:48 +0000 (UTC) From: Alan Carroll Reply-To: Alan Carroll To: Victor Danilchenko , "users@trafficserver.apache.org" Message-ID: <1042932034.7427538.1453477848482.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: <1161420429.6564016.1453316947777.JavaMail.yahoo@mail.yahoo.com> <1577603245.6528751.1453321126124.JavaMail.yahoo@mail.yahoo.com> Subject: Re: Need help with a particular usage scenario MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7427537_872244773.1453477848453" ------=_Part_7427537_872244773.1453477848453 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The synthetic.txt requests are from traffic_cop for heartbeat purposes, to = verify traffic_server is operational. Looking at your log excerpt, it seems to be in the middle of the transactio= n. I see a failed connect but then an apparently successful retry (at the T= CP layer, indicated by the NET_EVENT_OPEN and the creation=C2=A0 of an http= _ss session) but then the excerpt ends so I can't see how that turns out. B= ased on this, though, I'd guess the HTTP response is failing to parse. It might be that, as a proxy, the request format is not what the server exp= ects, particularly with regard to how the host value is present in the URL = in the GET. You might try curl directly to the web server but with the --pr= oxy option and see what happens. From the log you should also be able to se= e exactly what is sent by ATS to the origin server. =20 On Thursday, January 21, 2016 2:07 PM, Victor Danilchenko wrote: =20 #yiv0619496581 #yiv0619496581 -- _filtered #yiv0619496581 {font-family:Win= gdings;panose-1:5 0 0 0 0 0 0 0 0 0;} _filtered #yiv0619496581 {panose-1:2 = 4 5 3 5 4 6 3 2 4;} _filtered #yiv0619496581 {font-family:Calibri;panose-1:= 2 15 5 2 2 2 4 3 2 4;} _filtered #yiv0619496581 {panose-1:2 11 6 9 4 5 4 2 = 2 4;} _filtered #yiv0619496581 {panose-1:0 0 0 0 0 0 0 0 0 0;}#yiv061949658= 1 #yiv0619496581 p.yiv0619496581MsoNormal, #yiv0619496581 li.yiv0619496581M= soNormal, #yiv0619496581 div.yiv0619496581MsoNormal {margin:0in;margin-bott= om:.0001pt;font-size:12.0pt;}#yiv0619496581 a:link, #yiv0619496581 span.yiv= 0619496581MsoHyperlink {color:blue;text-decoration:underline;}#yiv061949658= 1 a:visited, #yiv0619496581 span.yiv0619496581MsoHyperlinkFollowed {color:p= urple;text-decoration:underline;}#yiv0619496581 p.yiv0619496581MsoListParag= raph, #yiv0619496581 li.yiv0619496581MsoListParagraph, #yiv0619496581 div.y= iv0619496581MsoListParagraph {margin-top:0in;margin-right:0in;margin-bottom= :0in;margin-left:.5in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv061949658= 1 p.yiv0619496581msonormal, #yiv0619496581 li.yiv0619496581msonormal, #yiv0= 619496581 div.yiv0619496581msonormal {margin-right:0in;margin-left:0in;font= -size:12.0pt;}#yiv0619496581 p.yiv0619496581msochpdefault, #yiv0619496581 l= i.yiv0619496581msochpdefault, #yiv0619496581 div.yiv0619496581msochpdefault= {margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv0619496581 p.yiv06= 19496581msonormal1, #yiv0619496581 li.yiv0619496581msonormal1, #yiv06194965= 81 div.yiv0619496581msonormal1 {margin-right:0in;margin-left:0in;font-size:= 12.0pt;}#yiv0619496581 p.yiv0619496581msochpdefault1, #yiv0619496581 li.yiv= 0619496581msochpdefault1, #yiv0619496581 div.yiv0619496581msochpdefault1 {m= argin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv0619496581 p.yiv06194= 96581msonormal2, #yiv0619496581 li.yiv0619496581msonormal2, #yiv0619496581 = div.yiv0619496581msonormal2 {margin:0in;margin-bottom:.0001pt;font-size:12.= 0pt;}#yiv0619496581 p.yiv0619496581msonormal3, #yiv0619496581 li.yiv0619496= 581msonormal3, #yiv0619496581 div.yiv0619496581msonormal3 {margin-right:0in= ;margin-left:0in;font-size:12.0pt;}#yiv0619496581 p.yiv0619496581msochpdefa= ult2, #yiv0619496581 li.yiv0619496581msochpdefault2, #yiv0619496581 div.yiv= 0619496581msochpdefault2 {margin-right:0in;margin-left:0in;font-size:12.0pt= ;}#yiv0619496581 p.yiv0619496581msonormal11, #yiv0619496581 li.yiv061949658= 1msonormal11, #yiv0619496581 div.yiv0619496581msonormal11 {margin:0in;margi= n-bottom:.0001pt;font-size:11.0pt;}#yiv0619496581 p.yiv0619496581msochpdefa= ult11, #yiv0619496581 li.yiv0619496581msochpdefault11, #yiv0619496581 div.y= iv0619496581msochpdefault11 {margin-right:0in;margin-left:0in;font-size:12.= 0pt;}#yiv0619496581 span.yiv0619496581msohyperlink {}#yiv0619496581 span.yi= v0619496581msohyperlinkfollowed {}#yiv0619496581 span.yiv0619496581msohyper= link1 {}#yiv0619496581 span.yiv0619496581msohyperlinkfollowed1 {}#yiv061949= 6581 span.yiv0619496581emailstyle171 {}#yiv0619496581 span.yiv0619496581ema= ilstyle27 {}#yiv0619496581 span.yiv0619496581msohyperlink2 {color:blue;text= -decoration:underline;}#yiv0619496581 span.yiv0619496581msohyperlinkfollowe= d2 {color:purple;text-decoration:underline;}#yiv0619496581 span.yiv06194965= 81msohyperlink11 {color:#0563C1;text-decoration:underline;}#yiv0619496581 s= pan.yiv0619496581msohyperlinkfollowed11 {color:#954F72;text-decoration:unde= rline;}#yiv0619496581 span.yiv0619496581emailstyle1711 {color:windowtext;}#= yiv0619496581 span.yiv0619496581emailstyle271 {color:#1F497D;}#yiv061949658= 1 span.yiv0619496581EmailStyle39 {color:#1F497D;}#yiv0619496581 .yiv0619496= 581MsoChpDefault {font-size:10.0pt;} _filtered #yiv0619496581 {margin:1.0in= 1.0in 1.0in 1.0in;}#yiv0619496581 div.yiv0619496581WordSection1 {}#yiv0619= 496581 _filtered #yiv0619496581 {} _filtered #yiv0619496581 {font-family:Sy= mbol;} _filtered #yiv0619496581 {} _filtered #yiv0619496581 {font-family:Wi= ngdings;} _filtered #yiv0619496581 {font-family:Symbol;} _filtered #yiv0619= 496581 {} _filtered #yiv0619496581 {font-family:Wingdings;} _filtered #yiv0= 619496581 {font-family:Symbol;} _filtered #yiv0619496581 {} _filtered #yiv0= 619496581 {font-family:Wingdings;}#yiv0619496581 ol {margin-bottom:0in;}#yi= v0619496581 ul {margin-bottom:0in;}#yiv0619496581 OK, I dropped the port 80= config, and enabled the debugging. =C2=A0 I then did some random poking, = and I realized that requests fromlocalhost succeed (i.e. when I use =E2=80= =98curl=E2=80=99 on the server, or run Chromium) but fail from any other ho= st. So I tried replacing all the hostnames in the remap file with IPs, but = that didn=E2=80=99t help =E2=80=93 the remote requests still time out. =C2= =A0 I am not running AppArmor, and my /etc/hosts only contains the default = entries (localhost definitions and somesuch). The DNS resolution on command= line works in both directions (hostname to IP, and IP to hostname). =C2= =A0 Anyway, the debug dump from a single request is huge, nearly 3000 lines= . As best as I can figure, the following things might be relevant: =C2=A0 = =C2=B7=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Multiple failing requ= ests for=C2=A0http://127.0.0.1:8083/synthetic.txt -- I have no idea where t= hese are coming from. =C2=B7=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0The request forhttp://vdanilchenko-corewiki.vistaprint.net:8080/phpinfo2= .php gets received, processed, and forwarded to the origin server =C2=B7=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0The response from the origin s= erver result in the following log entriess (cleaned up for readability): +++++++++ Incoming O.S. Response +++++++++ -- State Machine Id: 0 DEBUG: (= http_seq) [HttpTransact::HandleResponse]Response not valid DEBUG: (http_tra= ns) [handle_response_from_server] (hrfs) DEBUG: (http_trans) [1]failed to c= onnect [5] to 10.87.40.225 DEBUG: (http_trans) [retry_server_connection_not= _open] attempts now: 2, max: 3 DEBUG: (http_trans) [handle_response_from_se= rver] Error. Retrying... DEBUG: (http) [0] State Transition: ORIGIN_SERVER_= OPEN -> ORIGIN_SERVER_OPEN DEBUG: (http_track) entered inside do_http_serve= r_open DEBUG: (http) [0] open connection to vdanilchenko-corewiki.vistaprin= t.net: 10.87.40.225:80 DEBUG: (http_seq) [HttpSM::do_http_server_open] Send= ing request to server DEBUG: (http) calling netProcessor.connect_re DEBUG: = (http) [0] [HttpSM::main_handler, NET_EVENT_OPEN] DEBUG: (http_track) enter= ed inside state_http_server_open DEBUG: (http) [0] [&HttpSM::state_http_ser= ver_open, NET_EVENT_OPEN] DEBUG: (http_ss) [4] session born, netvc 0x2b59ec= 0150e0 =C2=A0 Each such set of log entries is followed by a number of appa= rently failing requests forhttp://127.0.0.1:8083/synthetic.txt =E2=80=93 ev= en though I can access that URL and retrieve the =E2=80=98synthetics.txt=E2= =80=99 file (it=E2=80=99s 60 lines of =E2=80=98abcdefghijklmnopqrstuvwxyz= =E2=80=99). =C2=A0 Manually retrievinghttp://10.87.40.225/phpinfo2.php (on= non-proxy port) works like a charm, though, so I still have no idea why Tr= afficServer is failing to connect. =C2=A0 I tried monitoring traffic on po= rt 80 via ngrep, and when I do regular request to origin server (on port 80= ), it works fine =E2=80=93 I observe the request and response as expected; = but when I make a request to the proxy (on port 8080), there=E2=80=99s simp= ly nothing going across the port 80. Ngrep is just sitting there and printi= ng packet hashmarks, but no content. =C2=A0 So it looks like trafficserver= is not merely not getting a response, it=E2=80=99s never actually making t= he request=E2=80=A6 as long as the client is remote. If the client is local= , everything works as expected. =C2=A0 =C2=A0 From: Alan Carroll [mailto:= solidwallofcode@yahoo-inc.com] Sent: Wednesday, January 20, 2016 3:19 PM To: users@trafficserver.apache.org Subject: Re: Need help with a particular usage scenario =C2=A0 A couple of= things to try - =C2=A0 1) Drop the :80 =C2=A0 2) Turn on debug tags with= a value of "http|dns" and see what you get. Those tend to be informative i= n this regard, as you will be able to see exactly what ATS thinks it is con= necting to. =C2=A0 On Wednesday, January 20, 2016 2:05 PM, Victor Danilche= nko wrote: =C2=A0 Ah, thank you very much, upd= ating the maps did change things! Right now I am getting error messages tha= t kinda make sense. =C2=A0 So, here=E2=80=99s my new remap settings: =C2=A0= maphttp://mediawiki.mycompany.com:8080/=C2=A0http://localhost:80/ reverse_= maphttp://localhost:80/=C2=A0http://mediawiki.mycompany.com:8080/ =C2=A0 Wh= en I try to hithttp://mediawiki.mycompany.com:8080/phpinfo2.php in the brow= ser now, I get a 502 response after a lengthy timeout: =C2=A0 internal erro= r - server connection terminated =C2=A0 and on the server, in error.log, th= e following gets recorded: =C2=A0 20160120.14h51m15s RESPONSE: sent 10.87.4= 0.108 status 502 (Connect Error ) for 'http://localhost:80/phpinfo2.php' =C2=A0 I tried this bot= h using localhost in the maps,and FQDNs everywhere, the result is the same.= I most definitely can get this URL on the server using curl: =C2=A0 $ curl= -Ishttp://localhost:80/phpinfo2.php| grep ^HTTP HTTP/1.1 200 OK =C2=A0 So = it looks like for some weird reason, TrafficServer is trying =E2=80=93 and = failing =E2=80=93 to contact the origin provider. =C2=A0 Any idea what migh= t be going wrong? =C2=A0 Thanks so much for your help! =C2=A0 =C2=A0 From: = Alan Carroll [mailto:solidwallofcode@yahoo-inc.com] Sent: Wednesday, January 20, 2016 2:09 PM To: users@trafficserver.apache.org Subject: Re: Need help with a particular usage scenario =C2=A0 Hmmm. A pare= nt proxy set up might work better. The logging of empty URLs is a bug in th= e logging code which has been fixed (current ATS version is 6.0). If you ar= e doing remap, you need a forward map as well like =C2=A0 maphttp://mediawi= ki.mycompany.com:8080/http://mediawiki.mycompany/ =C2=A0 reverse_map, if I = recall correctly, only applies to response headers from the origin, to modi= fy them to use the proxy URL instead of the origin URL (as supplied by the = origin). =C2=A0 I'd recommend moving up in versions, to at least 5.3.x. =C2= =A0 On Wednesday, January 20, 2016 12:23 PM, Victor Danilchenko wrote: =C2=A0 Hi all, =C2=A0 I need to set up a caching pr= oxy to not work as a proxy, but rather to simply provide caching upon direc= t access. For example: =C2=A0 There=E2=80=99s a Mediawiki installation runn= ing athttp://mediawiki.mycompany.com And I need to set up a proxy on an alt= ernative port,http://mediawiki.mycompany.com:8080, which would do nothing b= ut serve up the traffic from the default port, but cached (we aren=E2=80=99= t trying to cache the entire MediaWiki installation, but rather provide an = alternative entry point for a specific use case). =C2=A0 I am having troubl= e figuring out what it would take to set up TrafficServer to do this. I set= it up (Ubuntu Vivid, TS 3.2.4), but TS logs empty URLs (http:///) and of c= ourse fails to find them =E2=80=93 presumably because it doesn=E2=80=99t re= ceive the customary proxy HTTP headers; so I hithttp://mediawiki.mycompany.= com:8080, and only get back 404s. =C2=A0 Is there an easy way to accomplish= what I am looking to do? Here=E2=80=99s the config I have right now. =C2= =A0 In records.config (in addition to all the standard defaults): =C2=A0 CO= NFIG proxy.config.http.server_ports STRING 8080 CONFIG proxy.config.http.ca= che.http INT 1 CONFIG proxy.config.reverse_proxy.enabled INT 1 CONFIG proxy= .config.url_remap.remap_required INT 1 CONFIG proxy.config.url_remap.pristi= ne_host_hdr INT 1 =C2=A0 And in remap.config: =C2=A0 reverse_maphttp://medi= awiki.mycompany.com/=C2=A0http://mediawiki.mycompany.com:8080/ =C2=A0 I hav= e never set up a proxy before. =C2=A0 Any suggestions on what I need to do?= Thanks. =C2=A0 =C2=A0=20 ------=_Part_7427537_872244773.1453477848453 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The synthetic.txt requests are from traffic_cop for= heartbeat purposes, to verify traffic_server is operational.

Looking at your log excerpt, it seems to be in the middle= of the transaction. I see a failed connect but then an apparently successf= ul retry (at the TCP layer, indicated by the NET_EVENT_OPEN and the creatio= n  of an http_ss session) but then the excerpt ends so I can't see how= that turns out. Based on this, though, I'd guess the HTTP response is fail= ing to parse.

<= div id=3D"yui_3_16_0_1_1453409126934_99239">It might be that, as a proxy, t= he request format is not what the server expects, particularly with regard = to how the host value is present in the URL in the GET. You might try curl = directly to the web server but with the --proxy option and see what happens= . From the log you should also be able to see exactly what is sent by ATS t= o the origin server.
=


On Thursd= ay, January 21, 2016 2:07 PM, Victor Danilchenko <vdanilchenko@cimpress.= com> wrote:


OK,= I dropped the port 80 config, and enabled the debugging.
=20
&n= bsp;
=20
I t= hen did some random poking, and I realized that requests from localhost succeed (i.e. when I use =E2=80=98curl=E2=80=99 on the ser= ver, or run Chromium) but fail from any other host. So I tried replacing al= l the hostnames in the remap file with IPs, but that didn=E2=80=99t help = =E2=80=93 the remote requests still time out.
=20
&n= bsp;
=20
I a= m not running AppArmor, and my /etc/hosts only contains the default entries= (localhost definitions and somesuch). The DNS resolution on command line w= orks in both directions (hostname to IP, and IP to hostname).
=20
&n= bsp;
=20
Any= way, the debug dump from a single request is huge, nearly 3000 lines. As be= st as I can figure, the following things might be relevant:
=20
&n= bsp;
=20
=C2=B7         Multiple failing req= uests for  http://127.0.0.1:8083/synthetic.txt -- I have no idea where these ar= e coming from.
=20
=C2=B7         The request for http://vdanilchenko-corewiki.vistaprint.net:80= 80/phpinfo2.php gets received, processed, and forwarded to the origin s= erver
=20
=C2=B7         The response from th= e origin server result in the following log entriess (cleaned up for readab= ility):

=20
+++++++++ Incoming O.S. Response +++++++++=20
-- State Machine Id: 0
=20
DEBUG: (http_seq) [HttpTransact::HandleResponse] Response not valid
= =20
DEBUG: (http_trans) [handle_response_from_server] (= hrfs)
=20
DEBUG: (http_trans) [1] failed to connect [5] to 10.87.40.225
=20
DEBUG: (http_trans) [retry_server_connection_not_op= en] attempts now: 2, max: 3
=20
DEBUG: (http_trans) [handle_response_from_server] E= rror. Retrying...
=20
DEBUG: (http) [0] State Transition: ORIGIN_SERVER_O= PEN -> ORIGIN_SERVER_OPEN
=20
DEBUG: (http_track) entered inside do_http_server_o= pen
=20
DEBUG: (http) [0] open connection to vdanilchenko-c= orewiki.vistaprint.net: 10.87.40.225:80
=20
DEBUG: (http_seq) [HttpSM::do_http_server_open] Sen= ding request to server
=20
DEBUG: (http) calling netProcessor.connect_re
=20
DEBUG: (http) [0] [HttpSM::main_handler, NET_EVENT_= OPEN]
=20
DEBUG: (http_track) entered inside state_http_serve= r_open
=20
DEBUG: (http) [0] [&HttpSM::state_http_server_o= pen, NET_EVENT_OPEN]
=20
DEBUG: (http_ss) [4] session born, netvc 0x2b59ec01= 50e0
=20
&n= bsp;
=20
Each such set of log entries is followed by a numb= er of apparently failing requests for http://127.0.0.1:8083/synthetic.txt =E2=80=93 even though I can acce= ss that URL and retrieve the =E2=80=98synthetics.txt=E2=80=99 file (it=E2= =80=99s 60 lines of =E2=80=98abcdefghijklmnopqrstuvwxyz=E2=80=99).=20
&n= bsp;
=20
Man= ually retrieving = http://10.87.40.225/phpinfo2.php (on non-proxy port) works like a charm= , though, so I still have no idea why TrafficServer is failing to connect.<= /span>
=20
&n= bsp;
=20
I t= ried monitoring traffic on port 80 via ngrep, and when I do regular request= to origin server (on port 80), it works fine =E2=80=93 I observe the reque= st and response as expected; but when I make a request to the proxy (on port 8080), there= =E2=80=99s simply nothing going across the port 80. Ngrep is just sitting t= here and printing packet hashmarks, but no content.
=20
&n= bsp;
=20
So = it looks like trafficserver is not merely not getting a response, it=E2=80= =99s never actually making the request=E2=80=A6 as long as the client is re= mote. If the client is local, everything works as expected.
=20
&n= bsp;
=20
&n= bsp;
=20
= From: Alan Carroll [mailto:sol= idwallofcode@yahoo-inc.com]
Sent: Wednesday, January 20, 2016 3:19 PM
To: users@trafficserver.apache.org
Subject: Re: Need help with a particular usage scenario
= =20
 
=20
A couple of things to try -
=20
 
=20
1) Drop the :80
=20
 
=20
2) Turn on debug tags with a value of "http|dns" and see what you g= et. Those tend to be informative in this regard, as you will be able to see= exactly what ATS thinks it is connecting to.
=20
 
=20
On Wednesday, January 20, 2016 2:05 PM, Victor Dan= ilchenko <vdanilchenko@cimpress.com> wrote:
=20
 
=20
Ah, thank you very much, updating the maps did cha= nge things! Right now I am getting error messages that kinda make sense.
=20
 
=20
So, here=E2=80=99s my new remap settings:
=20
 
=20
 
=20
When I try to hit http://mediawiki.m= ycompany.com:8080/phpinfo2.php in the browser now, I get a 502 response after a lengthy timeout:
=20
 
=20
internal error - server connection = terminated
=20
 
=20
and on the server, in error.log, the following gets recorded:
=20
 
=20
20160120.14h51m15s RESPONSE: sent 10.87= .40.108 status 502 (Connect Error <internal error - server connection te= rminated/-19999>) for 'http://localhost:80/phpinfo2.php'=20
 <= /div>=20
I tried this both using localhost in t= he maps, and FQDNs everywhere, the result i= s the same. I most definitely can get this URL on the server using curl:
=20
 
=20
$ curl -Is http:/= /localhost:80/phpinfo2.php | grep ^HTTP
= =20
HTTP/1.1 200 OK=
=20
 
=20
So it looks like for some weird reason, TrafficSer= ver is trying =E2=80=93 and failing =E2=80=93 to contact the origin provide= r.
=20
 
=20
Any idea what might be going wrong?
=20
 
=20
Thanks so much for your help!
=20
 
=20
 
=20
From: Alan Carroll [mailto:solidwallof= code@yahoo-inc.com]
Sent: Wednesday, January 20, 2016 2:09 PM
To:
users@trafficserver.apa= che.org
Subject: Re: Need help with a particular usage scenario
=20
 
=20
Hmmm. A parent proxy set up might work better. The logging of empty= URLs is a bug in the logging code which has been fixed (current ATS versio= n is 6.0). If you are doing remap, you need a forward map as well like
= =20
 
=20
 
=20
reverse_map, if I recall correctly, only applies to response header= s from the origin, to modify them to use the proxy URL instead of the origi= n URL (as supplied by the origin).
=20
 
=20
I'd recommend moving up in versions, to at least 5.3.x.=20
 
=20
On Wednesday, January 20, 2016 12:23 PM, Victor Da= nilchenko <vdanilchenko@cimpress.com> wrote:
=20
 
=20
Hi all,
=20
 
=20
I need to set up a caching proxy to not work as a proxy, but rather= to simply provide caching upon direct access. For example:
=20
 
=20
There=E2=80=99s a Mediawiki installation running at http://mediawiki.mycompany.com
=20
And I need to set up a proxy on an alternative port, http://mediawiki.mycompany.com:8080<= span style=3D"">, which would do nothing but serve up the traffic from the default port, but cached (we aren=E2=80= =99t trying to cache the entire MediaWiki installation, but rather provide = an alternative entry point for a specific use case).
=20
 
=20
I am having trouble figuring out what it would take to set up Traff= icServer to do this. I set it up (Ubuntu Vivid, TS 3.2.4), but TS logs empt= y URLs (http:///) and of course fails to find them =E2=80=93 presumably because it doesn=E2= =80=99t receive the customary proxy HTTP headers; so I hit http://mediawiki.mycompany.com:8080<= span style=3D"">, and only get back 404s.
=20
 
=20
Is there an easy way to accomplish what I am looking to do? Here=E2= =80=99s the config I have right now.
=20
 
=20
In records.config (in addition to all the standard defaults):
=20
 
=20
CONFIG proxy.config.http.server_ports STRING 8080
=20
CONFIG proxy.config.http.cache.http INT 1
=20
CONFIG proxy.config.reverse_proxy.enabled INT 1
=20
CONFIG proxy.config.url_remap.remap_required INT 1
=20
CONFIG proxy.config.url_remap.pristine_host_hdr INT 1
= =20
 
=20
And in remap.config:
=20
 
=20
 
=20
I have never set up a proxy before.
=20
 
=20
Any suggestions on what I need to do? Thanks.
=20
 
=20
 
=20


------=_Part_7427537_872244773.1453477848453--