LDAP connection timeout exception - some times

Hi Team,
I'm using Ldap authentication for my web applications. Everything is working fine most of the times.
But ones in every 15 days or 10 days, I'm getting the connection timeout. But if I restart the tomcat then everything working fine. I couldn't find any
issues with my code. Can anyone please help me on this. below is my java code. I'm keeping all the ldap entries in tomcat's server.xml and getting them in my java code to avoid the hard
code configurations in my java code.
I'm closing the context and naming enumerations like below, but still getting javax.naming.CommunicationException: error.
Can anyone please help me out on this.
public boolean authenticateFromLdap(String username, String password)throws AuthenticationException,Exception {
    LdapContext ctx = null;
    Context newctx = new InitialContext();
    Context envCtx = (Context) newctx.lookup("java:comp/env");
    DirContext ctxDir = (DirContext)envCtx.lookup("ldap/myapp");
    NamingEnumeration<?> namingEnum = null;
    String userDN=null;
    boolean isauthenticated = false;
    try {
        Hashtable env = null;
        Control[] connCtls = null;
        env = ctxDir.getEnvironment();
        env.put(Context.REFERRAL, "follow");
        this.filter = (String)env.get("ldap.filter");
        this.base = (String)env.get("ldap.base");
        try {
            ctx = new InitialLdapContext(env, connCtls);
            ctx.setRequestControls(null);
        } catch (javax.naming.AuthenticationException ex) {
            throw new Exception("ldap.server.exception");
        } catch (Exception ex) {
            throw new Exception("ldap.server.exception");
        try {
            SearchControls searchControls = new SearchControls();
            searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE);
            searchControls.setTimeLimit(30000);
            String filter="("+this.filter+"="+username+")";
            ctx.setRequestControls(null);
            namingEnum = ctx.search(this.base, filter, searchControls);
            SearchResult result = (SearchResult) namingEnum.next();
            Attributes attrs = result.getAttributes();
            Attribute str1=attrs.get("userprincipalname");
            userDN=str1.get().toString();
            if(userDN==null){
                userDN=username;
            ctx.addToEnvironment(Context.SECURITY_PRINCIPAL,userDN);
            ctx.addToEnvironment(Context.SECURITY_CREDENTIALS,password);
            ctx.reconnect(connCtls);
            isauthenticated = true;
        }catch (AuthenticationException ex) {
            throw new AuthenticationException();
        }catch (NamingException ex) {
            throw new Exception("ldap.server.exception");
        return isauthenticated;
    } finally {
        if (null != namingEnum) {
            try {
                namingEnum.close();
            } catch (Exception e) {
                throw new Exception("close.ldap.failure");
        if (null != ctx) {
            try {
                ctx.close();
            } catch (Exception e) {
                throw new Exception("close.ldap.failure");
}Tomcat (v6.0.14) server.xml:
                <Resource name="ldap/myapp"
                                                auth="Container"
                                                type="com.sun.jndi.ldap.LdapCtx"
                                                factory="com.myapp.MyLdapFactory"
                                                java.naming.factory.initial="com.sun.jndi.ldap.LdapCtxFactory"
                                                com.sun.jndi.ldap.connect.pool="false"
                                                java.naming.provider.url="ldap://ldap.com.test.net:389"
                                                java.naming.security.authentication="simple"
                                                java.naming.security.principal="MyAdmin"
                                                java.naming.security.credentials="xxxxxxx"
                                                ldap.base="DC=com,DC=test,DC=net"
                                                ldap.filter="sAMAccountName"
                />Below is the error log trace:
2013-Mar-26 12:01:34,714 AppUserDetailsService - javax.naming.CommunicationException: ldap.com.test.net:389 [Root exception is java.net.ConnectException: Connection timed out: connect]Note: Once we restart the tomcat, everything is working as usual and after 2 weeks again same problem occuring.
Ganesh
Edited by: EJP on 27/03/2013 14:26: added {noformat}{noformat} tags. Please use them. Your code is unreadable without them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

1. 'filter' and 'base' need to be local variables, not instance variables, otherwise the method isn't thread-safe.
2. It isn't clear that you are closing the search results or contexts if you get an exception, in all that spaghetti, especially the part where you just catch and rethrow exceptions, which is pointless. You need to rewrite that lot like this:
public boolean authenticateFromLdap(String username, String password) throws AuthenticationException, NamingException
     Context newctx = new InitialContext();
     try
          Context envCtx = (Context)newctx.lookup("java:comp/env");
          try
               DirContext ctxDir = (DirContext)envCtx.lookup("ldap/myapp");
               try
                    String userDN = null;
                    boolean isauthenticated = false;
                    Control[] connCtls = null;
                    Hashtable env = ctxDir.getEnvironment();
                    env.put(Context.REFERRAL, "follow");
                    String     filter = (String)env.get("ldap.filter");
                    String     base = (String)env.get("ldap.base");
                    LdapContext ctx = new InitialLdapContext(env, connCtls);
                    try
                         ctx.setRequestControls(null);
                         SearchControls searchControls = new SearchControls();
                         searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                         searchControls.setTimeLimit(30000);
                         filter = "(" + filter + "=" + username + ")";
                         ctx.setRequestControls(null);
                         NamingEnumeration<SearchResult> namingEnum = ctx.search(base, filter, searchControls);
                         try
                              SearchResult result = namingEnum.next();
                              Attributes attrs = result.getAttributes();
                              Attribute str1 = attrs.get("userprincipalname");
                              userDN = str1.get().toString();
                              if (userDN == null)
                                   userDN = username;
                              ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, userDN);
                              ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, password);
                              ctx.reconnect(connCtls);
                              isauthenticated = true;
                              return isauthenticated;
                         finally
                              namingEnum.close();
                    finally
                         ctx.close();
               finally
                    ctxDir.close();
          finally
               envCtx.close();
     finally
          newctx.close();
}Also, you are suppressing exceptions when you rethrow. Never do that. Always log the actual exception. But there aren't any exceptions here that need to be caught and rethrown.

Similar Messages

  • My ISP requires a http login. I can use the iPad fine if I am logged in on a PC connected to the same wifi network, but if I login on safari on my ipad, the connection drops after some time.. any workaround?

    My ISP requires a http login. I can use the iPad fine if I am logged in on a PC connected to the same wifi network, but if I login on safari on my ipad, the connection drops after some time.. any workaround?

    TJBUSMC1973 wrote:
    The iPhone is working, as designed and advertised.  In this case, the user failed to educate themselves properly, either by proper research or asking the right questions, before purchasing the device.
    I understand that the OP failed to do research. But then, I wasn't replying to the OP. I was replying to Chris. I have Verizon. I can talk and use data at the same time with my Droid Maxx. Therefore, the problem is not just with the network. It would be technically possible for an iPhone to do that on Verizon/Sprint if Apple had chosen to use a different chip, such as the kind other phone manufacturers have elected to use.
    Of course, this is probably all irrelevant to the OP's issue. It was merely a point of clarification, especially for those people who are used to being able to use both voice and data at the same time on Verizon. When they switch to an iPhone, they are often surprized at the limitation.
    Best of luck.

  • I can not connect to iswifter, some times it is connected and some time it shows " UNABLE TO CONNECT TO SERVER PLEASE CHECK THE INTERNET" but my internet connection is good and other wbe site i can open without any problem. Please guide  me..

    I can not connect to iswifter, some times it is connected and some time it is not connected and getting message " UNABLE TO CONNECT TO SERVER , CHECK YOUR INTERNET" but my internet connection is ok and I can open other web site with out any problem.  Please guide me how to solve this issue.

    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
     Cheers, Tom

  • Io exception: Connection reset - after some time interval

    Hi,
    We are facing a problem in connection while implementing connection pooling using OracleDataSource .
    Application is running with out any issue if it is called continuously.
    If we call the application after some time interval, connection is being reset. We are able to get the connection instance but connection reset exception is thrown while calling callableStatement.execute().
    If application called after application restart it is working fine.This issue is happening only for the first few calls made after some time interval.(after 1 hr)
    After that call is proceeding without any issue.
    Environment Details
    Application is accessing 4 oracle databases and the versions are viz., 9.2.0.8,10.2.0.3,10.2.0.4 and 9.2.0.1.
    Driver : ojdbc14.jar
    App Server : tomcat
    jdk version: 1.5
    OracleDataSource is being used for connection pooling.
    propCache.setProperty("ConnectionWaitTimeout",10); // caching parms
    ods.setConnectionCachingEnabled(true);
    ods.setLoginTimeout(intLoginTimeout);
    propCache.setProperty("MinLimit","5");
    propCache.setProperty("MaxLimit", "20");
    propCache.setProperty("InitialLimit","5");
    propCache.setProperty("ValidateConnection", "true");
    propCache.setProperty("AbandonedConnectionTimeout", "10");
    The exception details are as follows
    java.sql.SQLException: Io exception: Connection reset
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:987)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
    at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:4043)
    at oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(OraclePreparedStatement.java:10826)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3337)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3445)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:834)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
    at java.lang.Thread.run(Unknown Source)
    Any suggestion to resolve this issue is greatly appreciated.
    Thanks.

    Hi,
    try to utilize OracleDataSource#setConnectionCacheProperties() with property InactivityTimeout equals to 1800 (30 minutes in seconds).

  • Socket connection dies after some time being idle w/o firing event

    Hi,
    I use this code to connecto my server from my Client
              if (socket == null){
                   try{
                        if (pwd.length > 0)
                             System.out.println("opening connection...to "+host+" at port "+port);
                             socket = new Socket(host, port);          
                             toServer = new ObjectOutputStream(socket.getOutputStream());
                             fromServer = new ObjectInputStream(socket.getInputStream());
                             System.out.println("Connection established!");
                             fireClientEvent(new ClientEvent(this, ClientEvent.CONNECTION_ESTABLISHED, ""));
                             this.connected = true;
                             Hashtable<String, String> table = new Hashtable<String, String>();
                             table.put("action", "login");
                             table.put("key", convertToString(pwd));
                             sendObject(table);
                   }catch(IOException e){
                        try{
                             if (socket != null)
                                  socket.close();
                             System.out.println("Error while connecting... Server does not exist!");
                             this.connected = false;                         
                             fireClientEvent(new ClientEvent(this, ClientEvent.SERVER_DOES_NOT_EXIST, getHost()+":"+getPort()));
                        }catch(IOException x){
                             System.out.println("I/O ERROR @ CLIENT CONNECT!");
                             removeAllListeners();
                             x.printStackTrace();
              }And this is how my server responds to client requests:
         public void run()
              ServerSocket server = null;
              Socket socket           = null;
              Hashtable<String, String> ClientInfo = new Hashtable<String, String>(); 
              try{
                   server = new ServerSocket(getPort());
                   //listen for connections
                   while (!stopServer)
                        try{
                             System.out.println("Starting Server at port: "+getPort());
                             socket = server.accept();
                             ClientInfo.put("remoteip", socket.getInetAddress().toString());
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.CONNECTION_REQUESTED, null));
                             ThreadedSocket tsocket = getThreadedSocket(socket);
                             tsocket.addSocketListener(this);
                             tsocket.setMaxSolvingTime(maxSolvingTime);
                             Sockets.add(tsocket);
                             executor.execute(tsocket);
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.CONNECTION_ESTABLISHED, null));
                        }catch (IOException ioe){
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.UNEXPECTED_CONNECTION_ERROR, null));
                             exceptionThrown(ioe);
              }catch(Exception x){
                   exceptionThrown(x);
              }finally{
                   try{
                        server.close();
                        socket.close();
                   }catch (Exception e){
                        exceptionThrown(e);
         }It seems that after some time (aprox. 10-15 minutes) being idle, my client gets disconnected withougt firing any event so the Server thinks the client is still connected but it does not get any messages because the client has closed the connection (I think)
    Am I doing/thinking something wrong?

    Thanks It seems that I am doing something completely wrong.
    I created this object:
    package main;
    import java.util.Hashtable;
    import java.util.Vector;
    public class SocketPinger implements Runnable {
        private Vector<ThreadedSocket> sockets = null;
        Hashtable<String, Object> action = new Hashtable<String, Object>();
        public SocketPinger()
            action.put("action", "scheduled_ping");
        public SocketPinger(Vector<ThreadedSocket> socks)
            this.sockets = socks;
            action.put("action", "scheduled_ping");
        public void run()
             process();
        public void process()
             if (sockets != null)
                  for (ThreadedSocket socket : this.sockets)
                       try
                            socket.sendObject(action);
                       }catch(Exception e){
                            sockets.remove(socket);
        public void setSockets(Vector<ThreadedSocket> socks)
             this.sockets = socks;
    }which I call with this command:
         public class ThreadScheduler
             private SocketPinger pinger;
             private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
             public void activate()
                 pinger = new SocketPinger(Sockets);
                 scheduler.scheduleWithFixedDelay (pinger, 5, 10, TimeUnit.SECONDS);            
             public void deactivate() {
                 scheduler.shutdown();
         }This makes the Scheduler object wake up every 10 secs and ping all the clients. This works and since then everything seemed to work fine. Today I noticed that when I shut down the client abnormaly (System.exit(0);) the server doesn't understand it. The sendObject() method works fine.
    This is my ThreadedSocket with the sendObject() method:
    public class ThreadedSocket extends Thread
         protected Socket socket;     
         protected ObjectOutputStream toClient;
         protected ObjectInputStream fromClient;
         protected ConnectionPool Pool;
         protected DBManager db;
         public ThreadedSocket(Socket sock, int priority, ConnectionPool pool) throws IOException
              socket = sock;
              this.Pool = pool;
              toClient = new ObjectOutputStream(socket.getOutputStream());
              fromClient = new ObjectInputStream(socket.getInputStream());                    
              setPriority(priority);     
              db = new DBManager(Pool);
         public void sendMessage(String message)
              try{
                   toClient.writeUnshared(message);
                   toClient.flush();
              }catch(Exception e){
         public void sendObject(Hashtable<String, Object> table)
              try{               
                   toClient.writeUnshared(table);
                   toClient.flush();
                   toClient.reset();
              }catch(Exception e){
         }and this is how I initialize the ThreadedSocket on my Server object
         public void run()
              ServerSocket server = null;
              Socket socket           = null;
              Hashtable<String, String> ClientInfo = new Hashtable<String, String>(); 
              try{
                   server = new ServerSocket(getPort());
                   //listen for connections
                   while (!stopServer)
                        try{
                             System.out.println("Starting Server at port: "+getPort());
                             socket = server.accept();
                             ClientInfo.put("remoteip", socket.getInetAddress().toString());
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.CONNECTION_REQUESTED, null));
                             ThreadedSocket tsocket = getThreadedSocket(socket);
                             tsocket.addSocketListener(this);
                             tsocket.setMaxSolvingTime(maxSolvingTime);
                             Sockets.add(tsocket);
                             executor.execute(tsocket);
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.CONNECTION_ESTABLISHED, null));
                        }catch (IOException ioe){
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.UNEXPECTED_CONNECTION_ERROR, null));
                             exceptionThrown(ioe);
              }catch(Exception x){
                   exceptionThrown(x);
              }finally{
                   try{
                        server.close();
                        socket.close();
                        if (scheduler != null)
                             scheduler.deactivate();
                   }catch (Exception e){
                        exceptionThrown(e);
              So I have to make this question unanswered, because it is actually partially answered. Although the server can wake up and ping the clients, I still find it difficult to see if the client really exists after some abnormal termination (i.e. computer dies, or sth similar).

  • Not able to connect to database some times

    some times i am not able to connect to my database via sqlplus.
    after entering this command, we don't receive any response. please help.
    -bash-3.2$ sqlplus
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jan 23 11:11:36 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter user-name: /as sysdba

    Hi Emran,
    Set sufficient value of processes/sessions in init/spfile of database , might be session limit of DB is getting exceeded & restricting new connection.
    Check alert log & below query o/p , CURRENT_UTILIZATION < MAX_UTILIZATION to get connection to DB
    select * from v$resource_limit;Also , try to connect as sqlplus prelim & do hang analyze , refer below link
    http://blog.tanelpoder.com/2012/05/08/oradebug-hanganalyze-with-a-prelim-connection-and-error-can-not-perform-hang-analysis-dump-without-a-process-state-object-and-a-session-state-object/
    sqlplus -prelim "/as sysdba"
    ORADEBUG HANGANALYZE 3Thanks,
    Ajay More
    http://www.moreajays.com

  • Connection timeout issues with Time Capsule

    I have a first generation 500 GB Time Capsule, with AT&T Uverse internet service.  The device worked fine up until 3 weeks ago, at which time I received a "connection timeout" error when trying to connect from any of the computers in the house.  At that time, the computers were showing that the wireless network was available, but I was just unable to connect.  I could connect to the device using the ethernet connection, and the wired computer would still successfully backup.
    I restarted the Time Capsule, and everything immediately returned to normal.  Everything worked fine for about a week, and then the problem occurred again.  The issue has been occurring more and more frequently, to the point that it now is only working for several hours before requiring a reset.
    Has anybody experienced anything similar to this?  Any thoughts on a solution to this?

    Hi I had similar problems. I moved houses got my own cable modem and tried to use the TC as my wireless, as i had it in my other home. The connection would drop constantly and i was unable to use the TC as a wireless device, it would also freeze my computer (mac book Pro). After asking everyone for help i found that when i moved the TC next to the cable modem in the garage it all worked. Apparently the ethernet cable that ran from the garage to the living room was only using 4 of the 8 pins and thus was dropping the connection. i am now connected directly from the modem to the tc and it has not failed yet (cross my fingers). After all this was suppose to be wireless and thus i don't need to have it right next to my computer. The signal is strong and it has not caused any problems. I didn't mess with the settings after i did a hard reset on the TC. So far so good. hopes this helps.

  • Connection timeout - every single time.

    I appreciate this question gets asked a lot and I've had a look through some responses to no avail.
    For the last 2 weeks or so, every time I've tried to connect to the iTunes store the connection has timed out.
    Same laptop for the last 2 and a half years, win7(64), itunes is allowed by firewall, tried flushing the DNS and I've tried changing the internet time settings.
    It works eventually after about 20 lengthy attempts at submitting the same request - so annoying.
    My internet connection is fine enough to browse, download etc etc...it's not the best but it's worked fine up until the last 2 weeks.
    Is this a bug or does anyone have any other suggestions?
    Any advice would be appreciated
    Thanks,
    Anthony

    I had something similar to this when setting up my two AEBS units. They were both cabled in to the same switch. When I was configuring them, once extending the network, I lost contact with the extender unit and couldn't see it until I pulled its Ethernet cable. Then I could see it via the first AEBS.

  • Odbc connection drops after some time over vpn -- help needed

    hi,
    sorry to tell u that i am not able to find the right suggestion/ solution in previous posts in this forum. my problem is like this:
    I am running oracle database (11g) on windows 2003 server. my oracle client (9i) is accessing database on that server. if the server is on a simple LAN, all the clients are able to login and the connection is lasting fine. recently, the server is configured in a VPN. now the clients are not able to sustain the connection for long time, the connection is getting dropped within minutes. whats the problem with VPN? even though the cluster configuration (VPN) is said to be done properly, whats going to be the problem?
    my client side application is with VC++ and using ODBC for accessing database. with oracle Net Configuration Assistant, the connection is working fine even on VPN, but when my application is trying to access the database over VPN, the connection seems to be intermoittent. please suggest me in this regard. thank you in advance.
    swamy.

    hi,
    sorry to tell u that i am not able to find the right suggestion/ solution in previous posts in this forum. my problem is like this:
    I am running oracle database (11g) on windows 2003 server. my oracle client (9i) is accessing database on that server. if the server is on a simple LAN, all the clients are able to login and the connection is lasting fine. recently, the server is configured in a VPN. now the clients are not able to sustain the connection for long time, the connection is getting dropped within minutes. whats the problem with VPN? even though the cluster configuration (VPN) is said to be done properly, whats going to be the problem?
    my client side application is with VC++ and using ODBC for accessing database. with oracle Net Configuration Assistant, the connection is working fine even on VPN, but when my application is trying to access the database over VPN, the connection seems to be intermoittent. please suggest me in this regard. thank you in advance.
    swamy.

  • Wireless connection lost after some time ?

    The wireless internet connection works just fine when browsing safari or the appworld, no problem at all...After locking the ipad and using it a few mins/hours later, I usually lose the internet connection. It says im connected but safari/appworld wont load unless I turn off the wireless connection or renew lease in the options.
    Can someone please tell me why is this happening ?? Its been happening since I got the ipad, so an app cant be the cause ..
    Please help !

    The router firmware has the latest version ... I dont think its something with the router, because I use my laptop wirelessly as well and I dont have such problems. My friend has an iPad 1 and he doesnt have the same problem as mine either ..
    Is there an app that can fix this ??? I thought it might be an email problem because my older Android phone usually lose connection when trying to fetch emails, so I activated PUSH function on the ipad, but that didnt fix the problem
    Please help !!

  • WebService Socket Timeout Exception before reaching timeout duration

    Hi
    My Server is Websphere Application Server 6.0.2.17
    i got some times socket timeout exception before reach timeout duration. and also i have only default websphere settings for web service .
    The exception is occurred in 19 seconds after hitting the service . i am not able to get the exact problem . because default timeout time is 300 seconds (i think like that)
    Error Log
    2/12/09 11:01:28:323 CET 00000f6a SystemOut O WebService Started --> Begin webservice method invocation (Method Name : getCustomerInfo(String cusID))
    2/12/09 11:01:47:840 CET 00000f6d SystemOut Exception Occurred : java.net.SocketTimeoutException: Socket operation timed out before it could be completed
    WebService Method Invocation Started time 11:01:28
    WebService Timeout exception raised time 11:01:47
    TimeoutDuration 00:00:19

    Hi Mark,
    with synchronous messages it is important to consider timeouts from each connection to be established. So soapUI-PI, then PI-BackendSystem plus anything that might be in between. If your timeout soapUI-PI is smaller than the following ones, you'll get that phenomenon. soapUI will cut the connection, but PI will hold it and maybe receive an answer from the backend. This answer will end up in the void, since the original requester (your soapUI) has already disconnected. But for PI, this will be OK and status "successful". PI does not control and monitor the client's connection.
    In other words, the cancel of the connection is only performed for that same connection, it is not propagated to any subsequent connections.
    Hope that I was clear enough,
    Jörg

  • Initermittent Connection Timeout at Post-Login when connect to AlwaysOn Availability Group listener

    Hi,
    I'm using SQL 2014 AlwaysOn Availability Group and my ASP .Net application is connected to the database thru the availability group listener (tcp:[myHAGroup],14330).
    Things work most of the time, but recently I started to see the following Connection Timeout exception in Event Log. It looks like under heavy traffic the application can't connect to the availability group listener.
    Timestamp: 8/17/2014 10:07:28 AM
    Message: System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=2; handshake=0; [Login] initialization=0; authentication=0; [Post-Login] complete=15008; ---> System.ComponentModel.Win32Exception: The wait operation timed out
    --- End of inner exception stack trace ---
    I've checked SQL Profiler and don't see any memory or CPU peak at that time. Looks like somethings happened during the Post-Login stage, but I couldn't figure out what or why....
    I'm using 2 SQL servers (1 primary, 1 secondary): SQL 2014 ENT, 8GB RAM, 8 core 2.67 Xeon X5650.
    Application: ASP .Net, framework 4.0.
    All servers are VMWare virtualization servers, running on 1 virtual switch, so internal traffic should not be a problem.
    Comments/ideas are appreciated.
    Eric.

    Hi Eric Nguyen,
    According to your description and error message, we need to verify if there are some queries/transaction lock your database via SQL trace. If yes,
     you have to find out which queries are blocking and rewrite them/run them at other time to avoid blocking other processes.
    In addition, you can use performance monitor to track connection pool connections. If you set default connection limit and timeout limit with a small number, the error of “wait operation timed out” will occur. Meanwhile, you also need to monitor disk usage
    on SQL Server , and set the auto increment size of your transaction log and database with a fixed size instead of a percentage of the current files due to avoid transaction timeout. For more information, see:
    http://stackoverflow.com/questions/7743725/how-to-troubleshoot-intermittent-sql-timeout-errors
    There is an similar issue about connection failed from webservers to SQL Server AlwaysOn Listener, you can review it.
    http://stackoverflow.com/questions/23416492/connection-timeouts-when-using-multisubnetfailover-true
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Possible to configure per connection timeout values?

    hi,
    please, does anybody know how (or whether or not it is even possible) to configure a "PER CONNECTION" timeout on the connections - created by jndi - to an ldap server?
    my understanding is that setting the "com.sun.jndi.ldap.connect.timeout" property on the javax.naming.directory.InitialDirContext sets a _global_ timeout value for _all_ connections created/managed by that InitialDirContext (that is, with a "PER CONTEXT" scope).
    however, what i would like to do instead, is somehow configure a different timeout value for each individual connection that a InitialDirContext might know about.
    the first solution that will probably pop in your head is "connection pool". however, the app sets "java.naming.ldap.factory.socket" property to a custom socket factory class. according to the following paragraph from the jndi tutorial, that disqualifies the app from using connection pools:
    "There are a couple of environment properties that automatically disqualify a Context instance from using a pooled connection. A Context instance cannot use a pooled connection if it has its "java.naming.ldap.factory.socket" property set to a custom socket factory class, or its "java.naming.security.sasl.callback" property set to a custom callback handler class, or its "com.sun.jndi.ldap.trace.ber" property set to enable protocol tracing."
    http://java.sun.com/products/jndi/tutorial/ldap/connect/config.html
    even if we could use connection pools, we still wouldn't be able to set "per connection" timeout values. would we?
    one proposed solution is to completely rip out jndi from the app and replace it with the netscape directory sdk for java. to me, that seems like too drastic a measure though - given the project's time-constraints (the way the app was originally designed does not lend itself to a straight-forward "pop-out/drop-in" type replacement). i was hoping there would be a simpler alternative (a jndi-based configuration type solution, for example).
    any suggestions would be gratefully appreciated. thanks in advance for your replies.

    Enable the Default Host option in the AirPort Admin Utility, use the IP address you have assigned to your server.

  • Connection timeout in web service calls

    Hi,
    We have a clustered weblogic 10gR3 environment where two nodes are for ILOG rule engine, two nodes for Oracle BPM engine and four nodes for Oracle BPM workspace. All the webserices calls are SOAP over HTTP. All the webservices to rule engine and DBAdapter are hosted on Oracle Service Bus. Some of the webservice calls when invoked throw a connection timeout exception. Can any one help on how to debug this or the possible causes for this scenario? The same webservice call when invoked or retried after a few minutes is working fine. Below is the stack trace:
    Stacktrace: java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at sun.reflect.GeneratedMethodAccessor212.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
         at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
         at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
         at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
         at org.apache.axis.client.Call.invoke(Call.java:2748)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:2347)
         at org.apache.axis.client.Call.invoke(Call.java:1804)
         at fuego.soaptype.SoapCall.invoke(SoapCall.java:234)
         at fuego.soaptype.SoapObject.invoke(SoapObject.java:309)
         at fuego.lang.Invokeable.invokeImpl(Invokeable.java:234)
         at fuego.lang.Invokeable.invokeDynamic(Invokeable.java:188)
         at xobject.EDP.EDP.EDPObject.helpBusinessRules(EDPObject.xcdl:59)
         at oracle.EDPPROCESS.Default_6_6.Instance.CIL_checkRTDIInformation(Instance.xcdl:12)
         at oracle.EDPPROCESS.Default_6_6.Instance.CIL_checkRTDIInformation(Instance.xcdl)
         at sun.reflect.GeneratedMethodAccessor7653.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at fuego.server.execution.EngineExecutionContext.invokeMethodAsCil(EngineExecutionContext.java:1083)
         at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1278)
         at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.runCil(ComponentExecutionMicroActivity.java:126)
         at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.execute(ComponentExecutionMicroActivity.java:84)
         at fuego.server.execution.microactivity.MicroActivityEngineExecutionHandler.executeActivity(MicroActivityEngineExecutionHandler.java:57)
         at fuego.server.execution.ImmediateActivity.execute(ImmediateActivity.java:42)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
         at fuego.transaction.TransactionAction.startNestedTransaction(TransactionAction.java:527)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:548)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:62)
         at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
         at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:261)
         at fuego.ejbengine.ItemExecutionBean$1.execute(ItemExecutionBean.java:223)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
         at fuego.ejbengine.ItemExecutionBean.processMessage(ItemExecutionBean.java:209)
         at fuego.ejbengine.ItemExecutionBean.onMessage(ItemExecutionBean.java:120)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233)
         at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709)
         at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    EJP, thanks for confirming that the generated code is incorrect and that the finally block should be used.
    Jschell, thanks for the suggestions and the trust in my technical skills... though writing my own generator seems a bit of too great enterprise for me haha!
    The generator is not open source so I cannot modify it and using another one is not an option as it is the "standard" in the company.
    In the end I decided for writing a post processor (in the form of a JDeveloper extension) to fix the code after it is generated. I will also probably be filing a bug for it with Oracle.
    Cheers,
    Luis

  • OAS 10.1 3.1 0 OC4J JDBC Connection/Timeout settings

    I am fairly new to OAS, and am trying to resolve a intermitent issue,
    I have an OAS 10.1.3.1.0 with a deployed EAR file I was provided by a supplier containing mainly PL/SQL based logic, which configured the OAS to ask a middle tier for a an external to pass data to it via Stored Procedure and then usiing the deployed package connect to an external Oracle DB and insert the data.
    Oas is running on a Windows 2003 platform that has no problems or connectivity problems, how ever intermittenlt the OAS stops uploading data to the external Oracle DB. Some custom external logging details this as a communication at the time it occurs, how ever there are no comms issues. A quick restart of the OAS windows service resolves the issue.
    Apart from upgrading OAS to patch set 5, the only other thing I considered could be causing the issue is how OAS is handling the session timeout or connection pool.
    I can see the following settings for the JDBC connection I am using, I wondered if anyone could advise anything that could be changed? I am not sure the implications on setting the validate connection to True and also not sure why maximum number of connections is set to -1?
    Connections
    Initial size of Connection Cache
    Minimum Number of Connections
    Maximum Number of Connections
    Connection Retry Interval (seconds)
    Maximum Connection Attempts
    Maximum Number of Statements Cached
    Lower Threshold Limit On Pool (%)
    Defaults to 20% of max connections.
    Validate Connection FalseTrue
    Timeouts
    Inactivity Timeout (seconds)
    Time that an unused connection is inactive before it is removed from the pool.
    Wait For Used Connection Timeout (seconds)
    Maximum time to wait for a used connection to be released.
    Max Active Time for a Used Connection (seconds)
    Maximum time a used connection may be active.
    Abandoned Connection Timeout (seconds)
    Enforce Timeout Limits Interval (seconds)
    Any help would be appreciated

    Hi,
    Along with Priya's suggestions, please refer the link below for the details on the parameters.
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b28958/datasrc.htm#CHDCFCHB
    Hope this will help understand all the parameters.
    Also refer,
    What Should Be My Maximum Connection Pool Size? [ID 1061155.1]
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.html
    Regards,
    Mithun

Maybe you are looking for

  • Video capture setup to external drive

    hi guys, I'm a new FCP user, my Canon XL2 is about to arrive any day and I understand I'll need an external drive to prevent screwing up my internal drive. Maxtor has been recommended and has been reliable I see so I'm looking at one of those, but I'

  • SONG WONT PLAY ON ITUNES

    on march 24th i believe or recently i purchased the new KIP MOORE CD. and it is amazing. and been listening to it non stop ever since. well just last night when i was listening to the cd on my ipod i realized the first song kept getting skipped. so w

  • Macbook Retina HDMI to VGA

    I'm looking for the best solution to connect my Macbook Retina to VGA projectors at work.  I see two adapters on the Apple store both with bad reviews.  Has anyone had good sucess with any adapters that go from HDMI to VGA? Thanks

  • MAC MINI AND MB

    does anyone currently have the Intel Mac Mini Core Solo with upgraded RAM and the MacBook (1.83 GHz) with extra RAM??? if so, how much faster is the MB than the mac mini, because i still have a week to decide if i want to return the mac mini

  • How to post down Payments through Transaction F110?

    Hello could you please help me in knowing the procedure for making downpayments through F110?