iRule not executing

Upgraded to v11.5.1 with Hotfix-HF2. created first new pool & virtual and assigned a HTTP Redirect iRule :

when HTTP_REQUEST { if { [HTTP::uri] equals “/” } { HTTP::redirect “http://crm.murrob.com:5555/murrayroberts” } }

both pool and VS service port set to 5555

however it does not re-direct and when I look at the iRule statistics I see 0 Executions…

I have many other exact re-direct rules (different service ports & url) and they work.

any suggestions will be appreciated

Is a HTTP profile assigned to the VS?

if you run curl on bigip, is it executed?

curl -I http://virtual_server_ip/

if you run curl on bigip, is it executed?

curl -I http://virtual_server_ip/

Perhaps some additional logging?

when HTTP_REQUEST { 
    log local0. "incoming URI = [HTTP::uri]"
    if { [HTTP::uri] equals "/" } {
        log local0. "catch and redirect for /" 
        HTTP::redirect "http://crm.murrob.com:5555/murrayroberts" 
    } 
}

curl: (7) couldn’t connect to host - however both pool & VS are green

curl: (7) couldn’t connect to host - however both pool & VS are green

sorry i forgot port number. curl -I http://virtual_server_ip:5555/

sorry i forgot port number. curl -I http://virtual_server_ip:5555/

Strange .. it only appends triple 5 and not 5555 HTTP/1.0 302 Found Location: http://crm.murrob.com:555/murrayroberts Server: BigIP Connection: Keep-Alive Content-Length: 0

Strange .. it only appends triple 5 and not 5555 HTTP/1.0 302 Found Location: http://crm.murrob.com:555/murrayroberts Server: BigIP Connection: Keep-Alive Content-Length: 0

Checked all the other rules- all of them only has 3 digit port numbers and not 4 …

Checked all the other rules- all of them only has 3 digit port numbers and not 4 …

Strange .. it only appends triple 5 and not 5555

it seems okay here.

test

[root@ve11a:Active:In Sync] config  curl -I http://172.28.24.10:5555/
HTTP/1.0 302 Found
Location: http://crm.murrob.com:5555/murrayroberts
Server: BigIP
Connection: Keep-Alive
Content-Length: 0

 config

[root@ve11a:Active:In Sync] config  tmsh list ltm rule qux
ltm rule qux {
    when HTTP_REQUEST {
  if { [HTTP::uri] equals "/" } {
    HTTP::redirect "http://crm.murrob.com:5555/murrayroberts"
  }
}
}

Strange .. it only appends triple 5 and not 5555

it seems okay here.

test

[root@ve11a:Active:In Sync] config  curl -I http://172.28.24.10:5555/
HTTP/1.0 302 Found
Location: http://crm.murrob.com:5555/murrayroberts
Server: BigIP
Connection: Keep-Alive
Content-Length: 0

 config

[root@ve11a:Active:In Sync] config  tmsh list ltm rule qux
ltm rule qux {
    when HTTP_REQUEST {
  if { [HTTP::uri] equals "/" } {
    HTTP::redirect "http://crm.murrob.com:5555/murrayroberts"
  }
}
}

okay my mistake - made a typo, both curl and tmsh list outputs shows the four digit port number - however still no redirect

okay my mistake - made a typo, both curl and tmsh list outputs shows the four digit port number - however still no redirect

both curl and tmsh list outputs shows the four digit port number - however still no redirect

if curl shows redirection correctly but it still does not work, you may have to try tcpdump on bigip and/or http analyzer tool on client to see where the wrong is.

HttpFox

https://addons.mozilla.org/en-US/firefox/addon/httpfox/

for tcpdump, you may try this.

tcpdump -nni 0.0:nnnp -s0 -w /var/tmp/output.pcap host x.x.x.x -v
x.x.x.x is client ip

both curl and tmsh list outputs shows the four digit port number - however still no redirect

if curl shows redirection correctly but it still does not work, you may have to try tcpdump on bigip and/or http analyzer tool on client to see where the wrong is.

HttpFox

https://addons.mozilla.org/en-US/firefox/addon/httpfox/

for tcpdump, you may try this.

tcpdump -nni 0.0:nnnp -s0 -w /var/tmp/output.pcap host x.x.x.x -v
x.x.x.x is client ip

did the tcpdump and the source port (me) is a random high port, destination port is 80 - this tells me the iRule does not execute?