Serious bug in Weblogic when connecting to a remote website through a local proxy server (proxyHost, proxyPort)

Hi there,
It seems that there is a serious problem with any version of Weblogic when you
have to pass through a local proxy server to connect a remote website.
Whenever I am trying to run the jsp program below either with Weblogic 7.0 SP2
or even with Weblogic 8.1, I get the following exception :
An error occured: Tried all: '1' addresses, but could not connect over HTTP to
server: 'www.sun.com', port: '80'
When I run the same program outside Weblogic, it works fine. Other people have
already reported the same problem either in this newsgroup or on Internet forums,
and up to now, the problem is not fixed yet.
In fact, Weblogic seems to block when it performs the connect() method to the
proxy, my jsp program hangs a few minutes before returning the error message shown
above.
If anyboby can tells me how this problem can be solved (or maybe via a workaround)
do not hesitate to keep me informed, thanks in advance.
Please find below my code :
public class ProxyDownload extends HttpServlet
private static final String CONTENT_TYPE = "text/html";
//Initialize global variables
public void init() throws ServletException
public String bufferedReaderToString (BufferedReader br) throws IOException
String xml = "";
String line = null;
while ( (line = br.readLine()) != null)
xml += line;
return xml;
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head><title>Proxy Download</title></head>");
out.println("<body bgcolor=\"#c0c0c0\">");
try{
// Set proxy stuff
System.getProperties().put( "http.proxySet", "true");
System.getProperties().put( "http.proxyHost", "ip_address" );
System.getProperties().put( "http.proxyPort", "port");
String password = "user:pass";
sun.misc.BASE64Encoder objEncoder = new sun.misc.BASE64Encoder();
String code = objEncoder.encode(password.getBytes());
// Find the file name to save
String file = null;
// Open a connection
URL url = new URL("http://www.sun.com");
URLConnection connection = url.openConnection();
// Set up the connection so it knows you are sending
// proxy user information
connection.setRequestProperty( "Proxy-Authorization", "basic " + code);
connection.connect();
// Set up the connection so you can do read and writes
connection.setDoInput( true );
BufferedReader inBuff = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String str = bufferedReaderToString(inBuff);
out.println("<BR>" + str);
catch(Exception e){
out.println("<BR> An error occured: " + e.getMessage());
out.println("</body></html>");
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
doGet(request, response);
//Clean up resources
public void destroy()

Hello,
The way to set the HTTP connection using a proxy server changed (from
using the system property
weblogic.webservice.transport.http.proxy.host/port)[1] in WLS 7.x to the
standard JDK 1.4 system properties [2] in WLS 8.1.
I would recommend opening a dialog with our outstanding support team [3]
to resolve this issue.
Thanks,
Bruce
[1]
http://edocs.bea.com/wls/docs70/webserv/client.html#1058615
[2]
http://java.sun.com/j2se/1.4/docs/guide/net/properties.html
[3]
http://support.bea.com
[email protected]
Yves Hardy wrote:
>
Hi there,
It seems that there is a serious problem with any version of Weblogic when you
have to pass through a local proxy server to connect a remote website.
Whenever I am trying to run the jsp program below either with Weblogic 7.0 SP2
or even with Weblogic 8.1, I get the following exception :
An error occured: Tried all: '1' addresses, but could not connect over HTTP to
server: 'www.sun.com', port: '80'
When I run the same program outside Weblogic, it works fine. Other people have
already reported the same problem either in this newsgroup or on Internet forums,
and up to now, the problem is not fixed yet.
In fact, Weblogic seems to block when it performs the connect() method to the
proxy, my jsp program hangs a few minutes before returning the error message shown
above.
If anyboby can tells me how this problem can be solved (or maybe via a workaround)
do not hesitate to keep me informed, thanks in advance.
Please find below my code :
public class ProxyDownload extends HttpServlet
private static final String CONTENT_TYPE = "text/html";
//Initialize global variables
public void init() throws ServletException
public String bufferedReaderToString (BufferedReader br) throws IOException
String xml = "";
String line = null;
while ( (line = br.readLine()) != null)
xml += line;
return xml;
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head><title>Proxy Download</title></head>");
out.println("<body bgcolor=\"#c0c0c0\">");
try{
// Set proxy stuff
System.getProperties().put( "http.proxySet", "true");
System.getProperties().put( "http.proxyHost", "ip_address" );
System.getProperties().put( "http.proxyPort", "port");
String password = "user:pass";
sun.misc.BASE64Encoder objEncoder = new sun.misc.BASE64Encoder();
String code = objEncoder.encode(password.getBytes());
// Find the file name to save
String file = null;
// Open a connection
URL url = new URL("http://www.sun.com");
URLConnection connection = url.openConnection();
// Set up the connection so it knows you are sending
// proxy user information
connection.setRequestProperty( "Proxy-Authorization", "basic " + code);
connection.connect();
// Set up the connection so you can do read and writes
connection.setDoInput( true );
BufferedReader inBuff = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String str = bufferedReaderToString(inBuff);
out.println("<BR>" + str);
catch(Exception e){
out.println("<BR> An error occured: " + e.getMessage());
out.println("</body></html>");
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
doGet(request, response);
//Clean up resources
public void destroy()

Similar Messages

  • Oracle raise ORA-03113 when connect to a remote oracle server using toad

    Hi there,
    when i use the tool toad connect to a remote oracle server which located in a different city,
    when i submit a query in toad,
    if the query returns many rows of data, it will raise the error ORA-03113:end-of-file on communication channel,
    however if the query returns only a few rows, i won't raise such error,
    however, when i use sqlplus connect to that remote server, it won't raise such error,
    what's the reason is, can any one tell me how to tackle this problem if using the tool toad. thanks/

    hi my oracle vsersion is:
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    my oracle server is 2 nodes rac server,
    and i've tried two different kind version of toad v9.6 and v10.5, and both have the same problem
    once i query a table, if the result returned more than 30 rows, then it will raise that error, if query returns less than 30 rows, it's ok.
    i assume it is a problem concern with network, but i don't know why no such error raise when using sqlplus ?

  • Ssl_error_internal_error_alert error in firefox when connecting to an internal website with self signed certificate.

    Firefox 26.0 . The website is running on tomcat 7 server . Using java key store .java version "1.6.0_29"
    Can test the site with openssl s_client and response seem ok.
    SSL handshake has read 2335 bytes and written 303 bytes
    New, TLSv1/SSLv3, Cipher is EDH-RSA-DES-CBC3-SHA
    Server public key is 4096 bit
    Secure Renegotiation IS supported
    SSL-Session:
    Protocol : TLSv1
    Cipher : EDH-RSA-DES-CBC3-SHA
    Session-ID: 52B896D8E3B7D0B1A03C5D2E5FF8B594D6AA74E94CB193E24685A041C5BEBF3A
    Session-ID-ctx:
    Master-Key: 1063AB71B3389D139FD7DD490FE3DF2188FA24B5E090390D2A899B32E2895B1D7A093590BE8D6FCDEFD22ACF10D94544
    Key-Arg : None
    Start Time: 1387828953
    Timeout : 300 (sec)
    Verify return code: 18 (self signed certificate)
    closed

    Hello,
    Can you please confirm what the issue is? Are you not able to setup a SSL connection to the internal website running on Tomcat. If so, have you tried installing the root CA certificate into Firefox? You can do that by going to Firefox -> Preferences -> Advanced -> View Certificates -> Certificate Authorities and then importing the root CA certificate.
    Please check this and let us know if this helps in resolving the connectivity issue. Though, I am a bit surprised that the connection is not getting established. Typically, Firefox would warn you if you would like to continue with the connection. Are you not seeing this warning?
    Thank you

  • Trying to connect via tablet's tethering hotspot, firefox says proxy server refused connection

    Hi there, today I tried to connect my laptop to my tablet using the lattering as tethering hotspot. Laptop connected itself to tablet, signal was excellent, password OK, no apparent problems.
    When I try to load the home page I got this answer: connection refused by proxy server.
    What shall I do, check or change to make things work?
    When a use my internet key or any other wi-fi I don't get the same problem, it only happened today with the tethering hotspot of the Tablet.
    Thanks in advance for any help you guys might be able to give me!
    Happy new year,
    Ira

    Hey Ira,
    Does your computer use a proxy server to connect to the internet?
    1.You can hold your window key and press r at the same time to open a dialog box. 2.in the dialog box type ncpa.cpl and press enter. 3.Your networks will open 4.right click the network named wifi or the network you connect through and select properties. 5.this will again open a dialog. in this dialog scroll and go to internet protocol version4 6.double click on it. do you see obtain an ip address automatically checked or use the following ip checked.
    if obtain ip automatically then your connection doesn't use proxy.
    now go to firefox>option>advanced>network>setting and see if your connecion is automatic,no proxy etc. If your computer use proxy you can use system proxy or manually configure proxy.
    You have two scenarios.
    1. When you use internet key or any other wi-fi. Keep the setting as it is. remember in this case "use system proxy settings"
    2. Now when you use tethering from your table, you will have to make only a tiny change. Go to firefox setting, dont make any change to windows setting and click on no proxy or automatically detect proxy (1 of the first two). One of them should work for you Either no proxy or automatically detect proxy
    hope it helps. :-)

  • Unable to open any website due to The proxy server is refusing connections, why?

    Firefox is opened, but unable to open any website. The message says, "The proxy server is refusing connections" & "Firefox is configured to use a proxy server that is refusing connections". I installed the version 8.0.1 again. But there was the same message, again!

    Check the connection settings.
    *Tools > Options > Advanced : Network : Connection > Settings
    *https://support.mozilla.com/kb/Options+window+-+Advanced+panel
    If you do not need to use a proxy to connect to internet then select "No Proxy" if the default "Use the system proxy settings" setting doesn't work.
    See "Firefox connection settings":
    *https://support.mozilla.com/kb/Firefox+cannot+load+websites+but+other+programs+can

  • Each time I try to get into firefox it says "Proxy Server is refusing connections" I don't even know what a proxy server is but I want to get away from Windows Explorer.

    Firefox is configured to use a proxy server that is refusing connections.

    You can find the connection settings in Tools > Options > Advanced : Network : Connection<br />
    If you do not need to use a proxy to connect to internet then select "No Proxy"
    See "Firefox connection settings":
    * [[Firefox cannot load websites but other programs can]]

  • Updated to firefox 18, cannot connect anymore (ie does), i think it it proxy server related.

    using win7. firefox was running fine until updating to v18. i see in release notes that proxy server was updated! i have tried changing the proxy server setup but still no luck, it is setup just like ie right now and ie will connect. i also checked windows firewall (which is my only firewall) and followed instructions on removing entry and adding it back but still no luck.

    Hi,
    same problem here behind proxy with authentication (ntlm)
    Tried both:
    - Plain vanilla firefox 18 installation
    - Upgrade from firefox 17
    Result: firefox keeps asking for authentication credentials again and again and cannot connect to internet.
    Solution: rollback to firefox 17
    Regards

  • HT201262 screen on the TV flickering purple when connecting mini mac to TV through HDMI

    anybody come across a problem with the TV connected to Mini mac, when i connect my HDMI cable to my TV and open up safari click onto Apple.com watch a video on their home page in full screen the screen flickers purple any ideas what could be the problem.

    Hey there Daza2014,
    It sounds like you are having some graphical issues with an TV connected to your mac mini. I found this article for you to help troubleshoot what you are seeing here:
    Apple computers: Troubleshooting issues with video on internal or external displays
    http://support.apple.com/kb/ht1573
    This section in particular:
    No video or no signal, image distortion, "snow," or flickering
    Check connections
    When using an external display be sure to check the following:
    If you're using an Apple notebook, confirm the AC power cable or adapter is securely connected to the computer and the cable providing power to the display is also secure. It is always good to have your notebook connected to AC power when an external display is in use.
    Confirm display adapters are fully seated in their respective connections and that they are supported models and for the computer and display. Refer to these articles to assist you with adapter compatibility and further configuration information:
    Monitor and Display Adapter Table
    About Mini DisplayPort to HDMI adapters
    Apple Mini DisplayPort adapters: Frequently asked questions (FAQ)
    Thunderbolt ports and displays: Frequently asked questions (FAQ)
    Remove all display cable extenders, KVM switches, or other like devices and retest to determine if the issue is resolved.
    Try unplugging the video adapter or cable and then plug it back in.
    If more than one video adapter is in use (or "daisy-chained"), troubleshoot by using only one adapter.
    Example: A mini DisplayPort to DVI adapter connected to a DVI to HDMI adapter is an unsupported configuration because there is a series of adapters in use.
    If available, try using a different display and or adapter (or use a different connector by using DVI instead of VGA, for instance).
    Reset the systemYou can reset the Mac's parameter RAM and SMC.Reset the resolutionStart by resetting the Mac's parameter RAM. If the display does not come up, was previously set to an unsupported resolution, and still results in no video:
    Start up in Safe Mode.
    From the Apple () menu, choose System Preferences.
    Choose Displays from the View menu to open the preferences pane.
    Select any resolution and refresh rate that your display supports.
    Restart your computer.
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • When connecting to an internal website, I'm getting an error: "Certificate contain unknown critical extension." What does this mean?

    I am getting a connection failure when trying to connect to an internal web site:
    Secure Connection Failed
    An error occurred during a connection to <sitename>.
    Certificate contains unknown critical extension.
    (Error code: sec_error_unknown_critical_extension)
    Can you give me a general idea what the error is and why I would be getting this error?
    Thanks in advance...

    The instructions here might help
    http://support.apple.com/kb/TS3297

  • Is it possible to hide Accessibility Voiceover Cursor when connecting to Bluetooth Remote Control in Keynote presentation on iPad?

    Hi team, I would like to know
    When I use my Satechi Bluetooth pointer (linked in Accessibility mode) with keynote on iPad there is a box around the items in my slides. Is there a way to remove this box?
    like these comments on this video
    https://www.youtube.com/watch?v=-c3Fw9m7UuY&list=UUajGeviMMa-piNbYJehhFmA&index= 3
    I didn't get any of those boxes for 2 years but if I remember well it just started to appear after either upgrading to Ios8 or updated Keynote, can't recall exactly.
    Any idea on how to solve this?
    Thanks so much for your time and help in this!
    Max

    Anyone with the same issue?
    have a great day
    Max

  • How do I set it up so that when I reply to a website through Firefox, it is sent through Google and not Outlook

    I use Google for my email server. When I am searching the web on Firefox, I want to reply to a "Contact Me" prompt from the website.....in that case, how do I set Firefox up so that it replies via Google and not Microsoft outlook?

    Click on Tools at the top of the page and go to Options; choose the Applications tab. Scroll down until you see "mailto" on the left, under Content type (or type it in the Search box) then click to the right on "Use Microsoft Outlook (default)". A scrolling box will open up giving you different choices.
    Choose what you want and click "OK".

  • My internet connection keeps reverting back to using a manual proxy server configuration pointing at 127.0.0.1 Port 55414. I've tried the help regarding the user.js and prefs.js files but still it continues to revert to the manual proxy configuration!

    I know how to change my network settings to fix my internet connection, I just select "Auto-detect network settings for this network" under Tools, Options, Network, Settings. However every time I close down Firefox it reverts to the manual proxy configuration pointing to 127.0.0.1 Port 55414.
    I've tried all the suggestions under saving your preferences but this hasn't worked so I'm at a loss as to what to do next. If I can't sort this I'll have to revert back to Internet Explorer as this doesn't have this problem!

    I know how to change my network settings to fix my internet connection, I just select "Auto-detect network settings for this network" under Tools, Options, Network, Settings. However every time I close down Firefox it reverts to the manual proxy configuration pointing to 127.0.0.1 Port 55414.
    I've tried all the suggestions under saving your preferences but this hasn't worked so I'm at a loss as to what to do next. If I can't sort this I'll have to revert back to Internet Explorer as this doesn't have this problem!

  • How do I simulate a right-click in Windows when connected with Remote Desktop 8.0 for Mac OS X?

    When connecting to a remote Windows 7 OS from Mac OS X 10.8.5 with Microsoft Remote Desktop 8.0.24091, I'm not able to simulate a right-click with the Apple magic mouse.  
    On an older version Microsoft Remote Desktop Client version 2.1.1, I can hold down shift+ctl on the Mac and click the magic mouse to simulate a right-click in Windows.  With this new version RDP 8.0, I can't find any way to simulate a right-click,
    other than to select "Swap mouse buttons" under settings, and then every click is a right-click and then I'm no longer able to left-click (which is even worse).  I've tried several key combinations and nothing seems to work.  Am I missing
    something simple here with the new RDP 8.0 application, or is the right-click simulation not (yet) functional?  
    Any help is greatly appreciated, thanks!

    In order to make use of the right-click inside an open session you have three options:
    Standard PC two button USB mouse
    Apple Magic Mouse: To enable right-click, clickSystem Preferences in the dock, click Mouse, and then enable Secondary click.
    Apple Magic Trackpad or MacBook Trackpad: To enable right-click, click System Preferences in the dock, click Mouse, and then enable Secondary click.
    Extracted from "Remote desktop Client on Mac: FAQ"
    http://technet.microsoft.com/en-us/library/dn473006.aspx

  • Getting "Server refused to allocate pty" when connecting from ssh

    Hi All,
    I am getting "Server refused to allocate pty" when connecting from ssh to our Solaris 10 8/07 server. I searched in goggle but couldn't find a solution. But from telnet, all users are able to login without any problems. My ssh is default one that comes with sol 10.
    Please help if anybody has a solution for this
    Thanks in advance.

    I am seeing this on a sparc solaris 10. root can ssh in and the console is fine but regular users cannot
    ssh in . Do you have any suggestions for sparc solaris 10? I don't believe the mount suggestion makes
    sense in my environment.
    My root drive crashed so I resinstalled solaris but now ssh does not work. telnet works fine but I don't like
    telnet.
    I get
    Server refused to allocate pty and
    Server send disconnect message
    type2 (SSH_DISCONNECT_PROTOCOL_ERROR)
    "Could not create socket pairs: permission denied"
    Thanks
    Thomas

  • WLST : Error connecting to a remote Weblogic server instance from OEPE 3.7

    Attempting a to run a weblogic script connecting to a remote weblogic server instance (10.3.5), which is generating the following exception in OEPE 3.7.2 -
    username = 'weblogic'
    password = 'weblogic6'
    url='t3://xxx.xxx.com:7001'
    connect(username,password,url)
    Connecting to t3://xxx.xxx.com:7001 with userid weblogic ...
    This Exception occurred at Fri Feb 01 13:20:54 MST 2013.
    Error occured while performing connect : Error connecting to the server : Failed to generate class for weblogic.management.mbeanservers.compatibility.internal.MBeanHomeImpl_1035_WLStub
    Use dumpStack() to view the full stacktrace :
    java.lang.AssertionError: Failed to generate class for weblogic.management.mbeanservers.compatibility.internal.MBeanHomeImpl_1035_WLStubconnect
    Problem invoking WLST - Traceback (innermost last):
    File "C:\Users\hughese\workspace\12c_wlst\wlst\heapsize.py", line 13, in ?
    File "<iostream>", line 22, in connect
    File "<iostream>", line 648, in raiseWLSTException
    WLSTException: Error occured while performing connect : Error connecting to the server : Failed to generate class for weblogic.management.mbeanservers.compatibility.internal.MBeanHomeImpl_1035_WLStub
    Use dumpStack() to view the full stacktrace
    Connecting to the local weblogic server instance (t3://localhost:7001) works okay.
    From the command prompt (wlst.cmd) I'm able to connect to the remote weblogic server instance -
    wls:/offline> connect('weblogic','xxxxx','t3:xxx.xxx.com:7001') ;
    Connecting to t3://xxx.xxx.com:7001 with userid weblogic ...
    Successfully connected to Admin Server 'AdminServer' that belongs to domain 'IDMDomain'.
    I've compared the CLASSPATHs between OEPE and the command prompt.
    Any assistance would be greatly appreciated.
    Edited by: 950635 on Feb 1, 2013 7:47 PM

    Hi,
    1)To get mysql JDBC driver to work on my Linux system, i had to add the classpath for the driver to the .bashrc:
    CLASSPATH=./:home/<user>/java/mm.mysql-2.0.6/:home/<user>/java
    Note that I execute the java program as the user <user> (and .bashrc is the config. file of this <user>...). Perhaps you must do this as well for the Oracle driver on your client machine. I don't know if your client machine is UNIX/LINUX or WINDOWS. It should only be clear that the CLASSPATH is set in the config. file of the user under which the java program runs and that this user has the permission to access the files.
    There are no differences between accessing the database locally than accessing it by a network connection. The only thing that matters are that the connection parameters are right and that the network works properly.
    2) are you sure that the table tname (case sensitivity?) exits?
    Marc

Maybe you are looking for