Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-10996

org.jboss.remoting3.RemotingOptions.SASL_PROTOCOL make ejb client call hang

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 7.1.0.ER2
    • 7.1.0.DR18
    • Remoting
    • None

    Description

      Until DR18 (and in 7.0 as well) we succesfully called ejb with these options.

      EjbClientCode.java
          private Properties getCtxProperties(String username, String password) {
              Properties props = new Properties();
              props.put("org.jboss.ejb.client.scoped.context", true);
              props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
              props.put("remote.connections", "main");
              props.put("remote.connection.main.host", hostname);
              props.put("remote.connection.main.port", "8080");
              if (username != null && password != null) {
                  props.put("remote.connection.main.username", username);
                  props.put("remote.connection.main.password", password);
              }
              props.put("remote.connection.main.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
              props.put("remote.connection.main.connect.options.org.jboss.remoting3.RemotingOptions.SASL_PROTOCOL", "remote");
              props.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
              return props;
          }
      

      In DR18 ejb calls hangs.

      server.log
      14:27:47,057 INFO  [org.jboss.ejb.client] (main) EJBCLIENT000064: org.jboss.ejb.client.naming.ejb.ejbURLContextFactory is deprecated; new applications should use org.wildfly.naming.client.WildFlyInitialContextFactory instead
      14:27:47,064 INFO  [org.wildfly.naming] (main) WildFly Naming version 1.0.0.Beta15-redhat-1
      14:27:47,076 INFO  [org.wildfly.naming] (main) WFNAM00049: Usage of the legacy "remote.connections" property is deprecated; please use javax.naming.Context#PROVIDER_URL instead
      14:27:47,088 FINER [javax.management.mbeanserver] (main) ObjectName = jboss.remoting.endpoint:name=Remoting (anonymous)-1039159201
      14:27:47,088 FINER [javax.management.mbeanserver] (main) name = jboss.remoting.endpoint:name=Remoting (anonymous)-1039159201
      14:27:47,088 FINER [javax.management.mbeanserver] (main) Send create notification of object jboss.remoting.endpoint:name=Remoting (anonymous)-1039159201
      14:27:47,088 FINER [javax.management.mbeanserver] (main) JMX.mbean.registered jboss.remoting.endpoint:name=Remoting (anonymous)-1039159201
      14:27:47,088 TRACE [org.jboss.remoting.endpoint] (main) Completed open of endpoint (anonymous) <3df04fa1>
      14:27:47,088 TRACE [org.jboss.remoting.endpoint] (main) Allocated tick to 1 of endpoint (anonymous) <3df04fa1> (opened Connection provider for remote)
      14:27:47,089 FINER [javax.management.mbeanserver] (main) ObjectName = jboss.remoting.handler:name=Remoting (anonymous) remote-1876700598
      14:27:47,089 FINER [javax.management.mbeanserver] (main) name = jboss.remoting.handler:name=Remoting (anonymous) remote-1876700598
      14:27:47,089 FINER [javax.management.mbeanserver] (main) Send create notification of object jboss.remoting.handler:name=Remoting (anonymous) remote-1876700598
      14:27:47,089 FINER [javax.management.mbeanserver] (main) JMX.mbean.registered jboss.remoting.handler:name=Remoting (anonymous) remote-1876700598
      14:27:47,089 TRACE [org.jboss.remoting.endpoint] (main) Adding connection provider registration named 'remote': Remoting remote connection provider 6fdc2db6 for endpoint (anonymous) <3df04fa1>
      14:27:47,089 TRACE [org.jboss.remoting.endpoint] (main) Allocated tick to 2 of endpoint (anonymous) <3df04fa1> (opened Connection provider for remote+tls)
      14:27:47,089 FINER [javax.management.mbeanserver] (main) ObjectName = jboss.remoting.handler:name=Remoting (anonymous) remote+tls-383127665
      14:27:47,089 FINER [javax.management.mbeanserver] (main) name = jboss.remoting.handler:name=Remoting (anonymous) remote+tls-383127665
      14:27:47,089 FINER [javax.management.mbeanserver] (main) Send create notification of object jboss.remoting.handler:name=Remoting (anonymous) remote+tls-383127665
      14:27:47,089 FINER [javax.management.mbeanserver] (main) JMX.mbean.registered jboss.remoting.handler:name=Remoting (anonymous) remote+tls-383127665
      14:27:47,089 TRACE [org.jboss.remoting.endpoint] (main) Adding connection provider registration named 'remote+tls': Remoting remote connection provider 16d61071 for endpoint (anonymous) <3df04fa1>
      14:27:47,089 TRACE [org.jboss.remoting.endpoint] (main) Allocated tick to 3 of endpoint (anonymous) <3df04fa1> (opened Connection provider for remoting)
      14:27:47,090 FINER [javax.management.mbeanserver] (main) ObjectName = jboss.remoting.handler:name=Remoting (anonymous) remoting-838733029
      14:27:47,090 FINER [javax.management.mbeanserver] (main) name = jboss.remoting.handler:name=Remoting (anonymous) remoting-838733029
      14:27:47,090 FINER [javax.management.mbeanserver] (main) Send create notification of object jboss.remoting.handler:name=Remoting (anonymous) remoting-838733029
      14:27:47,090 FINER [javax.management.mbeanserver] (main) JMX.mbean.registered jboss.remoting.handler:name=Remoting (anonymous) remoting-838733029
      14:27:47,090 TRACE [org.jboss.remoting.endpoint] (main) Adding connection provider registration named 'remoting': Remoting remote connection provider 31fe0ce5 for endpoint (anonymous) <3df04fa1>
      14:27:47,090 TRACE [org.jboss.remoting.endpoint] (main) Allocated tick to 4 of endpoint (anonymous) <3df04fa1> (opened Connection provider for remote+http)
      14:27:47,090 FINER [javax.management.mbeanserver] (main) ObjectName = jboss.remoting.handler:name=Remoting (anonymous) remote+http-1795925655
      14:27:47,090 FINER [javax.management.mbeanserver] (main) name = jboss.remoting.handler:name=Remoting (anonymous) remote+http-1795925655
      14:27:47,090 FINER [javax.management.mbeanserver] (main) Send create notification of object jboss.remoting.handler:name=Remoting (anonymous) remote+http-1795925655
      14:27:47,090 FINER [javax.management.mbeanserver] (main) JMX.mbean.registered jboss.remoting.handler:name=Remoting (anonymous) remote+http-1795925655
      14:27:47,090 TRACE [org.jboss.remoting.endpoint] (main) Adding connection provider registration named 'remote+http': Remoting remote connection provider 6b0ba697 for endpoint (anonymous) <3df04fa1>
      14:27:47,090 TRACE [org.jboss.remoting.endpoint] (main) Allocated tick to 5 of endpoint (anonymous) <3df04fa1> (opened Connection provider for remote+https)
      14:27:47,090 FINER [javax.management.mbeanserver] (main) ObjectName = jboss.remoting.handler:name=Remoting (anonymous) remote+https-447059608
      14:27:47,091 FINER [javax.management.mbeanserver] (main) name = jboss.remoting.handler:name=Remoting (anonymous) remote+https-447059608
      14:27:47,091 FINER [javax.management.mbeanserver] (main) Send create notification of object jboss.remoting.handler:name=Remoting (anonymous) remote+https-447059608
      14:27:47,091 FINER [javax.management.mbeanserver] (main) JMX.mbean.registered jboss.remoting.handler:name=Remoting (anonymous) remote+https-447059608
      14:27:47,091 TRACE [org.jboss.remoting.endpoint] (main) Adding connection provider registration named 'remote+https': Remoting remote connection provider 1aa59698 for endpoint (anonymous) <3df04fa1>
      14:27:47,091 TRACE [org.jboss.remoting.endpoint] (main) Allocated tick to 6 of endpoint (anonymous) <3df04fa1> (opened Connection provider for http-remoting)
      14:27:47,091 FINER [javax.management.mbeanserver] (main) ObjectName = jboss.remoting.handler:name=Remoting (anonymous) http-remoting-981876983
      14:27:47,091 FINER [javax.management.mbeanserver] (main) name = jboss.remoting.handler:name=Remoting (anonymous) http-remoting-981876983
      14:27:47,091 FINER [javax.management.mbeanserver] (main) Send create notification of object jboss.remoting.handler:name=Remoting (anonymous) http-remoting-981876983
      14:27:47,091 FINER [javax.management.mbeanserver] (main) JMX.mbean.registered jboss.remoting.handler:name=Remoting (anonymous) http-remoting-981876983
      14:27:47,091 TRACE [org.jboss.remoting.endpoint] (main) Adding connection provider registration named 'http-remoting': Remoting remote connection provider 3a8640f7 for endpoint (anonymous) <3df04fa1>
      14:27:47,091 TRACE [org.jboss.remoting.endpoint] (main) Allocated tick to 7 of endpoint (anonymous) <3df04fa1> (opened Connection provider for https-remoting)
      14:27:47,091 FINER [javax.management.mbeanserver] (main) ObjectName = jboss.remoting.handler:name=Remoting (anonymous) https-remoting-1015658596
      14:27:47,091 FINER [javax.management.mbeanserver] (main) name = jboss.remoting.handler:name=Remoting (anonymous) https-remoting-1015658596
      14:27:47,092 FINER [javax.management.mbeanserver] (main) Send create notification of object jboss.remoting.handler:name=Remoting (anonymous) https-remoting-1015658596
      14:27:47,092 FINER [javax.management.mbeanserver] (main) JMX.mbean.registered jboss.remoting.handler:name=Remoting (anonymous) https-remoting-1015658596
      14:27:47,092 TRACE [org.jboss.remoting.endpoint] (main) Adding connection provider registration named 'https-remoting': Remoting remote connection provider 3c89b864 for endpoint (anonymous) <3df04fa1>
      14:27:47,093 TRACE [org.wildfly.security] (main) getAuthenticationConfiguration uri=remote+http://localhost.localdomain:8080, protocolDefaultPort=-1, abstractType=jndi, abstractTypeAuthority=jboss, purpose=operate, MatchRule=[], AuthenticationConfiguration=[AuthenticationConfiguration:principal=anonymous,set-host=localhost.localdomain,set-port=8080,providers-supplier=org.wildfly.security.auth.client.ElytronXmlParser$DeferredSupplier@17d816b3,sasl-mechanism-selector=(true),mechanism-properties={wildfly.sasl.local-user.quiet-auth=true}]
      14:27:47,111 INFO  [org.jboss.ejb.client] (main) JBoss EJB Client version 4.0.0.Beta27-redhat-1
      14:27:47,176 TRACE [org.jboss.remoting.endpoint] (main) Allocated tick to 8 of endpoint (anonymous) <3df04fa1> (opened Connection to remote://localhost.localdomain:8080)
      14:27:47,177 TRACE [org.jboss.remoting.remote] (main) Attempting to connect to "remote://localhost.localdomain:8080" with options {}
      14:27:47,177 TRACE [org.xnio.nio.selector] (XNIO-1 I/O-1) Selected on sun.nio.ch.EPollSelectorImpl@4cb9755d
      14:27:47,177 TRACE [org.xnio.nio] (XNIO-1 I/O-1) Running task org.xnio.nio.WorkerThread$SynchTask@51262ca9
      14:27:47,177 TRACE [org.xnio.nio.selector] (XNIO-1 I/O-1) Beginning select on sun.nio.ch.EPollSelectorImpl@4cb9755d
      14:27:47,177 TRACE [org.xnio.nio.selector] (XNIO-1 I/O-1) Selected on sun.nio.ch.EPollSelectorImpl@4cb9755d
      14:27:47,177 TRACE [org.xnio.nio.selector] (XNIO-1 I/O-1) Beginning select on sun.nio.ch.EPollSelectorImpl@4cb9755d
      14:27:47,177 TRACE [org.xnio.nio.selector] (XNIO-1 I/O-1) Selected on sun.nio.ch.EPollSelectorImpl@4cb9755d
      14:27:47,177 TRACE [org.xnio.nio.selector] (XNIO-1 I/O-1) Selected key sun.nio.ch.SelectionKeyImpl@47d9c01 for java.nio.channels.SocketChannel[connection-pending local=/0.0.0.0:45737 remote=localhost.localdomain/127.0.0.1:8080]
      14:27:47,177 TRACE [org.xnio.nio] (XNIO-1 I/O-1) Running task org.xnio.AbstractIoFuture$NotifierRunnable@12b137f5
      14:27:47,179 TRACE [org.jboss.remoting.endpoint] (XNIO-1 I/O-1) Allocated tick to 9 of endpoint (anonymous) <3df04fa1> (opened org.jboss.remoting3.EndpointImpl$TrackingExecutor@4bb2dc67)
      14:27:47,179 TRACE [org.jboss.remoting.remote.connection] (XNIO-1 I/O-1) Initialized connection from localhost.localdomain/127.0.0.1:8080 to /127.0.0.1:45737 with options {}
      14:27:47,179 TRACE [org.jboss.remoting.endpoint] (XNIO-1 task-5) Resource closed count 00000008 of endpoint (anonymous) <3df04fa1> (closed org.jboss.remoting3.EndpointImpl$TrackingExecutor@4bb2dc67)
      14:27:47,179 TRACE [org.jboss.remoting.remote] (XNIO-1 I/O-1) Setting read listener to org.jboss.remoting3.remote.ClientConnectionOpenListener$Greeting@3fe64581
      14:27:47,179 TRACE [org.xnio.nio.selector] (XNIO-1 I/O-1) Beginning select on sun.nio.ch.EPollSelectorImpl@4cb9755d
      

      It appears org.jboss.remoting3.RemotingOptions.SASL_PROTOCOL is making problems here. If I remove this ejb call is sucesfull.

      Same happens with org.wildfly.naming.client.WildFlyInitialContextFactory when protocol of PROVIDER_URL and SASL_PROTOCOL does not match.

          private Properties getBasicCtxProperties(String timeout) {
              Properties props = new Properties();
              props.put("org.jboss.ejb.client.scoped.context", true);
              props.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
              props.put(Context.PROVIDER_URL, "http-remoting://"+hostname+":8080");
              if (timeout != null) {
                  props.put("remote.connection.main.connect.timeout", timeout);
              }
              props.put("remote.connection.main.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
              props.put("remote.connection.main.connect.options.org.jboss.remoting3.RemotingOptions.SASL_PROTOCOL", "remote");
              props.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
              return props;
          }
      

      Setting to blocker:

      • it can make difficulties by migrating from legacy client configuration to new client configuration
      • in second case (non-deprecated configuration), there should be rather some sort of validaiton check, then let client hang.

      [1] https://github.com/jboss-remoting/jboss-remoting/blob/master/src/main/java/org/jboss/remoting3/RemotingOptions.java#L316

      Attachments

        Issue Links

          Activity

            People

              yborgess1@redhat.com Yeray Borges Santana
              mchoma@redhat.com Martin Choma
              Martin Choma Martin Choma
              Martin Choma Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: