You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Ye, Hong" <Ho...@cable.comcast.com> on 2013/12/23 21:01:22 UTC

Re: regex_remap: Multi-Hop Cycle Detected

Hi Leif, James and all,

Just to see if anyone got a chance to look following problem …
==========================================================

Morning … I have problem with one of remap config rule — mapping "^/(.*)". Hope you can share some idea why it is not working:

Map rule:
cat remap.config
map http://vehix.com http://vehix.com @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/vehix.com.reg

Regex remap rules:

cat  /etc/trafficserver/regexmap/vehix.com.reg
^/maintenance(.*) http://www.vehix.com @status=301
^/widgets(.*) http://www.vehix.com @status=301
^/comcast(.*) http://www.vehix.com @status=301
^/media(.*) http://www.vehix.com @status=301
^/(.*) http://www.vehix.com @status=301

Response:
curl -sIH "HOST: vehix.com" http://68.87.98.100
HTTP/1.1 400 Multi-Hop Cycle Detected
Date: Fri, 20 Dec 2013 14:25:03 GMT
Server: ATS/4.0.1
Cache-Control: no-store
Content-Type: text/html
Content-Language: en
Content-Length: 265
Age: 0
Connection: close

Diag log:
[TrafficServer] using root directory '/'
[Dec 20 14:24:56.910] Server {0x7f3f053527e0} DIAG: (regex_remap) plugin is successfully initialized
[Dec 20 14:24:56.910] Server {0x7f3f053527e0} DIAG: (regex_remap) loading regular expression maps from /etc/trafficserver/regexmap/vehix.com.reg
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/maintenance(.*) with substitution=http://www.vehix.com and options `@status=301'
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/widgets(.*) with substitution=http://www.vehix.com and options `@status=301'
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/comcast(.*) with substitution=http://www.vehix.com and options `@status=301'
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/media(.*) with substitution=http://www.vehix.com and options `@status=301'
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/(.*) with substitution=http://www.vehix.com and options `@status=301'

[Dec 20 14:25:03.599] Server {0x7f3f02687700} DIAG: (regex_remap) Target match string is `'


The last log was printed while I ran the "curl" command. Does it look like a bug to you? Isn't "blank" a kind of wildcard matching?

Thanks

Hong


Re: regex_remap: Multi-Hop Cycle Detected

Posted by "Ye, Hong" <Ho...@cable.comcast.com>.
Hi Leif, James and all,

Happy new year! Hope everyone had a great holiday.

Just want to see if anyone had a chance to take a look of this issue. For whatever unknown reason to me, the problem seems no happening any more
with exactly same configuration.

Does anyone can think of anything what could be wrong?

Best regards

Hong Ye
From: <Ye>, "Ye, Hong" <ho...@cable.comcast.com>>
Date: Monday, December 23, 2013 at 3:01 PM
To: Leif Hedstrom <zw...@apache.org>>, James Peach <jp...@apache.org>>
Cc: dev <de...@trafficserver.apache.org>>
Subject: Re: regex_remap: Multi-Hop Cycle Detected

Hi Leif, James and all,

Just to see if anyone got a chance to look following problem …
==========================================================

Morning … I have problem with one of remap config rule — mapping "^/(.*)". Hope you can share some idea why it is not working:

Map rule:
cat remap.config
map http://vehix.com http://vehix.com @plugin=/libexec/trafficserver/regex_remap.so @pparam=/etc/trafficserver/regexmap/vehix.com.reg

Regex remap rules:

cat  /etc/trafficserver/regexmap/vehix.com.reg
^/maintenance(.*) http://www.vehix.com @status=301
^/widgets(.*) http://www.vehix.com @status=301
^/comcast(.*) http://www.vehix.com @status=301
^/media(.*) http://www.vehix.com @status=301
^/(.*) http://www.vehix.com @status=301

Response:
curl -sIH "HOST: vehix.com" http://68.87.98.100
HTTP/1.1 400 Multi-Hop Cycle Detected
Date: Fri, 20 Dec 2013 14:25:03 GMT
Server: ATS/4.0.1
Cache-Control: no-store
Content-Type: text/html
Content-Language: en
Content-Length: 265
Age: 0
Connection: close

Diag log:
[TrafficServer] using root directory '/'
[Dec 20 14:24:56.910] Server {0x7f3f053527e0} DIAG: (regex_remap) plugin is successfully initialized
[Dec 20 14:24:56.910] Server {0x7f3f053527e0} DIAG: (regex_remap) loading regular expression maps from /etc/trafficserver/regexmap/vehix.com.reg
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/maintenance(.*) with substitution=http://www.vehix.com and options `@status=301'
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/widgets(.*) with substitution=http://www.vehix.com and options `@status=301'
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/comcast(.*) with substitution=http://www.vehix.com and options `@status=301'
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/media(.*) with substitution=http://www.vehix.com and options `@status=301'
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) Calling constructor
[Dec 20 14:24:56.911] Server {0x7f3f053527e0} DIAG: (regex_remap) added regex=^/(.*) with substitution=http://www.vehix.com and options `@status=301'

[Dec 20 14:25:03.599] Server {0x7f3f02687700} DIAG: (regex_remap) Target match string is `'


The last log was printed while I ran the "curl" command. Does it look like a bug to you? Isn't "blank" a kind of wildcard matching?

Thanks

Hong