Forum Discussion

Kent_Perrier_50's avatar
Icon for Nimbostratus rankNimbostratus
Nov 17, 2011

Question on using ProxyPass

Our application developers want to have multiple versions of their application behind the same virtual server. The different versions of the app are in new pools. I am trying to support this using the proxypass v10 iRule. The app version is embedded in the URI like this: /appname4_3 and /appname5_1



My external datagroup for ProxyPass is this:



"/appname4_3" := "/appname4_3 appname_4.3_80",


"/appname5_1" := "/appname5_1 appname_5.1_80"



As I understand it, this should enable requests to version 4.3 of the application be directed to pool appname_4.3_80 and requests to v5.1 to pool appname_5.1_80.



My virtual server is name test_80 and my data group is named ProxyPasstest_80 and the virtual server has ProxyPass listed as its only iRule resource.



I have enabled debugging at level 2 in the ProxyPass and I have a default pool on the virtual server set to appname_4.3_80



Looking at the ltm logs ProxyPass isn't even being called. The traffic is hitting the default pool for the virtual server and there are no log entries generated by ProxyPass.



Can anyone give me a pointer on how to move forward with ProxyPass or is there a better way of doing this?



FYI, this works fine on our v9 LTM (with the v9 ProxyPass), but trying to implement this on our v10 LTMs is the issue.





2 Replies

  • Hi Kent,

    If you have debug set to 2, you should at least see a log entry each time a client establishes a connection to the virtual server from this line:

    if { $static::ProxyPassDebug > 1 } {
    log local0. "[virtual name]: [IP::client_addr]:[TCP::client_port] -> [IP::local_addr]:[TCP::local_port]"

    Do you see this entry? If not, can you confirm that the client is making it to the correct virtual server?

    If that's correct, then do you have any custom syslog-ng configuration which would send the logs remotely instead of to /var/log/ltm?

    Or do you have multiple instances in other rule(s) of the static variable, static::ProxyPassDebug, with one set to 0?

  • I don't get anything in the log for the iRule even firing. This is the only virtual server that has the proxypass irule assigned to it, so I don't think it could be a name space collision in variable names.



    With regards to logging, we have syslog configured to log to a syslog-ng server and locally. If I remove the pool from the virtual server, so that everything should be handled by the iRule, the iRule does kick an error that there isn't a defaultpool.



    But, you know what, this forced me to look at it again, and I was looking at the wrong LTM. I had first put the v9 ProxyPass rule on the LTM I am looking at. In researching why it was not working, I found the v10 version. In my haste to replace the v9 iRule with the v10 iRule, I connected to the wrong LTM with the iRule Editor. I fixed that just now, and everything is working. As usual, the problem is with the person sitting at the keyboard. ;)



    Thanks for the reply!