Redirect http requests to different servers based on URL
You can use a reverse proxy to do this, but if you have a single IIS box in a DMZ you can also use IIS ARR (Application Routing Request) to do this for you.
https://knowledge.safe.com/articles/How_To/Using-IIS-and-ARR-as-a-reverse-proxy
You may find better articles if you look, but it is easy enough to do.
Hi,
We have an internet connection (with a single IP address) where I need to share access to different internal servers based on the requested URL.
I.e.:
http://url1.domain.com -> webserver1
http://url2.domain.com -> webserver2
etc.
It's http traffic only (no https).
How do I accomplish this? I assume some kind of proxy server-thing that all requests go to? It should be on the Windows platform as we don't want to introduce a Linux "black-box" that noone knows anything about in a production environment.
Thanks for any ideas and/or suggestions :)
This topic first appeared in the Spiceworks Community
Similar Messages
-
Problem with multiple requests to different servers using HTTPService
Hi
I'm aware that we are limited to two concurrent connections to a single host, so I'm looking into using either subdomains pointing to the same server, or separate physical servers to process multiple requests side-by-side.
However, whichever way I try to send three requests, looking at the Network Monitor the 3rd request always waits until one of the first two has finished. In the screenshot below, all three requests were sent at the same time to three separate physical servers, yet the top request didn't start until the bottom request finished, at 15:33:28
Any ideas how to get round this? I'm using SSL, but I've also tested it on HTTP with the same results. I'm writing an AIR app, and posted this on the AIR forum but was told it was a Flex issue and I should post it here.
Please let me know if any more information is needed
Many thanks
JamesWould that still apply even though I'm not running this inside a browser, but in AIR?
I've seen this method recommended by other people, and also the following page seems to suggest that what I'm doing should work
http://www.chadupton.com/blog/2008/08/maximum-concurrent-http-requests-from-adobe-air/
Kind regards
James -
Redirect user to a different Page based on number of Liquid output result
I want to redirect the user to a different page based on the number of results. I have some multi-account users and single account user in my secure zone. I want single account users to be sent to a different page, while multiple account user should be shown their accounts and they user can now click the account he/she wants to access. This is my code:
{module_data resource="customers" fields="company, email1" where="\{'company':\{'$contains':'{{this.globals.user.email}}'\}\}" skip="0" limit="500" version="v3" collection="companyXtra" template=""}
{module_webapps id="21927" filter="all" collection="companyAccess" template=""}
{% for item in companyAccess.items -%}
{% assign counter = {{forloop.length}} -%}
{% if globals.user.email = item.email and counter = 1 -%}
<script>
window.location.replace("/single-account-user.html");
</script>
<a class="w-inline-block szone-navlinks multiplecoy" href="{{item.url}}">
<div class="szone-holder">
<div class="szone-narrate addenrolee">{{item.name}}</div>
</div>
</a>
{% else %}
<p><a href="{{item.url}}">{{item.name}}</a></p>
{% endif %}
{% endfor %}
</div>
Please what I'm doing wrongly. Can someone kindly assist. Thanks.Hi Liam I have since been reviewing my query using the BC API Discovery which has been a good guide for me. But the result is just displaying the core customer's company, though the other company has a default email/email1 as the core customer.
This is my new query:
{module_data resource="customers" version="v3" fields="company" skip="0" limit="10" where="\{'email1.value':\{'$contains':'{{globals.user.email}}'\}\}" order="id" collection="myData"}
<pre>{{myData|json}}</pre>
This is the json:
"moduleName": "data",
"moduleDescriptor": {
"templatePath": null,
"parameters": "resource=\"customers\",version=\"v3\",fields=\"company\",skip=\"0\",limit=\"10\",where=\ "\\{'email1.value':\\{'$contains':'[email protected]'\\}\\}\",order=\"id\",collection=\"myData\"",
"apiEndpoint": "/api/v3/data",
"objectType": "-1",
"objectId": "-1",
"adminUrl": ""
"items": [
"company": "The vivove company Limited"
"totalItemsCount": 1,
"skip": 0,
"limit": 10,
"params": {
"resource": "customers",
"version": "v3",
"fields": "company",
"skip": "0",
"limit": "10",
"where": "\{'email1.value':\{'$contains':'[email protected]'\}\}",
"order": "id",
"collection": "myData"
I expected to see two companies. This is screenshot of my the companies in the CRM:
Screenshot by Lightshot
Screenshot by Lightshot
Thanks. most appreciated. -
How do you redirect HTTP requests to HTTPS?
Update to my question:
My original question didn't include all of the complexity of what I'm trying to do.
I have a virtual server with two listening ports, 80 and 443. I have a certificate installed for port 443 and that works fine when I specifically type in https://myserver
I also have a reverse proxy setup for a URI- /myapp -> remoteserver.
I'd like to configure my webserver to do a redirect from /myapp to the URL https:/myserver/myapp
and then have the reverse proxy kick and send me over to my remote server.
Everything works fine if I browse to https://myserver/myapp. I just want for requests from http://myserver/myapp to be turned into https://myserver/myapp before the reverse proxy takes effect.
Any ideas?
Thanks-
Edited by: bisbell on Sep 13, 2010 12:16 PMIt would go into whichever obj.conf file is specified for this virtual server (probably <server>-obj.conf, but double-check your server.xml to be certain).
I tend to process redirects early in the obj.conf. I usually try to have them processed before the other NameTrans statements. Here's how I've done it with other kinds of conditionals:
<Object name=default>
<If $urlhost = "www.foo.baz.com">
NameTrans fn="redirect" from="/" url-prefix="http://foo.baz.com/"
</If>In my case someone had created published a link to my server with a FQDN that was incorrect. Since they had done it in printed material a fix for them was not trivial. To address the problem I created a DNS entry that matched their typo, and created the redirect here to bounce from the bad FQDN to the proper FQDN. You're doing basically the same thing, except you want to redirect accesses to a particular URI that are not SSL enable to the same URL with SSL.
Please note that I haven't checked any of the syntax I gave you in the prior post. I already see one typo (~= should be =~). The variables being evaluated should be checked for correctness too (e.g. security!="true" might in fact be something like "not defined $security").
Check the docs. :) -
How to Implement HTTP Request Status Code Processing
I actually have two questions. First, I wondering how to add multiple status code processing to an http request. Secondly, I was wondering how to go about using alternate http requests to different servers in case the primary server is down. What kind of parameter would the program use to determine that the server is unavailable and switch to another server??
Currently, the program I've written calls an rdf server (http://www.rdfabout.com/sparql) using a sparql query,
the server returns an xml string, the program parses it, and calculates numbers
from the string. The program works, but the problem is that the server is down occasionally.
When the server is down, we need to add calls to another server to
increase reliability. So, the next task is to call this server:
http://www.melissadata.com/lookups/ZipDemo2000.asp
I need to do exactly the same things I did with the rdf server. The
difference will be constructing a request and a bit different parsing of
the response.
current SPARQL query is defined as follows:
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX census: <http://www.rdfabout.com/rdf/schema/census/>
PREFIX census1: <tag:govshare.info,2005:rdf/census/details/100pct/>
DESCRIBE ?table WHERE {
<http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90292> census:details
?details .
?details census1:totalPopulation ?table .
?table dc:title "SEX BY AGE (P012001)" .
}current HTTP Request is defined as follows:
import java.net.*;
import java.net.URL;
import java.net.URLConnection;
import java.io.*;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.StringReader;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.Arrays;
public class MyConnection
static Scanner sc = new Scanner(System.in);//allows user to input zipcode
public static void main(String[] args) throws Exception
int zip;//zipcode is declared as integer format
//User defines zip through input
//proceed to put SPARQL query into string, which is then used to call the server
String requestPart1 =
"query=PREFIX+dc%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+%0D%0APREFIX+census%3A+%3Chttp%3A%2F%2Fwww.rdfabout.com%2Frdf%2Fschema%2Fcensus%2F%3E+%0D%0APREFIX+census1%3A+%3Ctag%3Agovshare.info%2C2005%3Ardf%2Fcensus%2Fdetails%2F100pct%2F%3E+%0D%0A%0D%0ADESCRIBE+%3Ftable+WHERE+%7B+%0D%0A+%3Chttp%3A%2F%2Fwww.rdfabout.com%2Frdf%2Fusgov%2Fgeo%2Fcensus%2Fzcta%2F";
String requestPart2 = "" + zip; // zipcode is transformed from int to string format and plugged into SPARQL query here
String requestPart3 =
"%3E+census%3Adetails+%3Fdetails+.+%0D%0A+%3Fdetails+census1%3AtotalPopulation+%3Ftable+.+%0D%0A+%3Ftable+dc%3Atitle+%22SEX+BY+AGE+%28P012001%29%22+.+%0D%0A%7D%0D%0A&outputMimeType=text%2Fxml";
String response = "";
URL url = new URL("http://www.rdfabout.com/sparql");//designates server to connect to
URLConnection conn = url.openConnection();//opens connection to server
// Set connection parameters.
conn.setDoInput (true);
conn.setDoOutput (true);
conn.setUseCaches (false);
// Make server believe we are form data
conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
DataOutputStream out = new DataOutputStream (conn.getOutputStream ());
// Write out the bytes of the content string to the stream.
out.writeBytes(requestPart1 + requestPart2 + requestPart3);
out.flush ();
out.close ();
// Read response from the input stream.
BufferedReader in = new BufferedReader (new InputStreamReader(conn.getInputStream ()));
String temp;
while ((temp = in.readLine()) != null)
response += temp + "\n";
temp = null;
in.close ();
//parsing stuff is taken care of after here
}What remains now is to:
1) add status code processing: notify if the server is not available, ect.
2) add ability to connect to additional server if primary server is down.
I'm thinking an if/else statement, which I've tried a few different ways,
but I don't quite know how to implement that...Also trying to add the
status code processing/error handling, but I'm not sure how to do that
for multiple/different errors, such as 404, 503, 504, ect.. try/catch statements?
So yeah, just been scratching my head on this trying to figure out how to work it..
If you can help me out on this, I've been going nuts trying to figure this out...I think your issue comes form the fact that you are not casting URLConnection to HttpURLConnection.
Doing the cast would allow you to use getResponseCode() - among other methods - and test for a response different than 200.
Read: [http://mindprod.com/jgloss/urlconnection.html|http://mindprod.com/jgloss/urlconnection.html] -
Content Switch sending request to both servers
Hi,
I have following configuration on the content switch and it send the request to both the servers. due to two tcp stream from going via two different server it second request fails and generate false alerts.
It was working fine but since last week it is giving lot of false alerts.
content StatePMVQLMVMS_8PR3
vip address X.X.X.X
add service W8PRAKLQLM01_StateVMS_8HTTP3
add service W8PRAKLQLM02_StateVMS_8HTTP3
advanced-balance sticky-srcip
port XXXX
protocol tcp
active
Please let me know what should I check to get this fixed. I hardly work with content switch.
Is there a way I can set up to send all the request to primary server and when it dies then and only then it send a request to secondary and when primary comes back online it restore back to primary ????
I am fine if it does not load balance .. but at least it stop sending false alerts..
Thanks.Hi Nilay,
You have configured sticky based on src-ip which means that as long as src IP remains same the user would be sent to the same server.
Now a situation where CSS starts sending the request to different servers could be due to the fact that sticky table was full. In that situation a new connection from same user will be load balanced according to the LB method. If the sticky table is full and none of the sticky entries has expired, the CSS rejects the new sticky request.
You can use sticky-inact-timeout to ensure that sticky entries flush out after they have been inactive for some amount of time.
Please visit the below link for more details about it.
http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/css11500series/v8.20/configuration/content_lb/guide/cntntgd.pdf
Regards,
Kanwal -
Flex IO error# 2032 when using IE7 for parallel https calls across two servers
Hi,
Weeks back I faced a wierd issue in the behaviour of flashplayer running on IE7 which is invoking parallel https calls. I have two SSL enabled servers one is listening on port 443 and the other is listening on port 8443 but both running in the same domain. I developed a flex client (using httpservice class) which sends parallel https requests to these two servers. When the number of parallel requests increases say more than 5 requests to each server, the fault handler was encountered with the error message:
[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: https://servlet"]. URL: https://servlet"]
I used some http tracer tools to check if the request jumps out of the browser but that didnt happen. I am 100% sure that I am using the correct url. I was totally helpless . This worked without any issues in IE8 or Chrome or Firefox. This made me think about increasing the number of concurrent connections for IE7 by modifying the windows registry. But still no difference in the behaviour.
After breaking my head for a long days, I got one solution which would work. This issue is happening only if we are sending https requests to different ports in the same domain. So rather than moving one among the two servers to a new domain, I got a new DNS name for the same destination. So presently I got two DNS names pointing to the same machine in which both the servers are mounted.
After this it really worked cool!!! Now that I am using a separate DNS name for the server listening on port 8443 and the old DNS name is used to hit the server listening on 443. And I am happy that its working fine without any issues .
But can anyone tell me if this is really an IE7 issue or do we have anyother solution to fix this.
Please share ur thoughts..Hi,
I am building a mobile employee directory and for that I am using Flash Builder 4.6/AIR 3.1.0. I am using RESTful web service to get XML results and to display on my mobile application. I am getting the same below error when accessing the webservice from mobile app (Android - Galaxy Tab 7 inch).
Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error # 2032"] URL: http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co">http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlabhttp://adfdevp.alshaya.com:7013/RESTEmployeeDetails-http://adfdevp.als haya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlabEmployeeDetails-context-root/jersey/restlab
The same code is working in Flash Builder 4.6. I have checked Network Monitor to "Disabled" before deploying to mobile. What am i doing wrong here? I am pasting my code below-
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" xmlns:dao="dao.*"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.collections.IList;
import mx.collections.XMLListCollection;
import mx.events.FlexEvent;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.xml.SimpleXMLDecoder;
import mx.utils.ArrayUtil;
import valueObjects.EmployeeDetail;
[Bindable]
private var myXml:XML;
[Bindable]
public var resultCollection:IList;
public function handleXml(event:ResultEvent):void
var xmlListCollection:XMLListCollection = new XMLListCollection(event.result.children());
var xmlListCollectionValues:XMLListCollection = new XMLListCollection(event.result.emp.children());
var resultArray:Array = xmlListCollection.toArray();
var resultArrayValues:Array = xmlListCollectionValues.toArray();
var objEmployeeDetails:EmployeeDetail;
var resultCollection:ArrayCollection = new ArrayCollection();
var j:int = 0;
for(var i:int=0;i<resultArray.length;i++){
objEmployeeDetails = new EmployeeDetail();
objEmployeeDetails.brand = resultArrayValues[j];
objEmployeeDetails.division = resultArrayValues[j+1];
objEmployeeDetails.email = resultArrayValues[j+2];
objEmployeeDetails.employee_name = resultArrayValues[j+3];
objEmployeeDetails.employee_number = resultArrayValues[j+4];
objEmployeeDetails.grade = resultArrayValues[j+5];
objEmployeeDetails.mobile = resultArrayValues[j+6];
objEmployeeDetails.position = resultArrayValues[j+7];
j = j + 8;
resultCollection.addItem(objEmployeeDetails);
list.dataProvider = resultCollection;
//return resultCollection;
public function handleFault(event:FaultEvent):void
//Alert.show(event.fault.faultDetail, "Error");
protected function sesrchEmployee():void
xmlRpc.send();
]]>
</fx:Script>
<fx:Declarations>
<dao:EmployeeDAO id="srv"/>
<mx:HTTPService id="xmlRpc"
url="http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlab"
result="handleXml(event)"
fault="handleFault(event)"
resultFormat="e4x" showBusyCursor="true">
<mx:request xmlns="">
<data>{key.text}</data>
<data>{key1.text}</data>
</mx:request>
</mx:HTTPService>
</fx:Declarations>
<s:navigationContent/>
<s:titleContent>
<s:VGroup width="100%">
<s:HGroup width="100%">
<s:Label top="40" paddingTop="10" paddingRight="13" height="29" text="Employee Name:"/>
<s:TextInput id="key" width="559"/>
</s:HGroup>
<s:HGroup width="100%">
<s:Label height="30" paddingTop="10" text="Employee Number:"/>
<s:TextInput id="key1" width="100%"/>
</s:HGroup>
</s:VGroup>
</s:titleContent>
<s:actionContent>
<s:Button icon="@Embed('assets/search.png')" click="sesrchEmployee()"/>
</s:actionContent>
<s:List id="list" top="0" bottom="0" left="0" right="0"
change="navigator.pushView(EmployeeDetails, list.selectedItem)">
<s:itemRenderer>
<fx:Component>
<s:IconItemRenderer label="{data.employee_name}"
messageField="position">
</s:IconItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:List>
</s:View>
Please help me to resolve this issue as soon as possible. Appreciate your quick response in this regard.
Thanks,
Murtaza Ghodawala
Mobile: +965 97180549
[email protected] -
Credit memo request with different Pricing procedure
Hi all,
I am Creating Credit memo with reference to contract, my requirement is system should not copy Contract pricing procedure for Credit Memo we have different Pricing procedure for credit memo
But the Problem is while i am creating a credit Memo with reference to Contract system will coping contract pricing procedure i need Credit Memo pricing Procedure in credit memo and system should populate all credit memo condition types default y in credit memo
i am using credit memo condition types condition class A - Discount or surcharge and Calculat.type - B - Fixed amount
can any one guide me how config in sap while creating credit memo with reference to sales contract system should copy different Pricing procedure its having own condition types
Thanks
RajeshTo call a separate Pricing Procedure for Credit Memo Request, ensure that Document Pricing Procedure for Contract and Credit Memo Request are different. Based on Different Document Pricing Procedure, it is possible to configure to determine separate pricing procedure.
+In SD, Pricing Procedure is determined (T.Code: OVKK) based on Sales Area (Sales Organization + Distribution Centre + Division) + Customer Pricing Procedure + Document Pricing Procedure. Sales Area is determined in Sales Order Header Level. Customer Pricing Procedure is determined from Customer Master. Document Pricing Procedure is determined from Sales Document Type / Billing Type (if configured).+
Through copy control detting, maintain Pricing Type as 'B' for carrying out new price.
Regards,
Rajesh Banka -
When trying to EMAIL from BEX Broadcaster get a 400 bad HTTP request
When we try to run an email from BEX broadcaster, we get the message below. We looked in the ICM and it says the request is too large, but when when I copy the request and paste it into the browser it works, any ideals?
400 Bad HTTP request
Bad HTTP request
Error: -21
Version: 7000
Component: HTTP_FILTER
Date/Time: Mon Apr 05 17:54:18 2010
Module: http_auth.c
Line: 494
Server: biprd_BIP_11
Error Tag:
Detail: illegal requestHi David,
Not exactly sure what the issue is here, but would like to give you some pointers that might help anyway. The error message you see in the ICM would be where I would start. You need to remember that the HTTP request is more than just the URL that you paste into the browser, the URL is one part of it, but there are a heap of other things that go into making the full HTTP request (e.g. POST data, header values etc...)
I would also refer you to this forum post: Re: 400 Bad HTTP request that references SAP Note 864878
Hope this helps,
Simon -
Logout from AM session through Proramatically ( using an http request)
Hi Everyone,
I want to logout from the AccessManager via Programatically through an http request? Is there any such url by invoking an HTTP post request we can logout from the Access Manager session?
Thanks,
Ranjith.Hi,
You can do a post to /amserver/UI/Logout ar you ca programatically destroy the session using something like:
SSOTokenManager manager = SSOTokenManager.getInstance();
SSOToken token = manager.createSSOToken(cookieValue.trim());
manager.destroyToken(token);
Andrei -
ACE 4710 Redirect to Different Server Farm based on URL
I have a weblogic 11 serverfarm where i want to redirect to a different serverfarm based on the URL. I am able to do it and it appears to be working however I am having issues with the cookies. I seem to be getting logged out of our App when switching between the serverfarms. Is there any way to fix this issue? My configuration is below.
Thanks!
-Andy
Generating configuration....
crypto chaingroup WWW-PROD-CHAINGROUP
cert AddTrustExternalCARoot.crt
cert COMODOHigh-AssuranceSecureServerCA.crt
access-list allow line 8 extended permit ip any any
probe http HTTP_PROBE
port 7001
interval 10
passdetect interval 5
request method get url /login.jsp
expect status 200 299
connection term forced
probe icmp PROBE_SERVICE_ICMP
interval 5
passdetect interval 5
receive 5
probe tcp TCP7001_PROBE
port 7005
interval 5
passdetect interval 5
receive 3
connection term forced
open 2
rserver redirect REDIRECT-TO-HTTPS
webhost-redirection https://%h%p 301
inservice
rserver host WLS11Host1
ip address 192.168.211.250
inservice
rserver host WLS11Host2
ip address 192.168.211.14
inservice
serverfarm redirect REDIRECT-SERVERFARM
rserver REDIRECT-TO-HTTPS
inservice
serverfarm host SPEND-FARM
probe HTTP_PROBE
rserver WLS11Host1 7001
inservice
serverfarm host WLS11FARM
probe HTTP_PROBE
rserver WLS11Host2 7001
inservice
parameter-map type http HTTP-PARM
persistence-rebalance
set secondary-cookie-start none
parameter-map type http PARSE
persistence-rebalance
set header-maxparse-length 8192
length-exceed continue
parameter-map type ssl SSL_MAP
cipher RSA_WITH_RC4_128_MD5
cipher RSA_WITH_RC4_128_SHA
cipher RSA_WITH_3DES_EDE_CBC_SHA
cipher RSA_WITH_AES_128_CBC_SHA
cipher RSA_WITH_AES_256_CBC_SHA
sticky http-cookie ACE_COOKIE-7001 7001_STICKY
cookie insert browser-expire
serverfarm WLS11FARM
replicate sticky
sticky http-cookie ACE-COOKIE-SPEND SPEND_STICKY
cookie insert browser-expire
serverfarm SPEND-FARM
replicate sticky
ssl-proxy service WWW-PROD-SSLPROXY
key client_ssl.pem
cert pastar.crt
chaingroup WWW-PROD-CHAINGROUP
ssl advanced-options SSL_MAP
class-map type http loadbalance match-any HTTP-MARKETING
2 match http url /index.html
class-map type http loadbalance match-any HTTPS-SPEND
2 match http url /spend/.*
class-map type http loadbalance match-any L5
2 match http url /.*
class-map match-all WLS-7001-CLASS
2 match virtual-address 192.168.215.28 tcp eq www
class-map match-all WLS11-HTTPS-CLASS
2 match virtual-address 192.168.215.28 tcp eq https
policy-map type loadbalance first-match HTTPS
class HTTPS-SPEND
sticky-serverfarm SPEND_STICKY
insert-http x-forward header-value "%is"
class L5
sticky-serverfarm 7001_STICKY
insert-http x-forward header-value "%is"
policy-map type loadbalance first-match WLS11-7001-Policy
class HTTP-MARKETING
sticky-serverfarm 7001_STICKY
insert-http x-forward header-value "%is"
class HTTPS-SPEND
serverfarm REDIRECT-SERVERFARM
class L5
serverfarm REDIRECT-SERVERFARM
policy-map multi-match WLS11-SLB
class WLS-7001-CLASS
loadbalance vip inservice
loadbalance policy WLS11-7001-Policy
loadbalance vip icmp-reply active
nat dynamic 1 vlan 1000
appl-parameter http advanced-options HTTP-PARM
class WLS11-HTTPS-CLASS
loadbalance vip inservice
loadbalance policy HTTPS
loadbalance vip icmp-reply active
nat dynamic 1 vlan 1000
appl-parameter http advanced-options PARSE
ssl-proxy server WWW-PROD-SSLPROXY
interface vlan 1000
ip address 192.168.215.27 255.255.255.0
access-group input allow
nat-pool 1 192.168.215.28 192.168.215.28 netmask 255.255.255.255 pat
service-policy input WLS11-SLB
no shutdown
ip route 0.0.0.0 0.0.0.0 192.168.215.1
snmp-server community poweradvocaterw group Network-MonitorHi,
So when you come with " http url /index.html", you go to "sticky-serverfarm 7001_STICKY" and ACE must be inserting sticky "ACE_COOKIE-7001". Now when you get redirected because you match "HTTPS-Spend", ACE will loadbalance the request which will now come on HTTPS and insert sticky " ACE-COOKIE-SPEND". That's why i guess you see two sticky entries. Now i guess ACE will keep the connection to servers in "sticky-serverfarm SPEND_STICKY" or you see that ACE is not doing the same or you expected the ACE to send the requested to "sticky-serverfarm 7001_STICKY" even though it matches the HTTPS-Spend class-map condition?
Regards,
Kanwal -
Can CSS route based on cookie info in HTTP request
Hi
I am new to CSS and am interested as it might be able to provide a solution to a problem I have seen.
We currently have 3 Windows Servers running an ASP-based web application with a clustered SQL Server backend. The front end uses windows load balancing to distribute the load. All 3 servers are configured the same and there is only one application.
The problem lies with the way an the application maintains session state. I am told it uses a non-persistant cookie on the client which corresponds to a session object on the server. This is opposed to maintaining state in central location such as the database. Obviously this means the client needs to be stuck to a particular server for that session. This is currently achieved by setting the Windows NLB to single affinity which places traffic from a particular IP address to the same server. This does work but the clients source IP is changed by a downstream firewall to a NAT overload address meaning all clients appear with the same IP address (different port) and hence always end up on just one server.
The obvious next step in my mind would be to change the way NAT is done but this is not possible. The next obvious idea would be to change the application so that it maintains state in the database so the affinity of the Windows NLB could be disabled meaning requests would be dealt with using the source IP and port and hence distributed evenly. I am told this cannot be done either :) Joy!
So I have begain to look at other possible solutions. Apologies for my very limited knowledge on the CSS as I am trying to get my head around how it can be configured. I am thinking that it may be able to help me if I used it instead of Windows NLB. I am interested in the way you can use Layer 5 stickiness. Would it be able to examine the cookie in the HTTP request and route the traffic to the correct server?
I am aware that this will not alleviate the failover issue. If one of the servers were to fall over then the client would have to login again, however I am under the impression that this is acceptable behaviour. The main driver here is to provide load balancing to improve application performance by using all resources opposed to just one.
Many many thanks to anyone who can give me advise on this.Hi Gilles
Thanks for the info. Sounds like we are on the right path. Unfortunately I am unable to get much information from the developers. Long story. I did logon to the system whilst doing a network trace. The following is what I found in the HTTP header:
Hypertext Transfer Protocol
GET /XXXXX/Includes/style.asp HTTP/1.1\r\n
Accept: */*\r\n
Referer:
http://xxx.xxxxx.xxx/xxxxx/login.asp\r\n
Accept-Language: en-gb\r\n
Accept-Encoding: gzip, deflate\r\n
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)\r\n
Host: xxxx.xxxxx.xxxxx\r\n
Connection: Keep-Alive\r\n
Cookie: ASPSESSIONIDQCBCDSCR=AEHBCJEDDGMMCCBHBICLELGD\r\n
\r\n
Why do you configure 2 services? How would I go about this given the cookie in the HTTP request?
Many thanks
Gary -
10g: HTTP Server and OC4J on different servers?
Can anyone assist with configuring HTTP Server and OC4J on different servers?
I installed AS 10g on both; our application runs fine on one server, with the HTTP Server and OC4J both on the same box.
I need to also test this with the HTTP Server on a separate box.
I added this to mod_ocj4.conf:
Oc4jMount /indox-qa1
instance://cvodev2:oas_dev2.cvodev2.int.sys.com:indox-qa1
Oc4jMount /indox-qa1/*
instance://cvodev2:oas_dev2.cvodev2.int.sys.com:indox-qa1
But when I try to access something like http://cvodev4/indox-qa1 I get this in the logs:
[Wed Jul 06 16:54:10 2005] [warn] [client 10.1.1.231] [ecid: 1120683250:192.152.136.127:1248:1544:1,0] MOD_OC4J_0184: Failed to find an oc4j process for destination: instance://cvodev2.int.camsys.com:oas_dev2.cvodev2.int.camsys.com:indor-qa1
[Wed Jul 06 16:54:10 2005] [error] [client 10.1.1.231] [ecid: 1120683250:192.152.136.127:1248:1544:1,0] MOD_OC4J_0145: There is no oc4j process (for destination: instance://cvodev2.int.camsys.com:oas_dev2.cvodev2.int.camsys.com:indor-qa1) available to service request.
[Wed Jul 06 16:54:10 2005] [error] [client 10.1.1.231] [ecid: 1120683250:192.152.136.127:1248:1544:1,0] MOD_OC4J_0119: Failed to get an oc4j process for destination: instance://cvodev2.int.camsys.com:oas_dev2.cvodev2.int.camsys.com:indor-qa1
[Wed Jul 06 16:54:10 2005] [error] [client 10.1.1.231] [ecid: 1120683250:192.152.136.127:1248:1544:1,0] MOD_OC4J_0013: Failed to call destination: instance://cvodev2.int.camsys.com:oas_dev2.cvodev2.int.camsys.com:indor-qa1's service() to service the request.
I did some ethernet sniffing and it doesn't look to me like the OHS box is even trying to contact the OC4J box.
Is there more configuration I need to do beyond this?
Thanks,
dwhhi user11159690
Maybe this can help:
"Oracle® HTTP Server Administrator's Guide 10g Release 3 (10.1.3) B25211-02"
"7.32 mod_oc4j"
http://download.oracle.com/docs/cd/B25221_04/web.1013/b25211/confmods.htm#i1025739
Maybe more specifically "Oc4jMount":
http://download.oracle.com/docs/cd/B25221_04/web.1013/b25211/confmods.htm#CIHJBGFB
(tip : You can use "Your Control Panel" to make your name visible in forum posts.)
success
Jan Vervecken -
Redirect to different pages based on user input value
Hello,
Anyone please help.
I am trying to redirect to different pages based on user inputs. I have a form in which I have one text item and a submit button. For example consider text item to be empno; So once the user enters a empno and hits submit button; I need to redirect to different pages based on this job.
For Ex: if user inputs empno whose job is 'ANALYST' then redirect to page 1
if user inputs empno whose job is 'MANAGER' then redirect to page 10
For this scenario. i wrote a pl/sql process for the submit button; but no luck -- its not at all redirecting instead its in the same page. Below is the process.
declare
v_job varchar2(20);
begin
select job into v_job from emp where empno = :P9_EMPNO_R;
if v_job = 'ANALYST' then
OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:1:&SESSION.::&DEBUG.::', TRUE);
end if;
if v_job = 'MANAGER' then
OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:10:&SESSION.::&DEBUG.::', TRUE);
end if;
end;Please help. I am using Oracle APEX version 4.2 and database Oracle 11g R2
Thanks,
Ortonorton607 wrote:
Hello,
Anyone please help.
I am trying to redirect to different pages based on user inputs. I have a form in which I have one text item and a submit button. For example consider text item to be empno; So once the user enters a empno and hits submit button; I need to redirect to different pages based on this job.
For Ex: if user inputs empno whose job is 'ANALYST' then redirect to page 1
if user inputs empno whose job is 'MANAGER' then redirect to page 10
For this scenario. i wrote a pl/sql process for the submit button; but no luck -- its not at all redirecting instead its in the same page. Below is the process.
declare
v_job varchar2(20);
begin
select job into v_job from emp where empno = :P9_EMPNO_R;
if v_job = 'ANALYST' then
OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:1:&SESSION.::&DEBUG.::', TRUE);
end if;
if v_job = 'MANAGER' then
OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:10:&SESSION.::&DEBUG.::', TRUE);
end if;
end;Please help. I am using Oracle APEX version 4.2 and database Oracle 11g R2
Thanks,
OrtonI have a similar scenario in my application and this is how I handle it.
1. Create a page item on the page, say Px_PAGE_NUM
2. Create a "On Submit - After Computations and Validations" page process to set the above page item. In your case, you can use the same logic that you have already in place (except the call to OWA_UTIL.REDIRECT_URL) :
declare
v_job varchar2(20);
begin
select job into v_job from emp where empno = :P9_EMPNO_R;
if v_job = 'ANALYST' then
:Px_PAGE_NUM := '1';
end if;
if v_job = 'MANAGER' then
:Px_PAGE_NUM := '10';
end if;
end;3. Create a "On Submit: After processing" branch. Specify the "Target Type" as "Page in the application" and "Page Number" as &Px_PAGE_NUM. (with the dot).
I hope the above helps.
BTW, the following thread in the forum related to OWA_UTIL.REDIRECT_URL might help:
issue OWA_UTIL.REDIRECT_URL with APEX 4.1.1 -
Scorm-based test causes too many Blackboard http requests
We are looking into a problem with scorm-based tests and learning modules created in Adobe Captivate. Viewing the scorm content in our Blackboard LMS generates ridiculous amounts of network traffic. A simple click in the scorm module triggers anything between 10 and 100+ http-requests, even if no interaction with the server is required. The same click sometimes results in 5 requests, other times in 50 requests or more.It's always a sequence of the same two requests, see below (only the max value in "Keep-Alive: timeout=10, max=98" counts down).
If these scorm modules are taken by a group of students, the enormous amount of http requests put a lot of pressure on our Blackboard system, which results in a slow behaviour of the modules. Has anyone seen this behaviour and does anyone know of a way to prevent it?
(below, part of the http headers collected with the Firefox Live HTTP Headers Add-on)
https://...cc.kuleuven.be/courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_sup port.swf?invokeMethod=methodToExecute&lc_name=lc_name¶m=tempVar|true
GET /courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_support.swf?invokeMethod=me thodToExecute&lc_name=lc_name¶m=tempVar|true HTTP/1.1
Host: ...cc.kuleuven.be
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://...cc.kuleuven.be/courses/1/a-C112956-K/content/_7409447_1/ABT%20Excel%20Toets4.ht m
Cookie: JSESSIONID=2FFDF51EB1DFD4B73B539C63607A9177.root; __utma=137656618.1128290341.1286972380....
If-Modified-Since: Mon, 06 Dec 2010 17:40:03 GMT
If-None-Match: W/"149-1291657203000"
HTTP/1.1 304 Not Modified
Date: Fri, 10 Dec 2010 09:00:13 GMT
Server: Apache/1.3.41 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8i mod_jk/1.2.27
X-Blackboard-appserver: ...cc.kuleuven.be
X-Blackboard-product: Blackboard Learn™ 9.0.505.0
Set-Cookie: session_id=80EA2381B7970776B9C3202ADBDEC94E; Path=/
Set-Cookie: s_session_id=FB7D2433E54EFA941E49E6C79B536CDA; Path=/; Secure
Etag: W/"149-1291657203000"
Content-Length: 0
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Content-Type: text/plain; charset=iso-8859-1
https://../courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_support.swf?invoke Method=methodToExecute&lc_name=lc_name¶m=tempVar|true
GET /courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_support.swf?invokeMethod=me thodToExecute&lc_name=lc_name¶m=tempVar|trueHTTP/1.1
Host: ...kuleuven.be
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://../courses/1/a-C112956-K/content/_7409447_1/ABT%20Excel%20Toets4.htm
Cookie: JSESSIONID=2FFDF51EB1DFD4B73B539C63607A9177.root; __utma=137656618.1128290341.1286972380...
If-Modified-Since: Mon, 06 Dec 2010 17:40:03 GMT
If-None-Match: W/"149-1291657203000"
HTTP/1.1 304 Not Modified
Date: Fri, 10 Dec 2010 09:00:13 GMT
Server: Apache/1.3.41 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8i mod_jk/1.2.27
X-Blackboard-appserver: ...cc.kuleuven.be
X-Blackboard-product: Blackboard Learn™ 9.0.505.0
Set-Cookie: session_id=80EA2381B7970776B9C3202ADBDEC94E; Path=/
Set-Cookie: s_session_id=FB7D2433E54EFA941E49E6C79B536CDA; Path=/; Secure
Etag: W/"149-1291657203000"
Content-Length: 0
Keep-Alive: timeout=10, max=98
Connection: Keep-Alive
Content-Type: text/plain; charset=iso-8859-1Simply add the call to your exception hander. E.g.
EXCEPTION
WHEN OTHERS
THEN
UTL_TCP.Close_All_Connections;
INSERT INTO excep_trans (P_WORD_EXP, UPDATE_TIME, COUNTER)
VALUES (VC1.RAW_VAL_TXT, SYSDATE, cnt);
..etc..
END;Also consider using proper coding standards. There is NO modern day programming language standard that says to write (selective) reserved words in uppercase. Write in lowercase. Use camelcase and pascalcase for variable names and procedures/functions/methods. Restrict the use of uppercase to defining identifiers such as compiler macros or constants.
Do yourself a favour and read, understand and apply the basic naming standards as detailed in .Net Guidelines for Names and Code Conventions for the Java Programming Language.
Maybe you are looking for
-
Cannot Connect to my YouTube Account
For some reason when I tried to upload a video to YouTube from Final Cut Pro X it did not recognise the gmail account. The message Invalid Account or Password appeared. I changed the password and reclogged on and I still could not upload the video to
-
Trying to install on my PC after receiving my brand new IPad2 yesterday. Install fails due to Quicktime already installed. I cannot figure a way around it. Please help.;
-
Offsetting account number field
Hello, I have account based COPA. When I post a billing document I have a profit segment for account 704000 postings because account 704000 has profit segment mandatory in its field status, but there is another account in the accounting document that
-
We are trying to decide whether to use JSPs or XML/XSL for the user interface for our application. It is a large-scale application - large online shopping site - and need to do all coding in 6 weeks. One question we have
-
Job oppurunities for Labview developers in India
How is job oppurunities for Labview developers in India?