You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by James Peach <jp...@apache.org> on 2013/12/18 03:48:58 UTC

Re: ATS 4.0.1: map rule does not work?

On Dec 17, 2013, at 6:43 PM, Eddie <zt...@yahoo.com> wrote:

> James,
> 
> I do not see ATS crashing ... following are the logs after I restarted ATS:
> 
> diags.log:
> 
> [Dec 18 02:31:02.960] {0x2b15a51dc840} STATUS: opened /var/log/trafficserver/diags.log
> [Dec 18 02:31:02.960] {0x2b15a51dc840} NOTE: updated diags config
> [Dec 18 02:31:02.964] Server {0x2b15a51dc840} NOTE: cache clustering disabled
> [Dec 18 02:31:02.977] Server {0x2b15a51dc840} NOTE: ip_allow.config updated, reloading
> [Dec 18 02:31:02.990] Server {0x2b15a51dc840} NOTE: cache clustering disabled
> [Dec 18 02:31:02.991] Server {0x2b15a51dc840} NOTE: logging initialized[15], logging_mode = 3
> [Dec 18 02:31:02.994] Server {0x2b15a51dc840} NOTE: loading plugin '/libexec/trafficserver/stats_over_http.so'
> [Dec 18 02:31:03.024] Server {0x2b15a51dc840} NOTE: traffic server running
> [Dec 18 02:31:03.037] Server {0x2b15a7bad700} NOTE: cache enabled
> 
> traffic.out:
> 
> NOTE: Traffic Server received Sig 15: Terminated
> [TrafficManager] ==> Cleaning up and reissuing signal #15
> [TrafficManager] ==> signal #15
> [E. Mgmt] log ==> [TrafficManager] using root directory '/'
> [TrafficServer] using root directory '/'
> 
> 
> manager.log:
> 
> [Dec 18 02:30:55.747] Manager {0x7f75ae4497e0} ERROR: [TrafficManager] ==> Cleaning up and reissuing signal #15
> [Dec 18 02:30:55.747] Manager {0x7f75ae4497e0} ERROR:  (last system error 14: Bad address)
> [Dec 18 02:30:55.757] Manager {0x7f75ae4497e0} ERROR: [TrafficManager] ==> signal #15
> [Dec 18 02:30:55.757] Manager {0x7f75ae4497e0} ERROR:  (last system error 14: Bad address)
> [Dec 18 02:31:00.917] {0x7f770e4d47e0} STATUS: opened /var/log/trafficserver/manager.log
> [Dec 18 02:31:00.917] {0x7f770e4d47e0} NOTE: updated diags config
> [Dec 18 02:31:00.920] Manager {0x7f770e4d47e0} NOTE: [ClusterCom::ClusterCom] Node running on OS: 'Linux' Release: '2.6.32-279.el6.x86_64'
> [Dec 18 02:31:00.922] Manager {0x7f770e4d47e0} NOTE: [LocalManager::listenForProxy] Listening on port: 80
> [Dec 18 02:31:00.922] Manager {0x7f770e4d47e0} NOTE: [TrafficManager] Setup complete
> [Dec 18 02:31:01.934] Manager {0x7f770e4d47e0} NOTE: [LocalManager::startProxy] Launching ts process
> [Dec 18 02:31:01.945] Manager {0x7f770e4d47e0} NOTE: [LocalManager::pollMgmtProcessServer] New process connecting fd '11'
> [Dec 18 02:31:01.945] Manager {0x7f770e4d47e0} NOTE: [Alarms::signalAlarm] Server Process born
> 
> I just re-complied ATS and testing another map rule:
> 
> [root@dnsbt01-cc38 trafficserver]# cat remap.config
> map http://xfinity.net http://xfinity.net @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/xfinity.net.reg
> 
> [root@dnsbt01-cc38 trafficserver]# 
> [root@dnsbt01-cc38 trafficserver]# cat /etc/trafficserver/regexmap/xfinity.net.reg
> ^/x1platform(.*) https://spectrum.comcast.net/webportal/ @status=301
> ^/x1(.*) http://xfinity.comcast.net/x1/ @status=301
> ^/(.*) http://xfinity.comcast.net @status=301
> 
> --------
> Following curl command works fine (I could see output from curl command):
> 
> curl -sLIH "Host: xfinity.net" http://68.87.98.100
> 
> 2013-12-18 02:37:41 10.25.251.168 301 FIN http://xfinity.net http://xfinity.comcast.net
> -------- (Note in log, https is for both source and target URL)
> 
> Following command does not return anything but I saw following in transaction log:
> 
> curl -sLIH "Host: xfinity.net" http://68.87.98.100/x1platform
> 
> 2013-12-18 02:39:06 10.25.251.168 301 FIN https://xfinity.net https://spectrum.comcast.net/webportal/
> 
> --------
> 
> Following command does not return anything from curl but transaction log indicates 301 redirect happened.
> 
> curl -sLIH "Host: xfinity.net" http://68.87.98.100/x1
> 
> 2013-12-18 02:40:46 10.25.251.168 301 FIN http://xfinity.net http://xfinity.comcast.net/x1/
> 
> ----
> 
> I am totally confused. Can you see anything wrong?
> 
> Thank
> 
> Eddie
> 
> 
> On Tuesday, December 17, 2013 9:22 PM, James Peach <jp...@apache.org> wrote:
> On Dec 17, 2013, at 4:24 PM, Eddie <zt...@yahoo.com> wrote:
> 
> > James,
> > 
> > Thanks for helping ... ATS 4.0.1 was installed freshly on a different server. I have some "redirect" rules and they are working fine.
> > I did not do upgrade on the server running ATS 3.2.4.
> > I checked all logs and ATS and did not find anything suspicious (diags.log, error.log, manager.log, etc).
> > 
> > Could you let me know how/where to check more?
> 
> If there's a crash, I'd expect to see the string "STACK TRACE" in traffic.out. Otherwise, check manager.log to see whether it is restarting each time you do a HTTP GET.
> 
> > 
> > Thanks
> > 
> > Eddie
> > 
> > 
> > On Tuesday, December 17, 2013 5:38 PM, James Peach <jp...@apache.org> wrote:
> > On Dec 17, 2013, at 12:56 PM, Eddie <zt...@yahoo.com> wrote:
> > 
> > > I am trying to upgrade ATS from 3.2.4 to 4.0.1. I copied the records.config and remap.config, plus the map rule files from version 3.2.4 server to version 4.0.1  server.
> > > So, everything is same except the ATS versions. However, the map rules are no longer working any more. Does anyone have any idea?
> > > 
> > > map http://vehix.com http://vehix.com @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/vehix.com.reg

Wait, isn't this a URL rewrite loop?

> > > 
> > > But I am getting no response.
> > 
> > Sounds like it is crashing; check your logs and <https://cwiki.apache.org/confluence/display/TS/Upgrading+to+v4.0>
> > 
> > 
> > > 
> > > curl -svIH "HOST: vehix.xom" http://68.87.98.100
> > > * About to connect() to 68.87.98.100 port 80 (#0)
> > > *  Trying 68.87.98.100...
> > > * connected
> > > * Connected to 68.87.98.100 (68.87.98.100) port 80 (#0)
> > >> HEAD / HTTP/1.1
> > >> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> > >> Accept: */*
> > >> HOST: vehix.xom
> > >>  
> > > * Empty reply from server
> > > * Connection #0 to host 68.87.98.100 left intact
> > > * Closing connection #0
> > > 
> > > Does anyone have any clue what I am missing?
> > > 
> > > Thanks
> > > 
> > > Eddie
> > 
> > 
> > 
> 
> 


Re: ATS 4.0.1: map rule does not work?

Posted by Eddie <zt...@yahoo.com>.
James,

Given the last map rule (xfinity.net), what is the right syntax for the rule? 

Thanks

Eddie



On Tuesday, December 17, 2013 9:59 PM, Eddie <zt...@yahoo.com> wrote:
 
I suspected it is a rewrite loop too. But what is the right syntax to do it? This was ported from httpd mod_rewrite.



On Tuesday, December 17, 2013 9:50 PM, James Peach <jp...@apache.org> wrote:
 
On Dec 17, 2013, at 6:43 PM, Eddie <zt...@yahoo.com> wrote:

>
 James,
> 
> I do not see ATS crashing ... following are the logs after I restarted ATS:
> 
> diags.log:
> 
> [Dec 18 02:31:02.960] {0x2b15a51dc840} STATUS: opened /var/log/trafficserver/diags.log
> [Dec 18 02:31:02.960] {0x2b15a51dc840} NOTE: updated diags config
> [Dec 18 02:31:02.964] Server {0x2b15a51dc840} NOTE: cache clustering disabled
> [Dec 18 02:31:02.977] Server {0x2b15a51dc840} NOTE: ip_allow.config updated, reloading
> [Dec 18 02:31:02.990] Server {0x2b15a51dc840} NOTE: cache clustering disabled
> [Dec 18 02:31:02.991] Server {0x2b15a51dc840} NOTE: logging initialized[15], logging_mode = 3
> [Dec 18 02:31:02.994] Server {0x2b15a51dc840} NOTE: loading plugin '/libexec/trafficserver/stats_over_http.so'
> [Dec 18 02:31:03.024] Server {0x2b15a51dc840} NOTE: traffic server running
> [Dec 18 02:31:03.037] Server {0x2b15a7bad700} NOTE: cache enabled
> 
> traffic.out:
> 
> NOTE: Traffic Server received Sig 15: Terminated
> [TrafficManager] ==> Cleaning up and reissuing signal #15
> [TrafficManager] ==> signal #15
> [E. Mgmt] log ==> [TrafficManager] using root directory '/'
> [TrafficServer] using root directory '/'
> 
> 
> manager.log:
> 
> [Dec 18 02:30:55.747] Manager {0x7f75ae4497e0} ERROR: [TrafficManager] ==> Cleaning up and reissuing signal #15
> [Dec 18 02:30:55.747] Manager {0x7f75ae4497e0} ERROR:  (last system error 14: Bad address)
> [Dec 18 02:30:55.757] Manager {0x7f75ae4497e0} ERROR: [TrafficManager] ==> signal #15
> [Dec 18 02:30:55.757] Manager {0x7f75ae4497e0} ERROR:  (last system error 14: Bad address)
> [Dec 18 02:31:00.917] {0x7f770e4d47e0} STATUS: opened /var/log/trafficserver/manager.log
> [Dec 18 02:31:00.917] {0x7f770e4d47e0} NOTE: updated diags config
> [Dec 18 02:31:00.920] Manager {0x7f770e4d47e0} NOTE: [ClusterCom::ClusterCom] Node running on OS: 'Linux' Release: '2.6.32-279.el6.x86_64'
> [Dec 18 02:31:00.922] Manager {0x7f770e4d47e0} NOTE: [LocalManager::listenForProxy] Listening on port: 80
> [Dec 18 02:31:00.922] Manager {0x7f770e4d47e0} NOTE: [TrafficManager] Setup complete
> [Dec 18 02:31:01.934] Manager {0x7f770e4d47e0} NOTE: [LocalManager::startProxy] Launching ts process
> [Dec 18
 02:31:01.945] Manager {0x7f770e4d47e0} NOTE: [LocalManager::pollMgmtProcessServer] New process connecting fd '11'
> [Dec 18 02:31:01.945] Manager {0x7f770e4d47e0} NOTE: [Alarms::signalAlarm] Server Process born
> 
> I just re-complied ATS and testing another map rule:
> 
> [root@dnsbt01-cc38 trafficserver]# cat remap.config
> map http://xfinity.net http://xfinity.net @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/xfinity.net.reg
> 
> [root@dnsbt01-cc38 trafficserver]# 
> [root@dnsbt01-cc38 trafficserver]# cat /etc/trafficserver/regexmap/xfinity.net.reg
> ^/x1platform(.*) https://spectrum.comcast.net/webportal/ @status=301
> ^/x1(.*) http://xfinity.comcast.net/x1/ @status=301
> ^/(.*) http://xfinity.comcast.net @status=301
> 
> --------
> Following curl command works fine (I could see output from curl command):
> 
> curl -sLIH "Host: xfinity.net" http://68.87.98.100
> 
> 2013-12-18 02:37:41 10.25.251.168 301 FIN http://xfinity.net http://xfinity.comcast.net
> -------- (Note in log, https is for both source and target URL)
> 
> Following command does not return anything but I saw following in transaction log:
> 
> curl -sLIH "Host: xfinity.net" http://68.87.98.100/x1platform
> 
> 2013-12-18 02:39:06 10.25.251.168 301 FIN https://xfinity.net https://spectrum.comcast.net/webportal/
> 
> --------
> 
> Following command does not return anything from curl but transaction log indicates 301 redirect happened.
> 
> curl -sLIH "Host: xfinity.net" http://68.87.98.100/x1
> 
> 2013-12-18 02:40:46 10.25.251.168 301 FIN http://xfinity.net http://xfinity.comcast.net/x1/
> 
> ----
> 
> I am totally confused. Can you see anything wrong?
> 
> Thank
> 
> Eddie
> 
> 
> On Tuesday, December 17, 2013 9:22 PM, James
 Peach <jp...@apache.org> wrote:
> On Dec 17, 2013, at 4:24 PM, Eddie <zt...@yahoo.com> wrote:
> 
> > James,
> > 
> > Thanks for helping ... ATS 4.0.1 was installed freshly on a different server. I have some "redirect" rules and they are working fine.
> > I did not do upgrade on the server running ATS 3.2.4.
> > I checked all logs and ATS and did not find anything suspicious (diags.log, error.log, manager.log, etc).
> > 
> > Could you let me know how/where to check more?
> 
> If there's a crash, I'd expect to see the string "STACK TRACE" in
 traffic.out. Otherwise, check manager.log to see whether it is restarting each time you do a HTTP GET.
> 
> > 
> > Thanks
> > 
> > Eddie
> > 
> > 
> > On Tuesday, December 17, 2013 5:38 PM, James Peach <jp...@apache.org> wrote:
> > On Dec 17, 2013, at 12:56 PM, Eddie <zt...@yahoo.com> wrote:
> > 
> > > I am trying to upgrade ATS from 3.2.4 to 4.0.1. I copied the records.config and remap.config, plus the map rule files from version 3.2.4 server to version 4.0.1  server.
> > > So, everything is same
 except the ATS versions. However, the map rules are no longer working any more. Does anyone have any idea?
> > > 
> > > map http://vehix.com http://vehix.com @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/vehix.com.reg

Wait, isn't this a URL rewrite loop?


> > > 
> > > But I am getting no response.
> > 
> > Sounds like it is crashing; check your logs and <https://cwiki.apache.org/confluence/display/TS/Upgrading+to+v4.0>
> > 
> > 
> > > 
> > > curl -svIH "HOST: vehix.xom" http://68.87.98.100
> > > * About to connect() to 68.87.98.100 port 80 (#0)
> > > *  Trying 68.87.98.100...
> > > * connected
> > > * Connected to 68.87.98.100 (68.87.98.100) port 80 (#0)
> > >> HEAD / HTTP/1.1
> > >> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> > >> Accept: */*
> > >> HOST: vehix.xom
> > >>  
> > > * Empty reply from server
> > > * Connection #0 to host 68.87.98.100 left intact
> > > *
 Closing connection #0
> > > 
> > > Does anyone have any clue what I am missing?
> > > 
> > > Thanks
> > > 
> > > Eddie
> > 
> > 
> > 
> 
> 

Re: ATS 4.0.1: map rule does not work?

Posted by James Peach <jp...@apache.org>.
On Dec 17, 2013, at 6:58 PM, Eddie <zt...@yahoo.com> wrote:

> I suspected it is a rewrite loop too. But what is the right syntax to do it? This was ported from httpd mod_rewrite.

Typically, for a reverse proxy, the front end and back end hostnames would differ, eg:

	map http://example.com http://example-origin.com

ATS will detect these loops, but I don't have the details of that to hand. You might have to enable the Via header at some level. If this same config worked for 3.2, then that's bad. I'm pretty sure there were no changes that explicitly altered that.

J

> 
> 
> On Tuesday, December 17, 2013 9:50 PM, James Peach <jp...@apache.org> wrote:
> On Dec 17, 2013, at 6:43 PM, Eddie <zt...@yahoo.com> wrote:
> 
> > James,
> > 
> > I do not see ATS crashing ... following are the logs after I restarted ATS:
> > 
> > diags.log:
> > 
> > [Dec 18 02:31:02.960] {0x2b15a51dc840} STATUS: opened /var/log/trafficserver/diags.log
> > [Dec 18 02:31:02.960] {0x2b15a51dc840} NOTE: updated diags config
> > [Dec 18 02:31:02.964] Server {0x2b15a51dc840} NOTE: cache clustering disabled
> > [Dec 18 02:31:02.977] Server {0x2b15a51dc840} NOTE: ip_allow.config updated, reloading
> > [Dec 18 02:31:02.990] Server {0x2b15a51dc840} NOTE: cache clustering disabled
> > [Dec 18 02:31:02.991] Server {0x2b15a51dc840} NOTE: logging initialized[15], logging_mode = 3
> > [Dec 18 02:31:02.994] Server {0x2b15a51dc840} NOTE: loading plugin '/libexec/trafficserver/stats_over_http.so'
> > [Dec 18 02:31:03.024] Server {0x2b15a51dc840} NOTE: traffic server running
> > [Dec 18 02:31:03.037] Server {0x2b15a7bad700} NOTE: cache enabled
> > 
> > traffic.out:
> > 
> > NOTE: Traffic Server received Sig 15: Terminated
> > [TrafficManager] ==> Cleaning up and reissuing signal #15
> > [TrafficManager] ==> signal #15
> > [E. Mgmt] log ==> [TrafficManager] using root directory '/'
> > [TrafficServer] using root directory '/'
> > 
> > 
> > manager.log:
> > 
> > [Dec 18 02:30:55.747] Manager {0x7f75ae4497e0} ERROR: [TrafficManager] ==> Cleaning up and reissuing signal #15
> > [Dec 18 02:30:55.747] Manager {0x7f75ae4497e0} ERROR:  (last system error 14: Bad address)
> > [Dec 18 02:30:55.757] Manager {0x7f75ae4497e0} ERROR: [TrafficManager] ==> signal #15
> > [Dec 18 02:30:55.757] Manager {0x7f75ae4497e0} ERROR:  (last system error 14: Bad address)
> > [Dec 18 02:31:00.917] {0x7f770e4d47e0} STATUS: opened /var/log/trafficserver/manager.log
> > [Dec 18 02:31:00.917] {0x7f770e4d47e0} NOTE: updated diags config
> > [Dec 18 02:31:00.920] Manager {0x7f770e4d47e0} NOTE: [ClusterCom::ClusterCom] Node running on OS: 'Linux' Release: '2.6.32-279.el6.x86_64'
> > [Dec 18 02:31:00.922] Manager {0x7f770e4d47e0} NOTE: [LocalManager::listenForProxy] Listening on port: 80
> > [Dec 18 02:31:00.922] Manager {0x7f770e4d47e0} NOTE: [TrafficManager] Setup complete
> > [Dec 18 02:31:01.934] Manager {0x7f770e4d47e0} NOTE: [LocalManager::startProxy] Launching ts process
> > [Dec 18 02:31:01.945] Manager {0x7f770e4d47e0} NOTE: [LocalManager::pollMgmtProcessServer] New process connecting fd '11'
> > [Dec 18 02:31:01.945] Manager {0x7f770e4d47e0} NOTE: [Alarms::signalAlarm] Server Process born
> > 
> > I just re-complied ATS and testing another map rule:
> > 
> > [root@dnsbt01-cc38 trafficserver]# cat remap.config
> > map http://xfinity.net http://xfinity.net @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/xfinity.net.reg
> > 
> > [root@dnsbt01-cc38 trafficserver]# 
> > [root@dnsbt01-cc38 trafficserver]# cat /etc/trafficserver/regexmap/xfinity.net.reg
> > ^/x1platform(.*) https://spectrum.comcast.net/webportal/ @status=301
> > ^/x1(.*) http://xfinity.comcast.net/x1/ @status=301
> > ^/(.*) http://xfinity.comcast.net @status=301
> > 
> > --------
> > Following curl command works fine (I could see output from curl command):
> > 
> > curl -sLIH "Host: xfinity.net" http://68.87.98.100
> > 
> > 2013-12-18 02:37:41 10.25.251.168 301 FIN http://xfinity.net http://xfinity.comcast.net
> > -------- (Note in log, https is for both source and target URL)
> > 
> > Following command does not return anything but I saw following in transaction log:
> > 
> > curl -sLIH "Host: xfinity.net" http://68.87.98.100/x1platform
> > 
> > 2013-12-18 02:39:06 10.25.251.168 301 FIN https://xfinity.net https://spectrum.comcast.net/webportal/
> > 
> > --------
> > 
> > Following command does not return anything from curl but transaction log indicates 301 redirect happened.
> > 
> > curl -sLIH "Host: xfinity.net" http://68.87.98.100/x1
> > 
> > 2013-12-18 02:40:46 10.25.251.168 301 FIN http://xfinity.net http://xfinity.comcast.net/x1/
> > 
> > ----
> > 
> > I am totally confused. Can you see anything wrong?
> > 
> > Thank
> > 
> > Eddie
> > 
> > 
> > On Tuesday, December 17, 2013 9:22 PM, James Peach <jp...@apache.org> wrote:
> > On Dec 17, 2013, at 4:24 PM, Eddie <zt...@yahoo.com> wrote:
> > 
> > > James,
> > > 
> > > Thanks for helping ... ATS 4.0.1 was installed freshly on a different server. I have some "redirect" rules and they are working fine.
> > > I did not do upgrade on the server running ATS 3.2.4.
> > > I checked all logs and ATS and did not find anything suspicious (diags.log, error.log, manager.log, etc).
> > > 
> > > Could you let me know how/where to check more?
> > 
> > If there's a crash, I'd expect to see the string "STACK TRACE" in traffic.out. Otherwise, check manager.log to see whether it is restarting each time you do a HTTP GET.
> > 
> > > 
> > > Thanks
> > > 
> > > Eddie
> > > 
> > > 
> > > On Tuesday, December 17, 2013 5:38 PM, James Peach <jp...@apache.org> wrote:
> > > On Dec 17, 2013, at 12:56 PM, Eddie <zt...@yahoo.com> wrote:
> > > 
> > > > I am trying to upgrade ATS from 3.2.4 to 4.0.1. I copied the records.config and remap.config, plus the map rule files from version 3.2.4 server to version 4.0.1  server.
> > > > So, everything is same except the ATS versions. However, the map rules are no longer working any more. Does anyone have any idea?
> > > > 
> > > > map http://vehix.com http://vehix.com @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/vehix.com.reg
> 
> Wait, isn't this a URL rewrite loop?
> 
> 
> > > > 
> > > > But I am getting no response.
> > > 
> > > Sounds like it is crashing; check your logs and <https://cwiki.apache.org/confluence/display/TS/Upgrading+to+v4.0>
> > > 
> > > 
> > > > 
> > > > curl -svIH "HOST: vehix.xom" http://68.87.98.100
> > > > * About to connect() to 68.87.98.100 port 80 (#0)
> > > > *  Trying 68.87.98.100...
> > > > * connected
> > > > * Connected to 68.87.98.100 (68.87.98.100) port 80 (#0)
> > > >> HEAD / HTTP/1.1
> > > >> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> > > >> Accept: */*
> > > >> HOST: vehix.xom
> > > >>  
> > > > * Empty reply from server
> > > > * Connection #0 to host 68.87.98.100 left intact
> > > > * Closing connection #0
> > > > 
> > > > Does anyone have any clue what I am missing?
> > > > 
> > > > Thanks
> > > > 
> > > > Eddie
> > > 
> > > 
> > > 
> > 
> > 
> 
> 


Re: ATS 4.0.1: map rule does not work?

Posted by Eddie <zt...@yahoo.com>.
I suspected it is a rewrite loop too. But what is the right syntax to do it? This was ported from httpd mod_rewrite.



On Tuesday, December 17, 2013 9:50 PM, James Peach <jp...@apache.org> wrote:
 
On Dec 17, 2013, at 6:43 PM, Eddie <zt...@yahoo.com> wrote:

> James,
> 
> I do not see ATS crashing ... following are the logs after I restarted ATS:
> 
> diags.log:
> 
> [Dec 18 02:31:02.960] {0x2b15a51dc840} STATUS: opened /var/log/trafficserver/diags.log
> [Dec 18 02:31:02.960] {0x2b15a51dc840} NOTE: updated diags config
> [Dec 18 02:31:02.964] Server {0x2b15a51dc840} NOTE: cache clustering disabled
> [Dec 18 02:31:02.977] Server {0x2b15a51dc840} NOTE: ip_allow.config updated, reloading
> [Dec 18 02:31:02.990] Server {0x2b15a51dc840} NOTE: cache clustering disabled
> [Dec 18 02:31:02.991] Server {0x2b15a51dc840} NOTE: logging initialized[15], logging_mode = 3
> [Dec 18 02:31:02.994] Server {0x2b15a51dc840} NOTE: loading plugin '/libexec/trafficserver/stats_over_http.so'
> [Dec 18 02:31:03.024] Server {0x2b15a51dc840} NOTE: traffic server running
> [Dec 18 02:31:03.037] Server {0x2b15a7bad700} NOTE: cache enabled
> 
> traffic.out:
> 
> NOTE: Traffic Server received Sig 15: Terminated
> [TrafficManager] ==> Cleaning up and reissuing signal #15
> [TrafficManager] ==> signal #15
> [E. Mgmt] log ==> [TrafficManager] using root directory '/'
> [TrafficServer] using root directory '/'
> 
> 
> manager.log:
> 
> [Dec 18 02:30:55.747] Manager {0x7f75ae4497e0} ERROR: [TrafficManager] ==> Cleaning up and reissuing signal #15
> [Dec 18 02:30:55.747] Manager {0x7f75ae4497e0} ERROR:  (last system error 14: Bad address)
> [Dec 18 02:30:55.757] Manager {0x7f75ae4497e0} ERROR: [TrafficManager] ==> signal #15
> [Dec 18 02:30:55.757] Manager {0x7f75ae4497e0} ERROR:  (last system error 14: Bad address)
> [Dec 18 02:31:00.917] {0x7f770e4d47e0} STATUS: opened /var/log/trafficserver/manager.log
> [Dec 18 02:31:00.917] {0x7f770e4d47e0} NOTE: updated diags config
> [Dec 18 02:31:00.920] Manager {0x7f770e4d47e0} NOTE: [ClusterCom::ClusterCom] Node running on OS: 'Linux' Release: '2.6.32-279.el6.x86_64'
> [Dec 18 02:31:00.922] Manager {0x7f770e4d47e0} NOTE: [LocalManager::listenForProxy] Listening on port: 80
> [Dec 18 02:31:00.922] Manager {0x7f770e4d47e0} NOTE: [TrafficManager] Setup complete
> [Dec 18 02:31:01.934] Manager {0x7f770e4d47e0} NOTE: [LocalManager::startProxy] Launching ts process
> [Dec 18 02:31:01.945] Manager {0x7f770e4d47e0} NOTE: [LocalManager::pollMgmtProcessServer] New process connecting fd '11'
> [Dec 18 02:31:01.945] Manager {0x7f770e4d47e0} NOTE: [Alarms::signalAlarm] Server Process born
> 
> I just re-complied ATS and testing another map rule:
> 
> [root@dnsbt01-cc38 trafficserver]# cat remap.config
> map http://xfinity.net http://xfinity.net @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/xfinity.net.reg
> 
> [root@dnsbt01-cc38 trafficserver]# 
> [root@dnsbt01-cc38 trafficserver]# cat /etc/trafficserver/regexmap/xfinity.net.reg
> ^/x1platform(.*) https://spectrum.comcast.net/webportal/ @status=301
> ^/x1(.*) http://xfinity.comcast.net/x1/ @status=301
> ^/(.*) http://xfinity.comcast.net @status=301
> 
> --------
> Following curl command works fine (I could see output from curl command):
> 
> curl -sLIH "Host: xfinity.net" http://68.87.98.100
> 
> 2013-12-18 02:37:41 10.25.251.168 301 FIN http://xfinity.net http://xfinity.comcast.net
> -------- (Note in log, https is for both source and target URL)
> 
> Following command does not return anything but I saw following in transaction log:
> 
> curl -sLIH "Host: xfinity.net" http://68.87.98.100/x1platform
> 
> 2013-12-18 02:39:06 10.25.251.168 301 FIN https://xfinity.net https://spectrum.comcast.net/webportal/
> 
> --------
> 
> Following command does not return anything from curl but transaction log indicates 301 redirect happened.
> 
> curl -sLIH "Host: xfinity.net" http://68.87.98.100/x1
> 
> 2013-12-18 02:40:46 10.25.251.168 301 FIN http://xfinity.net http://xfinity.comcast.net/x1/
> 
> ----
> 
> I am totally confused. Can you see anything wrong?
> 
> Thank
> 
> Eddie
> 
> 
> On Tuesday, December 17, 2013 9:22 PM, James Peach <jp...@apache.org> wrote:
> On Dec 17, 2013, at 4:24 PM, Eddie <zt...@yahoo.com> wrote:
> 
> > James,
> > 
> > Thanks for helping ... ATS 4.0.1 was installed freshly on a different server. I have some "redirect" rules and they are working fine.
> > I did not do upgrade on the server running ATS 3.2.4.
> > I checked all logs and ATS and did not find anything suspicious (diags.log, error.log, manager.log, etc).
> > 
> > Could you let me know how/where to check more?
> 
> If there's a crash, I'd expect to see the string "STACK TRACE" in traffic.out. Otherwise, check manager.log to see whether it is restarting each time you do a HTTP GET.
> 
> > 
> > Thanks
> > 
> > Eddie
> > 
> > 
> > On Tuesday, December 17, 2013 5:38 PM, James Peach <jp...@apache.org> wrote:
> > On Dec 17, 2013, at 12:56 PM, Eddie <zt...@yahoo.com> wrote:
> > 
> > > I am trying to upgrade ATS from 3.2.4 to 4.0.1. I copied the records.config and remap.config, plus the map rule files from version 3.2.4 server to version 4.0.1  server.
> > > So, everything is same except the ATS versions. However, the map rules are no longer working any more. Does anyone have any idea?
> > > 
> > > map http://vehix.com http://vehix.com @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/vehix.com.reg

Wait, isn't this a URL rewrite loop?


> > > 
> > > But I am getting no response.
> > 
> > Sounds like it is crashing; check your logs and <https://cwiki.apache.org/confluence/display/TS/Upgrading+to+v4.0>
> > 
> > 
> > > 
> > > curl -svIH "HOST: vehix.xom" http://68.87.98.100
> > > * About to connect() to 68.87.98.100 port 80 (#0)
> > > *  Trying 68.87.98.100...
> > > * connected
> > > * Connected to 68.87.98.100 (68.87.98.100) port 80 (#0)
> > >> HEAD / HTTP/1.1
> > >> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> > >> Accept: */*
> > >> HOST: vehix.xom
> > >>  
> > > * Empty reply from server
> > > * Connection #0 to host 68.87.98.100 left intact
> > > * Closing connection #0
> > > 
> > > Does anyone have any clue what I am missing?
> > > 
> > > Thanks
> > > 
> > > Eddie
> > 
> > 
> > 
> 
>