IOS Global HTTP Proxy Authentication Error.

I have been attempting to use the HTTP Global Proxy feature on a group of iPads. Unfortunately, the proxy servers that I set up are starting to get spammed and we need to activate some form of authentication to avoid this problem. I have tried many methods and the result is always the same, the iPad keeps prompting the user for the username and password every few minutes, no matter how many times they have entered it correctly.
Is there any form of authentication that works smoothly?  I am currently using Squid, but could use any other, and can run it on any OS that would make it work!

Here are the relevant parts of my squid config and some examples of what are in the acl files. I downloaded the ip list from ipdeny.com. As it was, the end of line character wasn’t correct and I had to correct that before squid would read it correctly. I just copied and pasted it into a new file to correct it.
I don’t know if this is the best way to approach this, and I am sure there are some problems with it currently. I am continuing to tweak it as things come up. With all allowed domains the number of authentication pop ups I received were drastically reduced. Looking it over I already see that rearranging the allow and deny rules would be of benefit for me.
I am also using fail2ban on this server with the squid configuration file from http://www.fail2ban.org/wiki/index.php/Fail2ban:Community_Portal#Squid_filter. This does eventually block someone who gets enough TCP_DENIED 407 messages. I also had modified it to include 403 messages with some success. The amount of blocks we receive from blocking ads I would get devices locked out unintentionally but increasing the number of attempts seems to have resolved this.
squid.conf
## ACL for blocked files originally just .exe
acl blockedfiles urlpath_regex "/etc/squid/blocked.files.acl"
## ACL for blockedomains
acl blockeddomain dstdomain "/etc/squid/blocked.domains.acl"
## ACL for allowedomains
acl alloweddomain dstdomain "/etc/squid/allowed.domains.acl"
## ACL for allowed user agents
acl allowedbrowser browser "/etc/squid/allowed.browser.acl"
##Acl for Users requiring proxy authenticiation
acl password proxy_auth REQUIRED
## United States External Allowed
acl external src "/etc/squid/us.zone"
## Internal Networks
acl internal src "/etc/squid/local.zone"
##Allow access from the admwired network defined above without authentication
http_access allow internal
##Block the following based on acl defined above
http_access allow alloweddomain
http_access deny blockedfiles
http_access deny blockeddomain
http_access deny !allowedbrowser
##Allow access from all networks but require authentication
http_access deny !password
http_access allow external password
#And finally deny all other access to this proxy
http_access deny all
allowed.browser.acl
^.*iPad.*$
blocked.files.acl
\.[Ee][Xx][Ee]$
us.zone
103.246.248.0/24
113.29.0.0/17
163.60.0.0/16
192.103.43.0/24
202.72.96.0/20
203.144.48.0/20
203.187.128.0/19
3.0.0.0/8
4.0.0.0/8
6.0.0.0/8
7.0.0.0/8
8.0.0.0/8
9.0.0.0/8
11.0.0.0/8
12.0.0.0/8
13.0.0.0/8
etc…..
allowed.domains.acl
.apple.com
.mzstatic.com
.appextras.com
.google.com
.facebook.com
.gstatic.com
.amazonaws.com
.bloxcms.com
.lyveapps.com
.doubleclick.net
.googleusercontent.com
.2mdn.net
.admob.com
.mopub.com
.googletagservices.com
.quantserve.com
.exelator.com
.facebook.net
.google-analytics.com
.googleadservices.com
.scorecardresearch.com
.qwapi.com
.appspot.com
.mobclix.com
.crashlytics.com
.mm.bing.net
.verisign.com
plus some more for specific ipad apps that I had to allow

Similar Messages

  • IOS 6 Global HTTP Proxy Support?

    Hi,
    We have been trying to use global http proxy in iOS 6 Beta 4 version , however havent found a way to configure it.
    Is global http proxy support available for use in iOS 6 Beta version? Is it available through configurator or ipcu?
    Thanks for your help.

    answer is here:
    https://discussions.apple.com/message/19847523#19847523

  • DAP and http proxy authentication

    I have a ASA firewall with http proxy authetication and now i configure DAP for Anyconnect with AD .I disable the "Default Dynamic Access Policy"  proxy authentication fail .Someone knows how to configure the DAP for http proxy authentication ?
    best regards

    Still nothing about it. I've also posted to another threads with similar problems:
    http://discussions.apple.com/message.jspa?messageID=8165122#8165122
    http://discussions.apple.com/message.jspa?messageID=8165120#8165120
    http://discussions.apple.com/message.jspa?messageID=8165118#8165118
    http://discussions.apple.com/message.jspa?messageID=8149758#8149758
    As I said before, while I've had OS 1.1.4, everything was normal. It began when I upgraded to 2.0.2 and after to 2.1. I also double checked if the TI here changed the policies, and they assured me they don't.
    Several other users with 2.x are also reporting the same trouble. As far as now, I've came across a post suggesting me to install a local http proxy on the phone, but I don't think it's gonna work.
    Let's keep this thread alive!

  • How Setting up global http proxy with profile in iphone(file.mobileconfig)

    how Setting up global http proxy with profile in iphone(file.mobileconfig)

    how Setting up global http proxy with profile in iphone(file.mobileconfig)

  • Proxy Authentication Error in Web Service with SAAJ on Weblogic 9.2 MP3

    Hi,
    I have encountered a problem with proxy authentication in SAAJ web service (WS) calls on Weblogic 9.2 MP3.
    My WS client (which uses SAAJ's SOAP classes) should use a proxy that requires authentication to call the external web services.
    However, it does not perform the authentication and receives HTTP Error 407 - Unauthorized.
    The reason seems to be that Weblogic's Http Handler (weblogic.net.http.Handler) ignores the proxy authentication.
    I was able to work around it by setting sun's http handler explicitly in the WS endpoint URL. Sun's handler (sun.net.www.protocol.http.Handler) makes use of the Authenticator class I provided.
    1. Please see my code below and let me know if this is the only solution or if I'm doing something wrong. While testing on Tomcat I did not have to set the handler.
    2. I have seen that there are also System properties for http.proxyUser and http.proxyPasword, however if I use these and ommit setting the SimpleAuthenticator, it also fails (with either handler!). An explanation of that is welcome.
    Thanks in advance.
    Code:
    ===========================================================
    System.setProperty("http.proxySet", "true");
    System.setProperty("http.proxyHost", "localhost");
    System.setProperty("http.proxyPort", "808");
    //System.setProperty("http.proxyUser", "myuser");
    //System.setProperty("http.proxyPassword", "mypw");
    Authenticator.setDefault(new SimpleAuthenticator("myuser", "mypw"));
    String urlString = "http://someurl:8080/webservice..";
    URL endpoint1 = new URL(urlString);
    URL endpoint2 = new URL(null, urlString, new sun.net.www.protocol.http.Handler());
    SOAPConnectionFactory soapfactory = SOAPConnectionFactory.newInstance();
    SOAPConnection connection = soapfactory.createConnection();
    connection.call(message, endpoint1); // Gives Exception with HTTP Error 407
    connection.call(message, endpoint2); // Works and uses the proxy
    For reference:
    ===========================================================
    public class SimpleAuthenticator extends Authenticator {
         private String username, password;
         public SimpleAuthenticator(String username, String password) {
              this.username = username;
              this.password = password;
         protected PasswordAuthentication getPasswordAuthentication() {
              return new PasswordAuthentication(username, password.toCharArray());
    }

    Sorry for the 3 posts.
    Administrator, delete this thread please!!

  • Calling external web service - Proxy Authentication error

    Using Developer 10.1.3.3 and following OTN example http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html.
    I have followed the above example and am trying to test the SendServiceSoapClient.java in JDeveloper. The class compiles ok but when I run it I receive the following error in the log window :
    HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 407 Proxy Authentication Required
    As I was able to create the proxy with no problems, the proxy settings in Tools->Preferences are valid. I don't understand at what point it is failing as I am able to access the wsdl in the example from JDeveloper. I have checked the system settings for the proxy (username/pwd/host etc) at run time and they are as expected.
    Can anyone make any suggestions? I have had my user details checked on our proxy server and it is not blocked from performing any actions. Is the message indicating I am being blocked from accessing the service from the suppliers end?

    I have a solution for the problem I encountered.
    My collegues who look after the proxy server and network first tried to bypass authentication for the web site www.esendex.com (where the service resides). The same error occurred when trying to call the service.
    They then set up a route on the network to send the request straight to www.esendex.com and a rule on the firewall to allow the request 'out'. This has done the trick and the request passes through!
    Unfortunately, I am not much clearer as to why our proxy server is configured to block this message type and how come it can't be changed! Hey ho, I have a solution for now!

  • Http proxy authentication for JDev 10.1.3

    Hi,
    I found the http proxy settings in the "tools->preferences->Web Browser and Proxy" but there are no settings for the username and password. Is there some other way that I can add these.
    The problem is that whenver JDeveloper wants to do some http stuff it (or something else is doing it) asks me for the proxy user name & password - this happens over and over again. If JDev is doing this then surely it should remember the username & password.
    I sometimes get a JDeveloper dialog "waiting for the connection" come up over the proxy auth dialog and I have to cancel the function so I can authenticate, then re-request the function.
    I wish I didn't have the proxy authentication but I have no choice in this dev environment. I do get to choose JDeveloper at least.
    Regards,
    Simon.

    Hi,
    I get it when I 'check for updates' and I get it again when I 'go to JavaDoc' - and this is the one where the "waiting for connection dialog" pops on top of the proxy log in and I have to cancel it to log in. Then all subsequent 'go to JavaDoc' requests go straight through.
    I would prefer it if I could just configure (in proxy preferences) the username and password so it never asks me. I dont care if it less secure storing the password since I think authenticating proxies are a dumb idea anyway. If the password is not supplied then JDev can ask for it like it does now to keep the security-paranoid people happy.
    Also, this morning I got this Exception which appeared at the same time I got a proxy auth window. When JDev finally started all my previously open windows were lost. No real problem but unexpected. Here is the stack dump:
    java.lang.NullPointerException
         at oracle.jdevimpl.webdav.api.DAVAuthenticator.getPasswordAuthentication(DAVAuthenticator.java:79)
         at java.net.Authenticator.requestPasswordAuthentication(Authenticator.java:300)
         at sun.net.www.protocol.http.HttpURLConnection$1.run(HttpURLConnection.java:267)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.net.www.protocol.http.HttpURLConnection.privilegedRequestPasswordAuthentication(HttpURLConnection.java:263)
         at sun.net.www.protocol.http.HttpURLConnection.getHttpProxyAuthentication(HttpURLConnection.java:1427)
         at sun.net.www.protocol.http.HttpURLConnection.resetProxyAuthentication(HttpURLConnection.java:1246)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:950)
         at oracle.ide.net.HttpURLFileSystemHelper.exists(HttpURLFileSystemHelper.java:191)
         at oracle.jdevimpl.webdav.net.WebDAVURLFileSystemHelper.exists(WebDAVURLFileSystemHelper.java:423)
         at oracle.ide.net.URLFileSystem.exists(URLFileSystem.java:498)
         at oracle.ideimpl.editor.EditorUtil.getNode(EditorUtil.java:126)
         at oracle.ideimpl.editor.EditorUtil.loadContext(EditorUtil.java:91)
         at oracle.ideimpl.editor.TabGroupState.loadStateInfo(TabGroupState.java:950)
         at oracle.ideimpl.editor.TabGroup.loadLayout(TabGroup.java:1758)
         at oracle.ideimpl.editor.TabGroupXMLLayoutPersistence.loadComponent(TabGroupXMLLayoutPersistence.java:31)
         at oracle.ideimpl.controls.dockLayout.DockLayoutInfoLeaf.loadLayout(DockLayoutInfoLeaf.java:123)
         at oracle.ideimpl.controls.dockLayout.AbstractDockLayoutInfoNode.loadLayout(AbstractDockLayoutInfoNode.java:631)
         at oracle.ideimpl.controls.dockLayout.AbstractDockLayoutInfoNode.loadLayout(AbstractDockLayoutInfoNode.java:628)
         at oracle.ideimpl.controls.dockLayout.AbstractDockLayoutInfoNode.loadLayout(AbstractDockLayoutInfoNode.java:614)
         at oracle.ideimpl.controls.dockLayout.DockLayout.loadLayout(DockLayout.java:302)
         at oracle.ideimpl.controls.dockLayout.DockLayoutPanel.loadLayout(DockLayoutPanel.java:128)
         at oracle.ideimpl.editor.Desktop.loadLayout(Desktop.java:353)
         at oracle.ideimpl.editor.EditorManagerImpl.init(EditorManagerImpl.java:1824)
         at oracle.ide.layout.Layouts.activate(Layouts.java:758)
         at oracle.ide.layout.Layouts.activateLayout(Layouts.java:179)
         at oracle.ideimpl.MainWindowImpl$2.runImpl(MainWindowImpl.java:734)
         at oracle.javatools.util.SwingClosure$1Closure.run(SwingClosure.java:50)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

  • WWSAPI - Cannot connect to web service via SSL and HTTP proxy authentication with NTLM, errorCode 0x803d0016, HTTP status 407

    Hi,
    I built a web service client using WWSAPI. The connection works via SSL (without HTTP proxy) and it works with SSL and proxy with basic authentication as well. When I try to connect using a proxy with NTLM authentication, then I get the errorCode
    0x803d0016, HTTP status "407 (0x197)", "Proxy Authentication Required".
    In WireShark I see only one HTTP request to connect to the proxy with NTLM Message Type: NTLMSSP_NEGOTIATE. The HTTP Response returns Status 407 and the connection ist closed. Comparing this to Internet Explorer - the Connection is not closed and
    a second request with NTLMSSP_AUTH is sent.
    Why doesn't it make the complete NTLM handshake? Why wasn't sent the NTLMSSP_AUTH directly?
    I oriented in the HttpCalculatorWithKerberosOverSslClientExample.
    Using WS_HTTP_HEADER_AUTH_SECURITY_BINDING,
    WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_SCHEME was set to WS_HTTP_HEADER_AUTH_SCHEME_NTLM, WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_TARGET to WS_HTTP_HEADER_AUTH_TARGET_PROXY. I tried WS_DEFAULT_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE but also WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE.
    Any idea?
    Thanks

    Hi,
    I built a web service client using WWSAPI. The connection works via SSL (without HTTP proxy) and it works with SSL and proxy with basic authentication as well. When I try to connect using a proxy with NTLM authentication, then I get the errorCode
    0x803d0016, HTTP status "407 (0x197)", "Proxy Authentication Required".
    In WireShark I see only one HTTP request to connect to the proxy with NTLM Message Type: NTLMSSP_NEGOTIATE. The HTTP Response returns Status 407 and the connection ist closed. Comparing this to Internet Explorer - the Connection is not closed and
    a second request with NTLMSSP_AUTH is sent.
    Why doesn't it make the complete NTLM handshake? Why wasn't sent the NTLMSSP_AUTH directly?
    I oriented in the HttpCalculatorWithKerberosOverSslClientExample.
    Using WS_HTTP_HEADER_AUTH_SECURITY_BINDING,
    WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_SCHEME was set to WS_HTTP_HEADER_AUTH_SCHEME_NTLM, WS_SECURITY_BINDING_PROPERTY_HTTP_HEADER_AUTH_TARGET to WS_HTTP_HEADER_AUTH_TARGET_PROXY. I tried WS_DEFAULT_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE but also WS_STRING_WINDOWS_INTEGRATED_AUTH_CREDENTIAL_TYPE.
    Any idea?
    Thanks

  • Supressing the Browser HTTP Proxy Authentication Popup

    Hi there.
    I have an applet that does some socket proxying/tunnelling.
    It has some code that detects whether the browser is connecting through a HTTP proxy and whether or not that proxy requires authentication.
    When the code runs in a browser with a direct connection to the internet it is all good.
    When the code runs in a browser with a standard HTTP Proxy connection to the internet it is all good.
    But.. when it is connected through a HTTP Proxy that requires authentication I get a Java popup box asking for the Proxy's Username/Password.
    See image here: http://peterdamen.com/JavaProxyPopup.png
    I just want to suppress this popup. It pops up in the middle of a java routine, which suspends execution and then ruins javascript that communicates with the applet in the host HTML page.
    Any ideas?
    Thanks.
    Peter

    Did you ever get this figured out? I have the same issue. Thanks.

  • Https proxy authentication

    I have a strange behaviour while browsing with Safari:
    I'm located behind a proxy server which requires authentication. For all http requests, everything works perfect, at the first access ever, Safary asked me to supply username and pasword for the proxy, I've chosen to save the password in my key chain and was never asked again for the pasword.
    For https requests, Safari asks at least one time per request to put in my proxy username and password. Sometimes, it seems that Safari asks for each single object on a web pagefor the proxy credentials.
    I've tried to narrow down the effect and it seems, that this is related to WebKit. If I use Firefox, it asks me only once to put in the proxy credentials and that's it. With OmniWeb (which is also based on WebKit) I have the same problem as in Safari.
    Has somebody got the same effect or even has a solution for that?
    Thanks,
    Frank
    MacBook Pro   Mac OS X (10.4.8)   15 inch, Core 2 Duo, 200GB HDD

    I have the same problem:
    I have to connect to a https url to post a string (and read the answer: OK or KO).
    The problem is that I have to set up this with jdk 1.2, so:
    - I download jsse 1.03
    - I set up the provider statically inside java.security
    (security.provider.2=com.sun.net.ssl.internal.ssl.Provider)
    - I use the code:
    System.setProperty("https.proxyHost","proxy");
    System.setProperty("https.proxyPort","80");
    System.setProperty("https.proxyUser","user");
    System.setProperty("https.proxyPassword","password");
    String password = "user:password";
    String encodedLogin = new sun.misc.BASE64Encoder().encodeBuffer(password.getBytes());
    System.setProperty("https.agent", "JSSE\n\rProxy-Authorization: "+encodedLogin+"\n\r");
    URL url = new URL(urlString);
    HttpsURLConnection connection = (HttpsURLConnection)url.openConnection();
    connection.setRequestProperty("Proxy-Authorization", "Basic " + encodedLogin);
    //connection.connect();
    connection.setDoInput( true );
    connection.setDoOutput( true );
    connection.setAllowUserInteraction(false);
    //URLConnection connection = new HttpsURLConnection(url);
    InputStream inStream = connection.getInputStream();
    When I call the getInputStream() I get the exception:
    java.io.IOException: Unable to tunnel through XX.XY.ZX.WW:80. Proxy returns "HTTP/1.1 407 Proxy Access Denied
    How can I authenticate to the proxy? The previos tips doesn't works ...
    Any suggest?

  • Proxy authentication error on Win7

    I used Itunes 11.0.2 on win7 until yesterday without problem.
    Yesterday I changed my proxy password on Windows and Itunes stop working on Internet.
    Itunes doesn't ask me more Proxy login mask.

    Hi.
    If this hasn't been resolved yet, try the solution provided by MonkeyMan1357 here: https://discussions.apple.com/message/20565913#20565913
    Basically, you want to edit / or delete the keychain.plist file located in the user profile folders ( C:\Users\<username>\AppData\Roaming\Apple Computer\Preferences\keychain.plist )
    Message was edited by: IcI2

  • Http proxy authentication

    hi
    Could any body tell me how to connect to a resource outside
    firewall.I know about the system properties namely httpProxyPort and
    httpProxyHost.But can somebody tell me about the how to authenticate from the application.Note i am not using a browser based client.
    Thanks in advance
    Kappu

    can anyone tell me how to do proxy authetication if NTLM authorization is involved...i wrote a java client that is behind MS Proxy server and hence facing problem in establishing connection with sites...i am getting UnknownHost Exception when i try to call conn.connect() i think it's due to NTLM protocol..Can any one help me in this.
    Thanks in advance
    mano

  • HTTP XML Data Source authentication error

    Morning All,
    I have just started playing around with using XML as a data source for my CR4Ev2.0.1 reports.
    I have managed to create the local inline reports and change their data source loacation with no current
    issues.
    I am now trying to create the HTTPXML reports using code from Ted's BLOG.
    I manage to create a new report, and can open it in design, I can see the data source structure but as
    soon as I try browse the data or preview my report I get the following error
    Cannot Open file
    Server returned HTTP response code: 407 for URL:
    http://myserver/httpxml.xml
    I had a quick look up the 407 error and it seems to be a Proxy authentication error, we do have a proxy
    server setup which requires a username and password.
    Before I go through what I have tried I want to confess that for this httpxml.xml file all I did was take my
    inline.xml file and rename it and make it avaliable via a URL. So this might be the whole problem but I
    am sure this is ok.
    So I have tried turning off the proxy server as this URL is local so I dont need to go through the proxy.
    If I go to the URL in my browser it works fine and I do not need to enter any proxy details.
    Thats the problem with my HTTP XML attempt.
    If I use the code as is, from Ted's BLOG, for
    Crystal Reports off of HTTP XML data URL
    and try use the following 2 URLs
    propertyBag.put(
    "Http(s) XML URL", "http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/orders.xml");
    propertyBag.put(
    "Http(s) Schema URL", "http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/orders.xsd");
    propertyBag.put(
    "Http(s) XML URL", "http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/customer.xml");
    propertyBag.put(
    "Http(s) Schema URL", "http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/customer.xsd");
    But I get the following errors
    Exception in thread "main" com.crystaldecisions.sdk.occa.report.lib.ReportSDKLogonException: Logon
    Error: {0}---- Error code:-2147217393 Error code name:dbLogonFailed
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.byte(Unknown
    Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.addTable(Unknown
    Source)
         at com.businessobjects.samples.CreateHttpXML.main(CreateHttpXML.java:90)
    Caused by: com.crystaldecisions.reports.common.LogonFailureException: Logon Error:{0}
         at com.crystaldecisions.reports.queryengine.Connection.br(Unknown Source)
         at com.crystaldecisions.reports.queryengine.Connection.bs(Unknown Source)
    Any ideas as to what my issues are or what I am missing.
    Thanks in advance.
    Darren
    Edited by: Darren Jackson on Apr 28, 2009 2:12 PM
    Is there any documentation as to what entries I can use in the property bag.
    Like is there a ("ProxySet", false) or something along those lines?
    Edited by: Darren Jackson on Apr 28, 2009 5:28 PM
    I have made a little more head way.
    I saved the Orders.xml and Orders.xsd files onto my webserver and editied the code to only worry about
    the Orders and ignore the Customer files.
    I now create my reports, open them in Eclipse to design them, but when I try preview the data it is now
    asking me for a username and password. I have tried all combinations that I can think of for our systems
    but none work.
    Grrrrrrrrrrrrrrr

    I have subsequently determined that my main problem was my "cached" proxy settings within Eclipse.
    Even though I removed the proxy settings in Eclipse, it still required me to restart Eclipse after which it
    all started working ok.
    That was my main problem, but I am still interested in the Property Bag options that I mentioned before.
    If proxy settings are needed, how would one go about setting these details?
    Thanks
    Darren

  • This is already a proxy session Error

    Hello,
    I've been trying to get the proxy user working properly using the Server Session Uses Main Connection and Each Client Session Uses a Separate Pooled Nonexclusive Proxy Connection configuration.
    Things were sort of working when I was using the native data source. By sort of working I mean the writes to the database were sent via the proxied connection, the way they were supposed to. However, there was no connection pool used and performance was VERY BAD. I switched to a connection pool, but now I get the exception below. I am also attaching other relevant code. I use Spring with the ToplinkTransactionController. The exception occurs when I try to do an update (in a transaction) selects work fine. Any ideas?
    Thanks.
         @Override
         public void preLogin(SessionEvent event) {
              System.out.println("preLogin");
              Session session = event.getSession();
              DatasourceLogin login = (DatasourceLogin) session.getDatasourceLogin();
              // Make sure that external connection pooling is used
              login.setUsesExternalConnectionPooling(true);
              login.setTableQualifier(getSchemaName());
              login.setConnector(new OracleJDBC10_1_0_2ProxyConnector(
                        ((JNDIConnector) login.getConnector()).getName()));
         @SuppressWarnings( { "deprecation", "unchecked" })
         @Override
         public void postAcquireClientSession(SessionEvent event) {
              System.out.println("postAcquireClientSession");
              ClientSession cs = (ClientSession) event.getSession();
              ConnectionPolicy policy = cs.getConnectionPolicy();
              // The Client Session will connect using the pool with the same name as
              // proxy user
              policy.setPoolName(getProxyForUser());
              ServerSession ss = cs.getParent();
              // if the pool doesn't exist, create and start up it
              ConnectionPool pool = ss.getConnectionPool(getProxyForUser());
              if (pool == null) {
                   System.out.println("creating new pool for " + getProxyForUser());
                   // Clone serverSession's login - the clone will be used by the new
                   // connection pool
                   DatasourceLogin login = (DatasourceLogin) ss.getLogin().clone();
                   login.setTableQualifier(getSchemaName());
                   // set proxy properties in the login
                   login.setProperty("proxytype", Integer
                             .toString(OracleConnection.PROXYTYPE_USER_NAME));
                   login.setProperty(OracleConnection.PROXY_USER_NAME,
                             getProxyForUser());
                   // create the new pool
                   pool = new ExternalConnectionPool(getProxyForUser(), login, ss);
                   ss.getConnectionPools().put(getProxyForUser(), pool);
                   // start it up
                   pool.startUp();
    from sessions.xml:
    <server-platform xsi:type="oc4j-1013-platform">
    <enable-jta>false</enable-jta>
    </server-platform>
    [TopLink Finer]: 2006.10.02 09:38:00.983--ServerSession(33147961)--Thread(Thread[ApplicationServerThread-4,5,RequestThreadGroup])--client acquired
    06/10/02 21:38:00 postAcquireClientSession
    [TopLink Finer]: 2006.10.02 09:38:02.225--ClientSession(24564705)--Thread(Thread[ApplicationServerThread-4,5,RequestThreadGroup])--acquire unit of work: 6768086
    [TopLink Finer]: 2006.10.02 09:38:02.315--ClientSession(24564705)--Connection(19039521)--Thread(Thread[ApplicationServerThread-4,5,RequestThreadGroup])--begin transaction
    [TopLink Finest]: 2006.10.02 09:38:02.315--ClientSession(24564705)--Thread(Thread[ApplicationServerThread-4,5,RequestThreadGroup])--reconnecting to external connection pool
    [TopLink Warning]: 2006.10.02 09:38:02.335--ClientSession(24564705)--Thread(Thread[ApplicationServerThread-4,5,RequestThreadGroup])--Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: This is already a proxy sessionError Code: 17149
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:276)
         at oracle.toplink.platform.database.oracle.OracleJDBC10_1_0_2ProxyConnector.connect(OracleJDBC10_1_0_2ProxyConnector.java:70)
         at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:147)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:197)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:221)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:400)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1181)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:184)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.beginTransaction(DatasourceAccessor.java:122)
         at oracle.toplink.publicinterface.Session.basicBeginTransaction(Session.java:303)
         at oracle.toplink.threetier.ClientSession.basicBeginTransaction(ClientSession.java:105)
         at oracle.toplink.publicinterface.Session.beginTransaction(Session.java:398)
         at oracle.toplink.publicinterface.UnitOfWork.beginTransaction(UnitOfWork.java:412)
         at oracle.toplink.publicinterface.UnitOfWork.beginEarlyTransaction(UnitOfWork.java:402)
         at org.springframework.orm.toplink.TopLinkTransactionManager.doBegin(TopLinkTransactionManager.java:312)
         at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:283)
         at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:226)
         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:89)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
         at $Proxy6.updateDmdMapAndText(Unknown Source)
         at com.teammeta.dmdeditor.backing.DmdEditorSession.saveFormAction(DmdEditorSession.java:249)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfdemo.view.faces.webapp.RedirectFilter.doFilter(RedirectFilter.java:85)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: This is already a proxy session
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240)
         at oracle.jdbc.driver.PhysicalConnection.openProxySession(PhysicalConnection.java:1518)
         at oracle.jdbc.OracleConnectionWrapper.openProxySession(OracleConnectionWrapper.java:155)
         at oracle_jdbc_driver_LogicalConnection_Proxy.openProxySession()
         at oracle.toplink.platform.database.oracle.OracleJDBC10_1_0_2ProxyConnector.connect(OracleJDBC10_1_0_2ProxyConnector.java:68)
         ... 50 more
    [TopLink Finer]: 2006.10.02 09:38:02.415--UnitOfWork(6768086)--Thread(Thread[ApplicationServerThread-4,5,RequestThreadGroup])--release unit of work
    [TopLink Finer]: 2006.10.02 09:38:02.415--ClientSession(24564705)--Thread(Thread[ApplicationServerThread-4,5,RequestThreadGroup])--client released
    2006-10-02 21:38:02.415 WARNING J2EE DS265 Unclosed connection detected : 'oracle_jdbc_driver_LogicalConnection_Proxy@1342a0b' : ''.
    06/10/02 21:38:02 org.springframework.transaction.CannotCreateTransactionException: Could not open TopLink Session for transaction; nested exception is Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: This is already a proxy sessionError Code: 17149
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: This is already a proxy sessionError Code: 17149
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:276)
         at oracle.toplink.platform.database.oracle.OracleJDBC10_1_0_2ProxyConnector.connect(OracleJDBC10_1_0_2ProxyConnector.java:70)
         at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:147)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:197)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:221)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:400)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1181)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:184)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.beginTransaction(DatasourceAccessor.java:122)
         at oracle.toplink.publicinterface.Session.basicBeginTransaction(Session.java:303)
         at oracle.toplink.threetier.ClientSession.basicBeginTransaction(ClientSession.java:105)
         at oracle.toplink.publicinterface.Session.beginTransaction(Session.java:398)
         at oracle.toplink.publicinterface.UnitOfWork.beginTransaction(UnitOfWork.java:412)
         at oracle.toplink.publicinterface.UnitOfWork.beginEarlyTransaction(UnitOfWork.java:402)
         at org.springframework.orm.toplink.TopLinkTransactionManager.doBegin(TopLinkTransactionManager.java:312)
         at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:283)
         at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:226)
         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:89)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
         at $Proxy6.updateDmdMapAndText(Unknown Source)
         at com.teammeta.dmdeditor.backing.DmdEditorSession.saveFormAction(DmdEditorSession.java:249)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfdemo.view.faces.webapp.RedirectFilter.doFilter(RedirectFilter.java:85)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: This is already a proxy session
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240)
         at oracle.jdbc.driver.PhysicalConnection.openProxySession(PhysicalConnection.java:1518)
         at oracle.jdbc.OracleConnectionWrapper.openProxySession(OracleConnectionWrapper.java:155)
         at oracle_jdbc_driver_LogicalConnection_Proxy.openProxySession()
         at oracle.toplink.platform.database.oracle.OracleJDBC10_1_0_2ProxyConnector.connect(OracleJDBC10_1_0_2ProxyConnector.java:68)
         ... 50 more

    It's a known problem. Proxy Authentication error - "This is already a proxy session" describes the workaround.

  • How to configure HTTP Proxy

    I want XE to validate DTD references made in XML schema definitions. Metalink note 262708.1 refers to setting HTTP_PROXY environment variable/Registry value to do this through corporate firewalls.
    Can I set this in XE? If so, how is it done on Windows XP?

    OK, for the record I set the HTTP_PROXY value in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_XE to
    http://<username>:<password>@<http.proxy.server>:<port>
    which seemed to do the trick as far as basic MS HTTP/proxy/authentication is concerned. The proxy software/configuration thereon is another matter...

Maybe you are looking for

  • Adobe Interactive Form Shows Blank (WD JAVA ZCI)

    Hi Expert, I have the following problem. I developed an Adobe interactive Form embebed in WD java app with success in DEV environment, but i have an issue in QA environment. When i run the Adobe Form logged in portal, the application runs fine, but,

  • How to get the no of attachments in email using objective-c?

    HI am new to iphone programming,i am trying app in which i want to get the no of attachments a particular email contains.I got the individual attachment showing but i need the more than one attachment so if anyone knows about it please help me.

  • How can I reinstall deleted free Apps which now show as installed but are not actually there?

    How can I reinstall free Apps that I have deleted (because ALL stopped working) which now show as installed but are not actually there? I loaded a bunch of free Apps (maybe too many?) right after I got my 4s yesterday, and at some point I noticed tha

  • SSL, POP3, and SMTP

    I keep getting emails from about setting SSL settings for POP3 and SMTP.  I have it configured on my main email settings for my client.  Do I have to set it as well for my Blackberry? And if so how? Solved! Go to Solution.

  • Imovie 08 - Slow motion effect

    I have looked through the video and PDF tutorials and cannot see how to put my clips into slow motion. This is addressed in the tutorials for earlier IMovie editions (i.e, Lesson 4 - Motion Effects), but I can't find anything in the video tutorial th