Forum Discussion
nacejj_65488
Nimbostratus
Oct 19, 2011Header Rewrite & Port Translation Issues (Oracle App Servers)
I am currently load balancing a 10.2.1 LTM to two legacy Oracle applications (Tru64 Alpha Server) The applications need to be accessed on port 8895. Everything in my config is on the same subnet besides our mgt port. I am trying to access the application via http://VS_Domain:8895/oracle/directory.
I know its load balancing correctly because I am able to access http://VS_domain and the apache web server page pops up. I am also able to access each node individually through the network through the F5 and completely access the application (F5 acting as a switch instead of load balancing)http://Node_domain:8895/oracle/directory.
The Oracle App Servers don't seem to answer to IP addresses so I implemented this iRule and the corresponding data strings. http://devcentral.f5.com/wiki/iRules.rewrite_host_header_to_server_name.ashx
ipaddress := http://Node_Domain:8895/Oracle/Directory. I thought this would also solve the port issues because its right there in the new rewritten header pulled from the data string. (40 executions no failures).
Like I said the application is fully functional when just trying to access one of the nodes hostnames but it is using the F5 as a switch instead of load balancing.
PS. The IP address of our virtual server is added to our DNS records, the VS is set to all ports, and the pool is set to all ports.
Let me know if you have any ideas.
- Michael_Yates
Nimbostratus
Hi nacejj, - nacejj_65488
Nimbostratus
I have always had SNAT & port translation enabled. - Michael_Yates
Nimbostratus
Can you post the iRule that you are currently using so that we can take a look at it? - nitass
Employee
just wondering whether it helps if you map Node_Domain to virtual server address in PC hosts file. - nacejj_65488
Nimbostratus
Here's the header rewrite iRule I got from http://devcentral.f5.com/wiki/iRules.rewrite_host_header_to_server_name.ashxwhen HTTP_REQUEST_SEND { set host_debug 1 clientside { if {$host_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: New [HTTP::method] request to [HTTP::host][HTTP::uri]"} set host_header_value [findclass [LB::server addr] ip_to_host_class " "] if {$host_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Looked up [LB::server addr], found: $host_header_value."} if {$host_header_value ne ""}{ HTTP::header replace Host $host_header_value if {$host_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Replaced Host header with $host_header_value."} } } }
- nitass
Employee
nitass I had already added it to the PC host file.is it possible to remove the header rewrite irule and use only PC local hosts file? so, when accessing virtual, url will be http://Node_Domain:8895/oracle/directory. - nacejj_65488
Nimbostratus
I just tried what you suggested and still coming up with the same HTTP 400 bad request error. - nitass
Employee
tcpdump would contain 2 side of connections; one is between client and f5 (client-side) and the other one is between f5 and server (server-side). you may filter syn packet first by using tcp.flags.syn eq 1. then, you may follow tcp stream to check what client sends in client-side connection, does f5 send it to server in server-side, what is respond from server in server-side, etc. - nacejj_65488
Nimbostratus
My tcpdumps have been solid with the port translaiton and IP Scheme. Client to VS - Internal VLAN to Node - Node to Internal VLAN - VS to Client. Source and destination ports are looking good too. 8895 on the Node. - nacejj_65488
Nimbostratus
I removed my iRule and the tcpdump looks the same.
Recent Discussions
Related Content
Â
DevCentral Quicklinks
* 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
Discover DevCentral Connects