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 1CCD6C9A0 for ; Wed, 26 Jun 2013 11:06:27 +0000 (UTC) Received: (qmail 24606 invoked by uid 500); 26 Jun 2013 11:06:27 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 23777 invoked by uid 500); 26 Jun 2013 11:06:20 -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 23769 invoked by uid 99); 26 Jun 2013 11:06:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jun 2013 11:06:19 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of uttav.avinash99@gmail.com designates 209.85.220.48 as permitted sender) Received: from [209.85.220.48] (HELO mail-pa0-f48.google.com) (209.85.220.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jun 2013 11:06:15 +0000 Received: by mail-pa0-f48.google.com with SMTP id kp12so13924319pab.21 for ; Wed, 26 Jun 2013 04:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0ElmZFaF34+QxPSTStXbYETexuryfUof3DDfKj5iJkU=; b=ZMO+V/Uk4t6WuPTjWbfYkfrbDU+7RlsfCtFnyAmpPIFdPJjmGHg/uwjXRv8ceHUiRL lJV5vD2odlJDiMQEoByTgDoQut8apNQ6JAQIyJy7B9WhI0YVuYoz1E1WpXmwS5Bj9+XX KjdgHytE4W74ufOQ4mZwnE4WRglcF38smbf0pqLK8dJ4LDQzFfEZL+3nB+pj0flhyiik LImyP4Z3ccV6dmHDjzB6MfVctLNFC7W0iRp1R/PsNo+bRmypOwonBsfveOrbTsJvM7jP 8rVtXQnaeOgzAOB1Zk1dfhvsyH+2YMRZgrLHEQ7kj55QyGBG83Hsgi2layDjxcOvNGwg LcXA== MIME-Version: 1.0 X-Received: by 10.68.168.165 with SMTP id zx5mr46578pbb.189.1372244755022; Wed, 26 Jun 2013 04:05:55 -0700 (PDT) Received: by 10.70.136.103 with HTTP; Wed, 26 Jun 2013 04:05:54 -0700 (PDT) In-Reply-To: References: Date: Wed, 26 Jun 2013 16:35:54 +0530 Message-ID: Subject: Re: doubt about the api TSNetAccept and TSNetAcceptNamedProtocol . From: Avinash Uttav To: users@trafficserver.apache.org Content-Type: multipart/alternative; boundary=047d7b874b3c2b0a6e04e00ca125 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b874b3c2b0a6e04e00ca125 Content-Type: text/plain; charset=ISO-8859-1 Thank you very much sir , Can u please tell me what are the correct arguments i need to pass with TSNetAccept to make the plugin work with it or any changes in that api (TSNetAccept)?? by default that opt.frequent_accept is set as False and fd as -1 do i need to change that ?? On Wed, Jun 26, 2013 at 5:42 AM, James Peach wrote: > On Jun 25, 2013, at 4:34 AM, Avinash Uttav > wrote: > > > Hi, > > I m trying to get the SPDY plugin working . Kindly help ,I have been > stuck at this for very long . > > After debugging I found out everytime the continuation handler is set as > HttpAccept::main event > > and the event passed to it is 202 but is NET_EVENT_ACCEPT. > > Why both the functions TSNetAccept and TSNetAcceptNamed Protocol not > getting the EVENT .... > > TS_EVENT_NET_ACCEPT and connection data .. > > I hacked up the spdy plugin to use TSNetAccept and the TSNetAccept API > appeared to work correctly. You are correct, there was a regression in > TSNetAcceptNamed. I've fixed this in master < > https://issues.apache.org/jira/browse/TS-1972>. > > thanks, > James > > > While I tried with TSHttpTxnIntercept its sending the correct event and > data to the Spdy plugin but is not usable for this case ... > > Kindly Help me I have been stuck at this point for too long . Is there > any configuration settings that I m missing or its about something else . > > > > The situation is same when I use TSNetAccept in spdy plugin instead of > TSNetAcceptNamedProtocol to avoid any possible ssl problems. > > > > Running chrome in use-spdy=no-ssl mode . > > > > Here is the log upto initialization of connection to see that plugin got > loaded perfectly . (please ignore the comments added by me for debugging > under my_tag and some printf statements ) > > > > > > Layout configuration > > --prefix = '/home/avinash/ats' > > --exec_prefix = '/home/avinash/ats' > > --bindir = '/home/avinash/ats/bin' > > --sbindir = '/home/avinash/ats/bin' > > --sysconfdir = '/home/avinash/ats/etc/trafficserver' > > --datadir = '/home/avinash/ats/share/trafficserver' > > --includedir = '/home/avinash/ats/include' > > --libdir = '/home/avinash/ats/lib' > > --libexecdir = '/home/avinash/ats/libexec/trafficserver' > > --localstatedir = '/home/avinash/ats/var' > > --runtimedir = '/home/avinash/ats/var/trafficserver' > > --logdir = '/home/avinash/ats/var/log/trafficserver' > > --mandir = '/home/avinash/ats/man' > > --infodir = '/home/avinash/ats/info' > > --cachedir = '/home/avinash/ats/var/trafficserver' > > [TrafficServer] using root directory '/home/avinash/ats' > > [New Thread 0x7ffff5289700 (LWP 5799)] > > [Jun 25 17:02:08.628] Server {0x7ffff7fd1720} DEBUG: (http_init) > proxy.config.http.redirection_enabled = 0 > > [Jun 25 17:02:08.628] Server {0x7ffff7fd1720} DEBUG: (http_init) > proxy.config.http.number_of_redirections = 1 > > [Jun 25 17:02:08.628] Server {0x7ffff7fd1720} DEBUG: (http_init) > proxy.config.http.post_copy_size = 2048 > > [Jun 25 17:02:08.633] Server {0x7ffff7fd1720} DEBUG: (dns) ink_dns_init: > called with init_called = 0 > > [New Thread 0x7ffff3e61700 (LWP 5800)] > > [New Thread 0x7ffff3d60700 (LWP 5801)] > > [New Thread 0x7ffff3c5f700 (LWP 5802)] > > [New Thread 0x7ffff3b5e700 (LWP 5803)] > > [New Thread 0x7ffff3a5d700 (LWP 5804)] > > [New Thread 0x7ffff385b700 (LWP 5805)] > > [New Thread 0x7ffff3659700 (LWP 5806)] > > [New Thread 0x7ffff3457700 (LWP 5807)] > > [Jun 25 17:02:08.650] Server {0x7ffff7fd1720} DEBUG: (dns) > localhost=Proxy1 > > [Jun 25 17:02:08.650] Server {0x7ffff7fd1720} DEBUG: (dns) Round-robin > nameservers = 0 > > [New Thread 0x7ffff2e4e700 (LWP 5808)] > > [New Thread 0x7ffff2c4c700 (LWP 5809)] > > [New Thread 0x7ffff2a4a700 (LWP 5810)] > > [New Thread 0x7ffff2848700 (LWP 5811)] > > [New Thread 0x7ffff2646700 (LWP 5812)] > > [New Thread 0x7ffff2444700 (LWP 5813)] > > [New Thread 0x7ffff2242700 (LWP 5814)] > > [New Thread 0x7ffff2040700 (LWP 5815)] > > [Jun 25 17:02:08.674] Server {0x7ffff7fd1720} DEBUG: (ssl) setting SNI > callbacks with for ctx 0x7fffec0c9d20 > > [Jun 25 17:02:08.674] Server {0x7ffff7fd1720} DEBUG: (ssl) indexed '*' > with SSL_CTX 0x7fffec0c9d20 > > [New Thread 0x7ffff1e3e700 (LWP 5816)] > > [New Thread 0x7ffff1b9b700 (LWP 5817)] > > do listen function[New Thread 0x7ffff1999700 (LWP 5818)] > > accepting loop eventdoing blocking acceptdo listen function[New Thread > 0x7ffff1797700 (LWP 5819)] > > accepting loop eventdoing blocking accept[Jun 25 17:02:08.690] Server > {0x7ffff7fd1720} DIAG: (http) plugin loading = 1 > > [Jun 25 17:02:08.690] Server {0x7ffff7fd1720} DIAG: (my_tag) plugin path > = /home/avinash/ats/libexec/trafficserver/spdy.so > > [Jun 25 17:02:08.690] Server {0x7ffff7fd1720} DIAG: (my_tag) dll open > path = /home/avinash/ats/libexec/trafficserver/spdy.so > > [Jun 25 17:02:08.690] Server {0x7ffff7fd1720} DIAG: (my_tag) dll open > RTLD_NOW = 2 > > [Jun 25 17:02:08.713] Server {0x7ffff7fd1720} DIAG: (spdy.plugin) > TSPluginInit:392 initializing > > [Jun 25 17:02:08.713] Server {0x7ffff7fd1720} DIAG: (spdy.plugin) > TSPluginInit:418 registered named protocol endpoint for spdy/2 > > [Jun 25 17:02:08.713] Server {0x7ffff7fd1720} DIAG: (my_tag) the accept > port is 18100 > > [New Thread 0x7ffff0c61700 (LWP 5820)] > > [New Thread 0x7ffff0b60700 (LWP 5821)] > > do listen function[New Thread 0x7ffff091a700 (LWP 5822)] > > accepting loop eventdoing blocking accept[Jun 25 17:02:08.758] Server > {0x7ffff7fd1720} DEBUG: (dns) DNSHandler::startEvent: on thread 0 > > [Jun 25 17:02:08.758] Server {0x7ffff7fd1720} DEBUG: (dns) open_con: > opening connection107.108.3.17:53 > > [Jun 25 17:02:08.758] Server {0x7ffff7fd1720} DEBUG: (dns) random port = > 0.0.0.0:40438 > > [Jun 25 17:02:08.758] Server {0x7ffff7fd1720} DEBUG: (dns) opening > connection 107.108.3.17:53SUCCEEDED for 0 > > [Switching to Thread 0x7ffff3e61700 (LWP 5800)] > > > > > > > > > > > > > > Here is the backtrace when the event 202 is passed to HttpAccept and not > Plugin(SPDY plugin) > > > > > > > > (gdb) bt > > #0 HttpAccept::mainEvent (this=0x7fffec139220, event=202, > data=0x10c9e10) at HttpAccept.cc:43 > > #1 0x00000000004e1c28 in Continuation::handleEvent > (this=0x7fffec139220, event=202, data=0x10c9e10) at > ../iocore/eventsystem/I_Continuation.h:146 > > #2 0x00000000006bd5f5 in UnixNetVConnection::acceptEvent > (this=0x10c9e10, event=1, e=0x10a3a50) at UnixNetVConnection.cc:974 > > #3 0x00000000004e1c28 in Continuation::handleEvent (this=0x10c9e10, > event=1, data=0x10a3a50) at ../iocore/eventsystem/I_Continuation.h:146 > > #4 0x00000000006dbc51 in EThread::process_event (this=0x7ffff4266010, > e=0x10a3a50, calling_code=1) at UnixEThread.cc:142 > > #5 0x00000000006dbea5 in EThread::execute (this=0x7ffff4266010) at > UnixEThread.cc:194 > > #6 0x00000000006dae60 in spawn_thread_internal (a=0x105cf60) at > Thread.cc:88 > > #7 0x00007ffff76789ca in start_thread (arg=) at > pthread_create.c:300 > > #8 0x00007ffff557821d in clone () at > ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 > > #9 0x0000000000000000 in ?? () > > > > Thank You . > > --047d7b874b3c2b0a6e04e00ca125 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thank you very much sir ,
Can u please = tell me what are the correct arguments i need to pass with TSNetAccept
= to make the plugin work with it or any changes in that api (TSNetAccept)?? =
by default that opt.frequent_accept is set as False and fd as -1
= do i need to change that=A0 ??


=
On Wed, Jun 26, 2013 at 5:42 AM, James Peach <j= peach@apache.org> wrote:
On Jun 25, 2013, at 4:34 A= M, Avinash Uttav <uttav.avi= nash99@gmail.com> wrote:

> Hi,
> I m trying to get the SPDY plugin working . =A0Kindly help ,I have bee= n stuck at this for very long .
> After debugging I found out everytime the continuation handler is set = as HttpAccept::main event
> and the event passed to it is 202 but is NET_EVENT_ACCEPT.
> Why both the functions TSNetAccept and TSNetAcceptNamed Protocol not g= etting the EVENT ....
> TS_EVENT_NET_ACCEPT and connection data ..

I hacked up the spdy plugin to use TSNetAccept and the TSNetAccept AP= I appeared to work correctly. You are correct, there was a regression in TS= NetAcceptNamed. I've fixed this in master <https://issues.apache.or= g/jira/browse/TS-1972>.

thanks,
James

> While I tried with TSHttpTxnIntercept its sending the correct event an= d data to the Spdy plugin but is not usable for =A0this case ...
> Kindly Help me I have been stuck at this point for too long . Is there= any configuration settings that I m missing or its about something else .<= br> >
> The situation is same when I use TSNetAccept =A0in spdy plugin instead= of TSNetAcceptNamedProtocol to avoid any possible ssl problems.
>
> Running chrome in use-spdy=3Dno-ssl =A0mode .
>
> Here is the log upto initialization of connection to see that plugin g= ot loaded perfectly . (please ignore the comments added by me for debugging= under my_tag and some printf statements )
>
>
> Layout configuration
> =A0 =A0 =A0 =A0 =A0 --prefix =3D '/home/avinash/ats'
> =A0 =A0 =A0--exec_prefix =3D '/home/avinash/ats'
> =A0 =A0 =A0 =A0 =A0 --bindir =3D '/home/avinash/ats/bin'
> =A0 =A0 =A0 =A0 =A0--sbindir =3D '/home/avinash/ats/bin'
> =A0 =A0 =A0 --sysconfdir =3D '/home/avinash/ats/etc/trafficserver&= #39;
> =A0 =A0 =A0 =A0 =A0--datadir =3D '/home/avinash/ats/share/traffics= erver'
> =A0 =A0 =A0 --includedir =3D '/home/avinash/ats/include'
> =A0 =A0 =A0 =A0 =A0 --libdir =3D '/home/avinash/ats/lib'
> =A0 =A0 =A0 --libexecdir =3D '/home/avinash/ats/libexec/trafficser= ver'
> =A0 =A0--localstatedir =3D '/home/avinash/ats/var'
> =A0 =A0 =A0 --runtimedir =3D '/home/avinash/ats/var/trafficserver&= #39;
> =A0 =A0 =A0 =A0 =A0 --logdir =3D '/home/avinash/ats/var/log/traffi= cserver'
> =A0 =A0 =A0 =A0 =A0 --mandir =3D '/home/avinash/ats/man'
> =A0 =A0 =A0 =A0 =A0--infodir =3D '/home/avinash/ats/info'
> =A0 =A0 =A0 =A0 --cachedir =3D '/home/avinash/ats/var/trafficserve= r'
> [TrafficServer] using root directory '/home/avinash/ats'
> [New Thread 0x7ffff5289700 (LWP 5799)]
> [Jun 25 17:02:08.628] Server {0x7ffff7fd1720} DEBUG: (http_init) proxy= .config.http.redirection_enabled =3D 0
> [Jun 25 17:02:08.628] Server {0x7ffff7fd1720} DEBUG: (http_init) proxy= .config.http.number_of_redirections =3D 1
> [Jun 25 17:02:08.628] Server {0x7ffff7fd1720} DEBUG: (http_init) proxy= .config.http.post_copy_size =3D 2048
> [Jun 25 17:02:08.633] Server {0x7ffff7fd1720} DEBUG: (dns) ink_dns_ini= t: called with init_called =3D 0
> [New Thread 0x7ffff3e61700 (LWP 5800)]
> [New Thread 0x7ffff3d60700 (LWP 5801)]
> [New Thread 0x7ffff3c5f700 (LWP 5802)]
> [New Thread 0x7ffff3b5e700 (LWP 5803)]
> [New Thread 0x7ffff3a5d700 (LWP 5804)]
> [New Thread 0x7ffff385b700 (LWP 5805)]
> [New Thread 0x7ffff3659700 (LWP 5806)]
> [New Thread 0x7ffff3457700 (LWP 5807)]
> [Jun 25 17:02:08.650] Server {0x7ffff7fd1720} DEBUG: (dns) localhost= =3DProxy1
> [Jun 25 17:02:08.650] Server {0x7ffff7fd1720} DEBUG: (dns) Round-robin= nameservers =3D 0
> [New Thread 0x7ffff2e4e700 (LWP 5808)]
> [New Thread 0x7ffff2c4c700 (LWP 5809)]
> [New Thread 0x7ffff2a4a700 (LWP 5810)]
> [New Thread 0x7ffff2848700 (LWP 5811)]
> [New Thread 0x7ffff2646700 (LWP 5812)]
> [New Thread 0x7ffff2444700 (LWP 5813)]
> [New Thread 0x7ffff2242700 (LWP 5814)]
> [New Thread 0x7ffff2040700 (LWP 5815)]
> [Jun 25 17:02:08.674] Server {0x7ffff7fd1720} DEBUG: (ssl) setting SNI= callbacks with for ctx 0x7fffec0c9d20
> [Jun 25 17:02:08.674] Server {0x7ffff7fd1720} DEBUG: (ssl) indexed = 9;*' with SSL_CTX 0x7fffec0c9d20
> [New Thread 0x7ffff1e3e700 (LWP 5816)]
> [New Thread 0x7ffff1b9b700 (LWP 5817)]
> do listen function[New Thread 0x7ffff1999700 (LWP 5818)]
> accepting loop eventdoing blocking acceptdo listen function[New Thread= 0x7ffff1797700 (LWP 5819)]
> accepting loop eventdoing blocking accept[Jun 25 17:02:08.690] Server = {0x7ffff7fd1720} DIAG: (http) plugin loading =3D 1
> [Jun 25 17:02:08.690] Server {0x7ffff7fd1720} DIAG: (my_tag) plugin pa= th =3D /home/avinash/ats/libexec/trafficserver/spdy.so
> [Jun 25 17:02:08.690] Server {0x7ffff7fd1720} DIAG: (my_tag) dll open = path =3D /home/avinash/ats/libexec/trafficserver/spdy.so
> [Jun 25 17:02:08.690] Server {0x7ffff7fd1720} DIAG: (my_tag) dll open = RTLD_NOW =3D 2
> [Jun 25 17:02:08.713] Server {0x7ffff7fd1720} DIAG: (spdy.plugin) TSPl= uginInit:392 initializing
> [Jun 25 17:02:08.713] Server {0x7ffff7fd1720} DIAG: (spdy.plugin) TSPl= uginInit:418 registered named protocol endpoint for spdy/2
> [Jun 25 17:02:08.713] Server {0x7ffff7fd1720} DIAG: (my_tag) the accep= t port is 18100
> [New Thread 0x7ffff0c61700 (LWP 5820)]
> [New Thread 0x7ffff0b60700 (LWP 5821)]
> do listen function[New Thread 0x7ffff091a700 (LWP 5822)]
> accepting loop eventdoing blocking accept[Jun 25 17:02:08.758] Server = {0x7ffff7fd1720} DEBUG: (dns) DNSHandler::startEvent: on thread 0
> [Jun 25 17:02:08.758] Server {0x7ffff7fd1720} DEBUG: (dns)= open_con: opening connection107.108.3.17:53
> [Jun 25 17:02:08.758] Server {0x7ffff7fd1720} DEBUG:= (dns) random port =3D 0= .0.0.0:40438
> [Jun 25 17:02:08.758] Server {0x7ffff7fd1720} DEBUG: (dns) openi= ng connection 107.108.3.17:53SUCCEEDED for 0
> [Switching to Thread 0x7ffff3e= 61700 (LWP 5800)]
>
>
>
>
>
>
> Here is the backtrace when the event 202 is passed to HttpAccept and n= ot Plugin(SPDY plugin)
>
>
>
> (gdb) bt
> #0 =A0HttpAccept::mainEvent (this=3D0x7fffec139220, event=3D202, data= =3D0x10c9e10) at HttpAccept.cc:43
> #1 =A00x00000000004e1c28 in Continuation::handleEvent (this=3D0x7fffec= 139220, event=3D202, data=3D0x10c9e10) at ../iocore/eventsystem/I_Continuat= ion.h:146
> #2 =A00x00000000006bd5f5 in UnixNetVConnection::acceptEvent (this=3D0x= 10c9e10, event=3D1, e=3D0x10a3a50) at UnixNetVConnection.cc:974
> #3 =A00x00000000004e1c28 in Continuation::handleEvent (this=3D0x10c9e1= 0, event=3D1, data=3D0x10a3a50) at ../iocore/eventsystem/I_Continuation.h:1= 46
> #4 =A00x00000000006dbc51 in EThread::process_event (this=3D0x7ffff4266= 010, e=3D0x10a3a50, calling_code=3D1) at UnixEThread.cc:142
> #5 =A00x00000000006dbea5 in EThread::execute (this=3D0x7ffff4266010) a= t UnixEThread.cc:194
> #6 =A00x00000000006dae60 in spawn_thread_internal (a=3D0x105cf60) at T= hread.cc:88
> #7 =A00x00007ffff76789ca in start_thread (arg=3D<value optimized ou= t>) at pthread_create.c:300
> #8 =A00x00007ffff557821d in clone () at ../sysdeps/unix/sysv/linux/x86= _64/clone.S:112
> #9 =A00x0000000000000000 in ?? ()
>
> Thank You .


--047d7b874b3c2b0a6e04e00ca125--