Forum Discussion
Load Balence is not happening on pool members with two differnt service ports
Hi Team, Pleas help me and even i tried with many f5 tac support there is no fix.
- The Vip is port 80 and backed services are 15201 and 15203 with 2 servers totally 4 Pool members.
- We have 2 irule one is redirect with additional uri /jde/owhtml and other irule is header replace and compression and if i remove this irule its thowing this below error
- Even i tried editing the JDEPROD irule as below mentioned but its not working as expected.
when HTTP_REQUEST { Disable STREAM processing for request (ingress) traffic STREAM::disable
Remove the Accept-Encoding header to disable server side compression
HTTP::header remove Accept-Encoding
Replace the incoming Host header to match what the server expects
HTTP::header replace Host "jdeprod1.corp.abc.com:15201"
HTTP::header replace Host "jdeprod1.corp.abc.com:15203"
} when HTTP_RESPONSE { if { [HTTP::header exists Location] } { If this is a redirect response, replace with HTTP::header replace Location [string map {"jdeprod1.corp.abc.com:15201" "jdeprod1.corp.abc.com"} [HTTP::header Location]] HTTP::header replace Location [string map {"jdeprod1.corp.abc.com:15203" "jdeprod1.corp.abc.com"} [HTTP::header Location]]
}
Use a STREAM expression to remap all object references in the payload (HTML body) with the external host name
STREAM::expression {@jdeprod1.corp.abc.com:15201@jdeprod1.corp.abc.com@}
STREAM::expression {@jdeprod1.corp.abc.com:15203@jdeprod1.corp.abc.com@}
STREAM::enable
}
error screen shot:1 Connection is going to properly on 15201 is working the second connection when it goes to 15203 its throwing this error.
- Raja_MMay 23, 2018
Nimbostratus
IN My irule i removed the port 15201 and added 15203 as mentioned below.
HTTP::header replace Host "jdeprod1.corp.abc.com:15203"
STREAM::expression {@jdeprod1.corp.abc.com:15203@jdeprod1.corp.abc.com@}
i got the below error.
- youssef1May 23, 2018
Cumulonimbus
You realy need to insert port in Host header?
- Raja_MMay 23, 2018
Nimbostratus
i tried without inserting port number example as mentioned below it dosent work .and application page is not opening
HTTP::header replace Host "jdeprod1.corp.abc.com"
STREAM::expression {@jdeprod1.corp.abc.com@jdeprod1.corp.abc.com@}
- youssef1May 23, 2018
Cumulonimbus
OK, First of you have to validate what's application support regarding host injecting.
Can you do a curl on both port:
use -k only if server use ssl
curl -i -k -H "Host: jdeprod1.corp.abc.com:15203"
curl -i -k -H "Host: jdeprod1.corp.abc.com:15201"
For me the problem is in application side you have to autorize both host:
- jdeprod1.corp.abc.com:15201
- jdeprod1.corp.abc.com:15203
regards
- Raja_MMay 23, 2018
Nimbostratus
Note: we are doing URL redirection in the VIP by adding additional uri.
when HTTP_REQUEST {
if { ([ string length [HTTP::uri] ] <= 1) } {
HTTP::respond 301 Location /jde/owhtml }
}
=============================
Im adding the output of Curl with /jde/owhtml
[admin@panappxnwlbl01-Trust:Active:In Sync]]0;panappxnwlbl01-Trust ~ curl -i -H "Host: jdeprod1.corp.abc.com:15203/jde/owhtml" HTTP/1.1 400 Bad Request Date: Wed, 23 May 2018 09:21:37 GMT Content-Length: 323 Connection: close Content-Type: text/html; charset=iso-8859-1
//DTD HTML 2.0; 400 Bad Request
Bad RequestYour browser sent a request that this server could not understand.
IBM_HTTP_Server at jdeprod1.corp.abc.com:15203/jde/owhtml Port 15203 [admin@panappxnwlbl01-Trust:Active:In Sync]]0;panappxnwlbl01-Trust ~ curl -i http://172.30.50.160:15203/jde/owhtml -H "Host: jdeprod1.corp.abc.com:15203/jde/owhtml" HTTP/1.1 400 Bad Request Date: Wed, 23 May 2018 09:21:51 GMT Content-Length: 323 Connection: close Content-Type: text/html; charset=iso-8859-1//DTD HTML 2.0; 400 Bad Request
Bad RequestYour browser sent a request that this server could not understand.
IBM_HTTP_Server at jdeprod1.corp.abc.com:15201/jde/owhtml Port 15201 [admin@panappxnwlbl01-Trust:Active:In Sync]]0;panappxnwlbl01-Trust ~ curl -i http://172.30.50.160:15201/jde/owhtml -H "Host: jdeprod1.corp.abc.com:15201/jde/owhtml" HTTP/1.1 400 Bad Request Date: Wed, 23 May 2018 13:24:34 GMT Content-Length: 323 Connection: close Content-Type: text/html; charset=iso-8859-1//DTD HTML 2.0; 400 Bad Request
Bad RequestYour browser sent a request that this server could not understand.
IBM_HTTP_Server at jdeprod1.corp.abc.com:15201/jde/owhtml Port 15201 [admin@panappxnwlbl01-Trust:Active:In Sync]]0;panappxnwlbl01-Trust ~ curl -i http://172.30.50.161:15201/jde/owhtml -H "Host: jdeprod1.corp.abc.com:15201/jde/owhtml" HTTP/1.1 400 Bad Request Date: Wed, 23 May 2018 13:24:52 GMT Content-Length: 323 Connection: close Content-Type: text/html; charset=iso-8859-1//DTD HTML 2.0; 400 Bad Request
Bad RequestYour browser sent a request that this server could not understand.
IBM_HTTP_Server at jdeprod1.corp.abc.com:15203/jde/owhtml Port 15203 [admin@panappxnwlbl01-Trust:Active:In Sync]]0;panappxnwlbl01-Trust ~ - youssef1May 25, 2018
Cumulonimbus
Hi,
I lost a little of the thread of the discussion. can you tell me exactly what the persistent problems are and how I can help you.
- Raja_MMay 25, 2018
Nimbostratus
We have already cookie persistence enabled on the VIP, We tried opening multiple session with different user logins, the traffic is going to only on service ports:15201 but not 15203. But as per connection table and tcpdump says connections going to port 15203 also when i check in the oracle JDA application console its showing user session on only 15201 port.
We tried doing doing Header replacement with only 15203 that time traffic is going to 15203 on the Application server but in header replacement if we keep 15201 traffic is not going to 15203 on application server.
Existing Irule: tm rule jdeprod1_irule { when HTTP_REQUEST { Disable STREAM processing for request (ingress) traffic STREAM::disable
Remove the Accept-Encoding header to disable server side compressionHTTP::header remove Accept-Encoding
Replace the incoming Host header to match what the server expectsHTTP::header replace Host "jdeprod1.corp.abc.com:15201"
} when HTTP_RESPONSE { if { [HTTP::header exists Location] } { If this is a redirect response, replace with HTTP::header replace Location [string map {"jdeprod1.corp.abc.com:15201" "jdeprod1.corp.abc.com"} [HTTP::header Location]]
}
Use a STREAM expression to remap all object references in the payload (HTML body) with the external host nameSTREAM::expression {@jdeprod1.corp.abc.com:15201@jdeprod1.corp.abc.com@} STREAM::enable
} when LB_SELECTED { log local0. "URI [HTTP::uri] Client [IP::client_addr] [LB::server] selected." } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com