3 Replies Latest reply on Oct 27, 2009 10:08 AM by rareddy

    Socket Timeout?

      I'm just full of questions.

      I've got Teiid 6.2 running as a server (on a Solaris 10 machine) and fired up the adminshell tool in my local workstation (Windows XP).

      Something strange is going on. Once I connect, I get this error message in adminshell after about 5 minutes regardless of whether I do anything or not (note: I have the org.teiid logger set to DEBUG):

      Exception in thread "SocketPing" java.net.SocketException: Socket
      
      closedjava.net.SocketException: Socket closedjava.net.SocketException: Socket
      
      closedSocket closed
       at com.metamatrix.client.ExceptionUtil.convertException(ExceptionUtil.java: 75)
       at
      
      com.metamatrix.common.comm.platform.socket.client.SocketServerInstanceImpl$RemoteInvocati
      
      onHandler.invoke(SocketServerInstanceImpl.java:342)
       at $Proxy0.logoff(Unknown Source)
       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:597)
       at
      
      com.metamatrix.common.comm.platform.socket.client.SocketServerConnection$ServerConnection
      
      InvocationHandler.invoke(SocketServerConnection.java:218)
       at $Proxy0.logoff(Unknown Source)
       at
      
      com.metamatrix.common.comm.platform.socket.client.SocketServerConnection.shutdown
      
      (SocketServerConnection.java:258)
       at
      
      com.metamatrix.common.comm.platform.socket.client.SocketServerConnection.shutdown
      
      (SocketServerConnection.java:248)
       at
      
      com.metamatrix.common.comm.platform.socket.client.SocketServerConnection$1.run
      
      (SocketServerConnection.java:113)
       at java.util.TimerThread.mainLoop(Timer.java:512)
       at java.util.TimerThread.run(Timer.java:462)
      Caused by: com.metamatrix.common.comm.exception.SingleInstanceCommunicationException:
      
      java.net.SocketException: Socket closed
       at
      
      com.metamatrix.common.comm.platform.socket.client.SocketServerInstanceImpl.send
      
      (SocketServerInstanceImpl.java:179)
       at
      
      com.metamatrix.common.comm.platform.socket.client.SocketServerInstanceImpl$RemoteInvocati
      
      onHandler.invoke(SocketServerInstanceImpl.java:330)
       ... 12 more
      Caused by: java.util.concurrent.ExecutionException: java.net.SocketException: Socket
      
      closed
       at com.metamatrix.dqp.client.ResultsFuture.convertResult(ResultsFuture.java:94)
       at com.metamatrix.dqp.client.ResultsFuture.get(ResultsFuture.java:89)
       at
      
      com.metamatrix.common.comm.platform.socket.client.SocketServerInstanceImpl.send
      
      (SocketServerInstanceImpl.java:176)
       ... 13 more
      Caused by: java.net.SocketException: Socket closed
       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)
       at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
       at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
       at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
       at java.io.DataOutputStream.flush(DataOutputStream.java:106)
       at org.teiid.netty.handler.codec.serialization.ObjectEncoderOutputStream.flush
      
      (ObjectEncoderOutputStream.java:71)
       at
      
      com.metamatrix.common.comm.platform.socket.client.OioOjbectChannelFactory$OioObjectChanne
      
      l.write(OioOjbectChannelFactory.java:142)
       at
      
      com.metamatrix.common.comm.platform.socket.client.SocketServerInstanceImpl.send
      
      (SocketServerInstanceImpl.java:175)
       ... 13 more
      


      Once this happens, the connection is closed and any attempt to re-connect gives me the message "Failed to connect: (Timer already connected.)"

      What am I doing wrong?

      I don't know if it's relevant, but I've also noted that when I run my test JDBC query program, I get my results back, but this message shows up in the teiid.log file (again, I have the logger level set to DEBUG):

      java.io.IOException: Connection reset by peer
       at sun.nio.ch.FileDispatcher.read0(Natve Method)
       at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
       at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
       at sun.nio.ch.IOUtil.read(IOUtil.java:206)
       at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
       at org.jboss.netty.buffer.HeapChannelBuffer.setBytes(HeapChannelBuffer.java:163)
       at org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes
      
      (AbstractChannelBuffer.java:429)
       at org.jboss.netty.channel.socket.nio.NioWorker.readIntoHeapBuffer
      
      (NioWorker.java:282)
       at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys
      
      (NioWorker.java:254)
       at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:163)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
      
      (ThreadPoolExecutor.java:886)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run
      
      (ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:619)
      


      Any help would be appreciated.

        • 1. Re: Socket Timeout?
          rareddy

          Nestor,

          You can pay us back by either writing blog about Teiid and/or write a article about your usecase with Teiid and how it helped out. Also you can help with patches, docs or answering forum questions when you know, and also participating in our dev discussions as to what you think of the features as target user. All these help. So, please HELP.

          Check if this property is commented out in deploy.properties

          #session.expirationTimeInMilli=86400000
          


          The above property tells as how long a session can be active. Also, are you working with 6.2 release for any mile stone? I know we fixed a bug as part of https://jira.jboss.org/jira/browse/TEIID-666


          • 2. Re: Socket Timeout?

            Heh. You don't ask for much. ;-)

            I'll try my best to contribute. I'm a big fan of MetaMatrix and certainly want to help the software to grow and develop.

            At a general level, I'm a long-time MetaMatrix developer/user/admin supporting the software for several customers in a secure environment. I'm looking on how to migrate the current customers to using Teiid.

            As to the specific situation, I checked the deploy.properties and, yes, the property is commented out. The documentation states "(default unlimited, default is 86400000 - 24hrs)"

            I'm assuming that means that when commented out, sessions are not timed out and that the default given when not commented out is 24 hours.

            • 3. Re: Socket Timeout?
              rareddy

               

              "NestorDRod" wrote:
              Heh. You don't ask for much. ;-)

              I'll try my best to contribute. I'm a big fan of MetaMatrix and certainly want to help the software to grow and develop.

              You asked for it -:) Seriously we really want to hear from people who are solving interesting problems with Teiid solutions.


              "NestorDRod" wrote:
              I'm assuming that means that when commented out, sessions are not timed out and that the default given when not commented out is 24 hours.

              when commented the session must not timeout!. As I said there was bug fixed before final release of 6.2. If you still see the behaviour then open another JIRA on this please.