You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "BONUMAHANTI, RAJENDRA KISHORE" <rb...@att.com> on 2016/09/22 14:01:37 UTC

Issue with collpased_forwarding plugin

Hi,

I am testing collapsed_forwarding plugin (https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/collapsed_forwarding.en.html?highlight=collapsed_forwarding) via ATS 6.2.x branch.

We observed an error "DNS error 2 for [testurl.com]" for cache-miss, when remap.config is configured with "collapsed_forwarding" to work alone as a remap plugin. We must modify TSRemapDoRemap() in the plugin to "return TSREMAP_NO_REMAP" to allow DNS lookup successful. It does not seem right for the plugin to do "return TSREMAP_NO_REMAP" when it did not.

Can someone help me to understand how this plugin needs to be used? Or does it require the fix I mentioned above?

Regards,
Kishore

== Sample remap.config entry and cach miss error when used "collapsed_forwarding" by itself ==
map http://testurl.com/ http://origin.com/ @plugin=collapsed_forwarding.so @pparam=--delay=10 @pparam=--retries=5

I observed that during cache-miss, DNS query happens on the 'from' url (hostname) in the remap and it gets failed.
....
[Sep  9 19:39:16.355] Server {0x2b170ea6c940} DEBUG: (dns) send query (qtype=1) for testurl.com to fd 43
[Sep  9 19:39:16.355] Server {0x2b170ea6c940} DEBUG: (dns) sent qname = testurl.com, id = 9287, nameserver = 1
[Sep  9 19:39:16.355] Server {0x2b170ea6c940} DEBUG: (dns) sent_one: failover_number for resolve 1 is 1
[Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) received packet size = 52
[Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) round-robin: nameserver 1 DNS respons code = 0
[Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) received rcode = 2
[Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) DNS error 2 for [testurl.com]
[Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) doing retry for testurl.com

I further looked in to the code and found that it is due to return code from the plugin is TSREMAP_DID_REMAP in TSRemapDoRemap(). It makes ATS not to perform remap.



Re: Issue with collpased_forwarding plugin

Posted by James Peach <jp...@apache.org>.
> On Sep 22, 2016, at 7:01 AM, BONUMAHANTI, RAJENDRA KISHORE <rb...@att.com> wrote:
> 
> Hi,
> 
> I am testing collapsed_forwarding plugin (https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/collapsed_forwarding.en.html?highlight=collapsed_forwarding) via ATS 6.2.x branch.
> 
> We observed an error "DNS error 2 for [testurl.com]" for cache-miss, when remap.config is configured with "collapsed_forwarding" to work alone as a remap plugin. We must modify TSRemapDoRemap() in the plugin to "return TSREMAP_NO_REMAP" to allow DNS lookup successful. It does not seem right for the plugin to do "return TSREMAP_NO_REMAP" when it did not.

Yes, this is a bug. Can you file a bug at https://issues.apache.org/jira/browse/TS, and make a github pull request with your fix?

> 
> Can someone help me to understand how this plugin needs to be used? Or does it require the fix I mentioned above?
> 
> Regards,
> Kishore
> 
> == Sample remap.config entry and cach miss error when used "collapsed_forwarding" by itself ==
> map http://testurl.com/ http://origin.com/ @plugin=collapsed_forwarding.so @pparam=--delay=10 @pparam=--retries=5
> 
> I observed that during cache-miss, DNS query happens on the 'from' url (hostname) in the remap and it gets failed.
> ....
> [Sep  9 19:39:16.355] Server {0x2b170ea6c940} DEBUG: (dns) send query (qtype=1) for testurl.com to fd 43
> [Sep  9 19:39:16.355] Server {0x2b170ea6c940} DEBUG: (dns) sent qname = testurl.com, id = 9287, nameserver = 1
> [Sep  9 19:39:16.355] Server {0x2b170ea6c940} DEBUG: (dns) sent_one: failover_number for resolve 1 is 1
> [Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) received packet size = 52
> [Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) round-robin: nameserver 1 DNS respons code = 0
> [Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) received rcode = 2
> [Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) DNS error 2 for [testurl.com]
> [Sep  9 19:39:16.628] Server {0x2b170ea6c940} DEBUG: (dns) doing retry for testurl.com
> 
> I further looked in to the code and found that it is due to return code from the plugin is TSREMAP_DID_REMAP in TSRemapDoRemap(). It makes ATS not to perform remap.
> 
>