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

Second remote EJB client connection prevents server from shutting down (Elytron, Remoting)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 7.1.0.ER2
    • 7.1.0.ER1
    • EJB, Remoting, Security
    • None
    • Hide

      Use attached reproducer (maven project).

      # set path to WildFly/EAP
      export JBOSS_HOME=...
      # Reconfigure server (configure Elytron, etc.)
      $JBOSS_HOME/bin/jboss-cli.sh --file=demo.cli
      # make two copies of the standalone folder - one for each server 
      for i in 1 2; do  cp -r $JBOSS_HOME/standalone $JBOSS_HOME/standalone$i; done;
      
      # compile this project and place the EJB JARs to server1 and server2
      mvn clean install \
        && cp ejb-entrybean/target/seccontext-entry.jar $JBOSS_HOME/standalone1/deployments \
        && cp ejb-whoamibean/target/seccontext-whoami.jar $JBOSS_HOME/standalone2/deployments
      
      # start server1 and server2 (use separate terminals for them)
      $JBOSS_HOME/bin/standalone.sh -c standalone.xml -Djboss.server.base.dir=$JBOSS_HOME/standalone1 -Djboss.node.name=host1 -Dseccontext.provider.url=remote+http://127.0.0.1:8280
      $JBOSS_HOME/bin/standalone.sh -c standalone.xml -Djboss.server.base.dir=$JBOSS_HOME/standalone2 -Djboss.node.name=host2 -Djboss.socket.binding.port-offset=200
      
      # run the client twice
      mvn exec:java -f ejb-client
      mvn exec:java -f ejb-client
      

      Current behavior
      Second client execution doesn't finish and server is in "unstoppable" state from this point.

      Expected behavior
      All client executions finish with the same result. The server is able to serve request, do the reload, or be stopped completely.

      Show
      Use attached reproducer (maven project). # set path to WildFly/EAP export JBOSS_HOME=... # Reconfigure server (configure Elytron, etc.) $JBOSS_HOME/bin/jboss-cli.sh --file=demo.cli # make two copies of the standalone folder - one for each server for i in 1 2; do cp -r $JBOSS_HOME/standalone $JBOSS_HOME/standalone $i ; done ; # compile this project and place the EJB JARs to server1 and server2 mvn clean install \ && cp ejb-entrybean/target/seccontext-entry.jar $JBOSS_HOME/standalone1/deployments \ && cp ejb-whoamibean/target/seccontext-whoami.jar $JBOSS_HOME/standalone2/deployments # start server1 and server2 (use separate terminals for them) $JBOSS_HOME/bin/standalone.sh -c standalone.xml -Djboss.server.base.dir=$JBOSS_HOME/standalone1 -Djboss.node.name=host1 -Dseccontext.provider.url=remote+http://127.0.0.1:8280 $JBOSS_HOME/bin/standalone.sh -c standalone.xml -Djboss.server.base.dir=$JBOSS_HOME/standalone2 -Djboss.node.name=host2 -Djboss.socket.binding.port-offset=200 # run the client twice mvn exec:java -f ejb-client mvn exec:java -f ejb-client Current behavior Second client execution doesn't finish and server is in "unstoppable" state from this point. Expected behavior All client executions finish with the same result. The server is able to serve request, do the reload, or be stopped completely.

    Description

      Second call of EJB client causes server stuck in some cases. When this happens administrator is not able to shutdown or reload such a server.

      Scenario details:

      Elytron is configured as security provider on servers and Elytron client API is used for authentication. Protected stateless beans are used.

      EJB Client -> Entry bean on Server1 -> WhoAmI bean on Server2
      
      • Client uses AuthenticationConfiguration with valid credentials for Server1; Client calls the Entry bean twice - the difference is in arguments provided. The arguments are subsequently used for authentication from Server1 to Server2 (using AuthenticationConfiguration):
        • first call uses null for both username and password
        • second call uses valid credentials for Server2
      • Entry bean on Server1 calls WhoAmI bean on Server2 with credentials which was provided as method arguments;
      • WhoAmI bean on Server2 just returns caller principal

      The Client is executed twice, the second call doesn't finish

      Attachments

        1. client.log
          28 kB
        2. JBEAP-11822-reproducer.zip
          24 kB
        3. jstack-client.txt
          20 kB
        4. jstack-server1.txt
          81 kB
        5. jstack-server1-shutdown-hangs.txt
          76 kB
        6. jstack-server2.txt
          46 kB
        7. server1.log
          100 kB
        8. server2.log
          42 kB
        9. standalone.xml
          30 kB

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              josef.cacek@gmail.com Josef Cacek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: