I am new to Weblogic.I was experimenting on the load balancing capabilities of WLS.I used a proxy plugin provided by default as a load balancer.
I want to check which server in a cluster gets the request from the proxy server every time I reload my site.
When I use "request.getServerPort()" I am getting the proxy server's port, but what I want is the managed server's port.
Have you tried request.getLocalPort()?
Related
We have on-premise 3-nodes cluster for devs in our office: 6.1.467, WinSrv2016. Everything works fine. Now we need to configure built-in service fabric reverse proxy (port 19081). For example, increase proxy timeout (now it is 120s) or enable client affinity. But I cannot find any information about how to do it.
Can anyone help to solve this?
I dont think there is a configuration for client affinity.
I suggest you use dedicated load balancer for it. You can use naming service to query the address of your service and manage affinity at load balancer level.
I'm running a Google Cloud HTTPS load balancer in front of 2 Compute Engine VM instances that are each running a socket.io server on port 80. They work fine and are reachable from my HTML/JS socket.io client that I'm running locally.
I have set my Google Cloud load balancer to use Session Affinity with "Generated Cookie". According to the docs, this should set a cookie named GCLB on the client. The cookie never gets set in my client, why?
I think my issue might be that I'm not really serving the client through the load balancer (or on google at all), but serving it locally, once this is a real client it will sit on a CDN somewhere. I am using a hostname locally that is on the same domain name as the load balancer. Meaning, my socket.io html client is at http://local.mydomain.com:8000/ and it connects to my socket.io server/load balancer which lives at https://io.mydomain.com/ note: ssl on server only
Any ideas as to how I can get the cookie set, or do I need to handle this differently?
the request from ihs is passed to plugin then to the application server and server received it.there is no cluster environment here.the server is up and running fine.But the response is not going back to plugin.how to troubleshoot?
(I would have made this a comment, but I don't have enough rep points).
You may need to engage IBM WebSphere Support to assist with this, but typically, for that type of issue, you would need to trace both sides of the connection (IHS plugin and WebSphere). Specifically,
Set LogLevel="Trace" in the plugin-cfg.xml
Set the following trace spec on the AppServer:
=info:com.ibm.ws.webcontainer=all:com.ibm.wsspi.webcontainer*=all:HTTPChannel=all:GenericBNF=all:TCPChannel=all
Reproducing the failure and reviewing the http_plugin.log and trace.log may provide some clues.
Do you receive some type of error in the browser? timeout? Is there anything (firewall, proxy) sitting between the IHS server and WebSphere AppServer?
It could be DNS problem with your WebSphere server. Can you please let us know about your IHS and plugin. Is it installed on same server where WebSphere is or on different server? If IHS and plugin is on different server just check that WebSphere server is able to resolve the IP address of IHS server using hostname. If not try to update host file with IP and hostname of your IHS server. It should work.
Does the client or the plugin not getting the response? Will that the request result in secure connection (i.e HTTPS/SSL...)?
The WAS server should extract most of the ports correctly if IHS/plugin is used in between. If using different webServer/load balancer(LB), the WAS server may not extract the listerning ports on the webServer/LB correctly.
You can take a look at the sample setting in PK55330 where a different web server is used in place of the IHS.
http://www-01.ibm.com/support/docview.wss?uid=swg1PK55330
Regards,
I am writing a javascript/strophejs xmpp client, and have been so far using it to connect to a xmpp server hosted at hosted.im, via a public BOSH service (http://bosh.metajack.im:5280/xmpp-httpbind). The html/javascript is also hosted online, at testserver.host56.com (not the real url).
Now, I decided to host the xmpp server on the amazon web cloud, and use my own Bosh service, hosted on this server as well.
Now, my ec2 instance is at myAWSDNS.us-west-2.compute.amazonaws.com (also not real url).
I also have a BOSH service up and running, at myAWSDNS.us-west-2.compute.amazonaws.com:7070.
Finally, I have also allowed traffic to this ec2 instance through both the instances firewall and through the AWS Security Group policy.
However, when trying to connect to this instance's xmpp server (openfire), using my JS/strophejs client, I get the following message in the Chrome javascript console:
XMLHttpRequest cannot load http://myAWSDNS.us-west-2.compute.amazonaws.com:7070/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://myAWSDNS.us-west-2.compute.amazonaws.com' is therefore not allowed access
Why am I getting this issue, if the origin is on the same domain as the requested resource?
The Ec2 instance is running Windows Server 2012.
This is the code I use to log in:
var conn = new Strophe.Connection("http://myAWSDNS.us-west-2.compute.amazonaws.com:7070/");
conn.connect("chris#myAWSDNS.us-west-2.compute.amazonaws.com", "myPassword", somecallback);
Thanks,
best regards,
Chris
As previously mentioned, even if you're on the same domain, the ports must also match otherwise CORS is required.
You may not be using the correct URL for your connection manager, all of the ones I've seen use an address ending in /http-bind/ or similar.
Have you tried connecting with Strophe.Connection("http://myAWSDNS.us-west-2.compute.amazonaws.com:7070/http-bind/");?
Also, you can test for the presence of the crossdomain.xml file by simply visiting http://myAWSDNS.us-west-2.compute.amazonaws.com:7070/crossdomain.xml to ensure that CORS has been successfully enabled.
The browser will not allow since the ports are different. I don't know what you have at AWS, but you can proxy the request in both direction, like as:
http://myAWSDNS.us-west-2.compute.amazonaws.com/http-bind/ <---------> http://myAWSDNS.us-west-2.compute.amazonaws.com:7070/
See item no 5: Connecting with Strophe.js of the tutorial for Apache use case.
hundreds of hits for these keywords, but nothing that is totally relevant.
So my web server is behind a load balancer. The web site is exposed by SSL.
When I open my logon page https[mydomain]/app/somepage.aspx, I am redirected to http://[ip address of server]/app/somepage.aspx.
I tried the follwing
Setting the loginurl to https[mydomain]/app/somepage.aspx, doesnt work
tried fiddling with the binding in iis, but there's an issue that forces us to use appcmd to set the hostname, but nothing works after I set it.
Suggestions?
Thanks
This sounds more like a load balancer configuration error, or maybe your load balance just isn't capable of forwarding the request using the same url. It seems like your load balancer is mroe of a proxy, and is creating a new request using only the IP address. Most decent load balancers should have an option for forwarding the hostname.
This might be more of a Serverfault question because it has more to do with load balancer configuration.