0 Replies Latest reply on Feb 9, 2004 11:28 PM by aczezowski

    Problems with closing OIL socket connection with SSl

    aczezowski Newbie

      I have configured JBossMQ to use SSL on OIL IL. The whole setup
      works well except warning I get about "Connection failure during connection
      close on [OILServerILService]. Is this bug or have I missed somthing
      in my configuration.

      The JBoss 3.2.3 server starts without problems but with some warnings as per included conslole output:

      ...
      14:11:29,039 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class loader:org.jboss.web.tomcat.tc4.WebCtxLoader
      $ENCLoader@e265d0
      ...
      14:11:31,651 WARN [Heartbeat] Heartbeat disabled
      ...
      14:11:39,884 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class loader:org.jboss.web.tomcat.tc4.WebCtxLoader
      $ENCLoader@4e17f9
      ...
      After successful sending messages from client on separate host I get following on the jboss console for each connection I close :
      ...
      14:12:44,312 WARN [OILServerILService] Connection failure during connection close.
      java.net.SocketException: Socket closed
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
      at com.sun.net.ssl.internal.ssl.AppOutputStream.flush(DashoA6275)
      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:128)
      at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1583)
      at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:639)
      at java.io.ObjectOutputStream.close(ObjectOutputStream.java:660)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:406)
      at java.lang.Thread.run(Thread.java:536)
      ...

      I have enable debugging and the messages (log/server.log) are more detailed (I have *** information that is sensitive):

      2004-02-10 14:11:40,981 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 26s:51ms
      2004-02-10 14:12:27,544 TRACE [org.jboss.mq.security.ServerSecurityInterceptor] Autenticating user test/test
      2004-02-10 14:12:27,545 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] getAppConfigurationEntry(jbossmq), authInfo=AppConfigurationEntry[]:
      [0]
      LoginModule Class: org.jboss.security.auth.spi.DatabaseServerLoginModule
      ControlFlag: LoginModuleControlFlag: required
      Options:name=hashEncoding, value=BASE64
      name=rolesQuery, value=select roles, rolesgroup from ****Roles where username=?
      name=principalsQuery, value=select password from ****Users where username=?
      name=unauthenticatedIdentity, value=unauthenticated
      name=hashAlgorithm, value=MD5
      name=dsJndiName, value=java:/MySqlDS
      ....
      #Here there are authentication and authorisation log messages
      #which I have removed
      ....
      Principal: *********
      Principal: Roles(members:*******)
      ;principal=monitor;roles=Roles(members:*****) for rolePrincipals [*****]
      2004-02-10 14:12:44,296 TRACE [org.jboss.security.plugins.JaasSecurityDomain.HsqlDbRealm] validateCache, info=org.jboss.security.plugins.JaasSecurityManager$DomainInfo@dbb27d
      2004-02-10 14:12:44,301 DEBUG [org.jboss.mq.il.oil.OILClientIL] ConnectionReceiverOILClient is connecting to: 149.180.61.200:52244
      2004-02-10 14:12:44,312 WARN [org.jboss.mq.il.oil.OILServerILService] Connection failure during connection close.
      java.net.SocketException: Socket closed
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
      at com.sun.net.ssl.internal.ssl.AppOutputStream.flush(DashoA6275)
      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:128)
      at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1583)
      at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:639)
      at java.io.ObjectOutputStream.close(ObjectOutputStream.java:660)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:406)
      at java.lang.Thread.run(Thread.java:536)

      I have looked in the forum and ./messaging/src/main/org/jboss/mq/il/oil/OILServerILService.java source code but coud not find why there is problem with closing socket connection.

      Below I provide jboss-service.xml and OIL configuration excerpts:
      (Lines I have added or changed start with ^^^)

      jboss-service.xml
      ...
      <!-- ==================================================================== -->
      <!-- Security -->
      <!-- ==================================================================== -->


      jboss.security:service=XMLLoginConfig


      login-config.xml


      <!-- JAAS security manager and realm mapping -->

      ^^^
      org.jboss.security.plugins.JaasSecurityDomain



      <!-- ==================================================================== -->
      <!-- SSL Initialization -->
      <!-- ==================================================================== -->
      ^^^ all in this section




      server.keys
      ********

      ....

      and

      complete OIL configuration from ./server/myserver/deploy/jms/oil-service.xml

      ...
      <?xml version="1.0" encoding="UTF-8"?>

      <!-- $Id: oil-service.xml,v 1.1.2.3 2003/10/14 16:41:27 patriot1burke Exp $ -->



      <!-- JBossMQ communication using the Optimizated Invocation Layer
      The server connects back to the client on a different socket -->


      <depends optional-attribute-name="Invoker">jboss.mq:service=Invoker
      ConnectionFactory
      XAConnectionFactory
      8090
      60000
      true

      <!-- Used to disconnect the client if there is no activity -->
      <!-- Ensure this is greater than the ping period -->
      70000
      <!-- Security related settings -->
      ^^^ all below
      java:/jaas/SSL
      org.jboss.security.ssl.ClientSocketFactory
      org.jboss.security.ssl.DomainServerSocketFactory




      Any clues why there is a problem with closing OIL socket?
      Help will be much appreciated.

      Regards

      Adam