Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6782231

Poor way to be notified notifications can't be pushed

XMLWordPrintable

      I use the Event Service and its RMIPushEventRelay that is given SSL socket factories.
      However, the JMX server miss a trust store and the JMX client miss a key store.
      As a consequence when the server side tries to push notifications the SSL handshake fails.
      The issue is that until you activate the debugging and read a FINEST message and stack as below, you've no idea of what's wrong and the client has no way to be notified programmatically. Isn't it possible to get something better ?

      FINER: Waiting with timeout: 119998 ms remaining
      Dec 5, 2008 4:20:59 PM RMIConnectionImpl invoke
      FINEST: connectionId=rmi://129.157.209.36 2 unwrapping params with MBean extended ClassLoader.
      Dec 5, 2008 4:20:59 PM com.sun.jmx.interceptor.NamespaceDispatchInterceptor getInterceptorOrNullFor
      FINER: dispatching to local name space
      Dec 5, 2008 4:20:59 PM com.sun.jmx.interceptor.DomainDispatchInterceptor getInterceptorOrNullFor
      FINER: dispatching to local namespace: SQE
      Dec 5, 2008 4:20:59 PM com.sun.jmx.mbeanserver.Repository retrieve
      FINER: name = SQE:type=Basic
      Dec 5, 2008 4:20:59 PM RMIConnectionImpl invoke
      FINEST: connectionId=rmi://129.157.209.36 2, name=SQE:type=Basic, operationName=sendNotification, params=[sqe.notification.a.type], signature=[java.lang.String]
      Dec 5, 2008 4:20:59 PM ServerCommunicatorAdmin reqIncoming
      FINER: Receive a new request.
      Dec 5, 2008 4:20:59 PM com.sun.jmx.interceptor.NamespaceDispatchInterceptor getInterceptorOrNullFor
      FINER: dispatching to local name space
      Dec 5, 2008 4:20:59 PM com.sun.jmx.interceptor.DomainDispatchInterceptor getInterceptorOrNullFor
      FINER: dispatching to local namespace: SQE
      Dec 5, 2008 4:20:59 PM com.sun.jmx.mbeanserver.Repository retrieve
      FINER: name = SQE:type=Basic
      Dec 5, 2008 4:20:59 PM EventClientDelegate checkListenerPermission
      FINER:
      Dec 5, 2008 4:20:59 PM RMIEventForwarder forward
      FINER: to the listener: 0
      Dec 5, 2008 4:20:59 PM ServerCommunicatorAdmin reqIncoming
      FINER: Finish a request.
      Dec 5, 2008 4:20:59 PM ServerCommunicatorAdmin synchro
      FINER: Admin: Timestamp=1228490459525
      Dec 5, 2008 4:20:59 PM ServerCommunicatorAdmin synchro
      FINER: Admin: elapsed=1
      Dec 5, 2008 4:20:59 PM ServerCommunicatorAdmin synchro
      FINER: Admin: remaining timeout=119999
      Dec 5, 2008 4:20:59 PM ServerCommunicatorAdmin Timeout-run
      FINER: Waiting with timeout: 119999 ms remaining
      Dec 5, 2008 4:20:59 PM RMIEventForwarder SendingJob-task
      FINEST: Got exception to forward notifs.
      java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
      javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:304)
      at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
      at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:195)
      at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:149)
      at $Proxy7.receive(Unknown Source)
      at javax.management.event.RMIPushEventForwarder$SendingJob.task(RMIPushEventForwarder.java:144)
      at com.sun.jmx.event.RepeatedSingletonJob.run(RepeatedSingletonJob.java:73)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:713)
      Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
      at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
      at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
      at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1693)
      at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:951)
      at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1131)
      at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:642)
      at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:78)
      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
      at java.io.DataOutputStream.flush(DataOutputStream.java:123)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:229)
      ... 10 more

            sjiang Shanliang Jiang (Inactive)
            yjoan Yves Joan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: