1 2 3 Previous Next 31 Replies Latest reply on Jul 11, 2013 1:24 AM by maderhan Go to original post
      • 15. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
        jaikiran

        The JNDI names that are *logged* will not print the distinct name since that applies only to the ejb: namespace JNDI names which aren't logged.

        • 16. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
          rodakr

          ...and why not using WebServices for this.

          • 17. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
            rodakr

            if you have apache loadbalancer...

            • 18. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
              maderhan

              Radek Rodak schrieb:

               

              ...and why not using WebServices for this.

              ...that is a long story .

               

              The application I am resposible for is an old JBoss 3.x based app which has been migrated to 5.x, 7.x.

              I mean its under production all the time and there is not much time for new tech regarding this app...

              ...this year I migrated from windows single node / jboss 5.x to linux cluster with Apache as balancer and jboss 7...

               

              But I will keep your suggestion in mind for new concepts!!

               

              By the way: Iam really missing the old Jboss HttpInvoker for EJBs...

              • 19. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                maderhan

                After configuration the remoting subsystem, I got the following Exception after the server restart:

                 

                 

                 

                 

                 

                Here is the config:

                 

                 

                <subsystem xmlns="urn:jboss:domain:remoting:1.1">
                <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
                <outbound-connections>
                <remote-outbound-connection name="remote-ejb-connection-pi1node1" outbound-socket-binding-ref="remote-ejb-pi1node1" username="josf" security-realm="ApplicationRealm">
                <properties>
                <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                <property name="SSL_ENABLED" value="false"/>
                </properties>
                </remote-outbound-connection>
                <remote-outbound-connection name="remote-ejb-connection-pi1node2" outbound-socket-binding-ref="remote-ejb-pi1node2" username="josf" security-realm="ApplicationRealm">
                <properties>
                <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                <property name="SSL_ENABLED" value="false"/>
                </properties>
                </remote-outbound-connection>
                </outbound-connections>
                </subsystem>
                
                

                 

                 

                 

                 

                 

                 

                 

                  <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
                <outbound-socket-binding name="remote-ejb-pi1node1">
                <remote-destination host="localhost" port="9011"/>
                </outbound-socket-binding>
                <outbound-socket-binding name="remote-ejb-pi1node2">
                <remote-destination host="my-remote-host" port="9011"/>
                </outbound-socket-binding>
                </socket-binding-group>
                
                

                 

                 

                There semms to be a problem with the second connection (this is the real remote one)!

                 

                 

                 

                 

                10:52:44,511 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-21) MSC00001: Failed to start service jboss.remoting.endpoint.subsystem.outbound-connection.remote-ejb-connection-pi1node2: org.jboss.msc.service.StartException in service jboss.remoting.endpoint.subsystem.outbound-connection.remote-ejb-connection-pi1node2: Failed to start service
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
                Caused by: org.jboss.remoting3.DuplicateRegistrationException: URI scheme 'remote://' is already registered to a provider
                at org.jboss.remoting3.EndpointImpl.addConnectionProvider(EndpointImpl.java:421) [jboss-remoting-3.2.7.GA.jar:3.2.7.GA]
                at org.jboss.as.remoting.RemoteOutboundConnectionService.start(RemoteOutboundConnectionService.java:89) [jboss-as-remoting-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                ... 3 more
                
                

                 

                 

                JBAS014777: Services which failed to start: service jboss.remoting.endpoint.subsystem.outbound-connection.remote-ejb-connection-pi1node2: org.jboss.msc.service.StartException in service jboss.remoting.endpoint.subsystem.outbound-connection.remote-ejb-connection-pi1node2: Failed to start service
                
                
                • 20. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                  jaikiran

                  Hans-Dieter Mader wrote:

                   

                   

                   

                  10:52:44,511 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-21) MSC00001: Failed to start service jboss.remoting.endpoint.subsystem.outbound-connection.remote-ejb-connection-pi1node2: org.jboss.msc.service.StartException in service jboss.remoting.endpoint.subsystem.outbound-connection.remote-ejb-connection-pi1node2: Failed to start service
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
                  Caused by: org.jboss.remoting3.DuplicateRegistrationException: URI scheme 'remote://' is already registered to a provider
                  at org.jboss.remoting3.EndpointImpl.addConnectionProvider(EndpointImpl.java:421) [jboss-remoting-3.2.7.GA.jar:3.2.7.GA]
                  at org.jboss.as.remoting.RemoteOutboundConnectionService.start(RemoteOutboundConnectionService.java:89) [jboss-as-remoting-7.1.1.Final.jar:7.1.1.Final]
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                  ... 3 more
                   
                  

                   

                   

                  That was fixed upstream some months back. You might want to try the latest nightly build or build from some specific tag from github.

                  • 21. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                    maderhan

                    Hi Jaikiran,

                     

                    I fixed the last error with the two classes

                     

                    remoting/src/main/java/org/jboss/as/remoting/RemoteOutboundConnectionService

                    remoting/src/main/java/org/jboss/as/remoting/RemotingMessages

                     

                    and the exception is away.

                     

                    But after the deployment of the client-application (included jboss-ejb-client.xml)

                    I got an other exception.

                     

                    jboss-ejb-client.xml:

                     

                     

                    <?xml version="1.1" encoding="UTF-8"?> 
                    <jboss-ejb-client xmlns="urn:jboss:ejb-client:1.0">
                        <client-context>         
                            <ejb-receivers>             
                                <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection-pi1node1"/>
                                <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection-pi1node2"/>
                            </ejb-receivers>     
                        </client-context> 
                    </jboss-ejb-client>
                    
                    

                     

                     

                    exception:

                     

                     

                      12:13:32,534 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-30) MSC00001: Failed to start service jboss.ejb3.dd-based-ejb-client-context."piweb.war": org.jboss.msc.service.StartException in service jboss.ejb3.dd-based-ejb-client-context."piweb.war": Failed to start service
                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
                    Caused by: java.lang.AbstractMethodError: org.jboss.as.ejb3.remote.JBossEJBClientXmlConfiguration.getDeploymentNodeSelector()Lorg/jboss/ejb/client/DeploymentNodeSelector;
                    at org.jboss.ejb.client.EJBClientContext.<init>(EJBClientContext.java:107)
                    at org.jboss.ejb.client.EJBClientContext.create(EJBClientContext.java:172)
                    at org.jboss.ejb.client.EJBClientContext.create(EJBClientContext.java:155)
                    at org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService.start(DescriptorBasedEJBClientContextService.java:92)
                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                    ... 3 more
                    12:13:32,740 INFO [org.jboss.as.server] (management-handler-thread - 3) JBAS015870: Deploy of deployment "piweb.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.ejb3.dd-based-ejb-client-context.\"piweb.war\"" => "org.jboss.msc.service.StartException in service jboss.ejb3.dd-based-ejb-client-context.\"piweb.war\": Failed to start service"}}
                    12:13:32,933 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment piweb.war in 192ms
                    12:13:32,935 INFO [org.jboss.as.controller] (management-handler-thread - 3) JBAS014774: Service status report
                    JBAS014777: Services which failed to start: service jboss.ejb3.dd-based-ejb-client-context."piweb.war": org.jboss.msc.service.StartException in service jboss.ejb3.dd-based-ejb-client-context."piweb.war": Failed to start service
                    
                    
                    • 22. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                      maderhan

                      Has anybody an idea about the last exception?

                      It's not possible at all to include a  jboss-ejb-client.xml in a WAR/WEB-INF.

                      • 23. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                        jaikiran

                        The last exception is an indication that you have mismatch in the version of certain libraries. It looks like you are picking and choosing certain commits on top of 7.1.1.Final. Instead, I would recommend that you build cleanly from a specific tag like 7.1.2.Final or 7.1.3.Final.

                        • 24. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                          maderhan

                          Hi Jaikiran,

                           

                          you are right I have got a 7.1.1 release with some libs out from 7.1.2 and 7.2.0......

                           

                          The problem is that we have got no contract for using EAP....

                           

                          Is there an other way to get a 7.1.3 relase build (binaries)?

                          • 25. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                            jaikiran

                            The community version tags are here https://github.com/jbossas/jboss-as/tree/7.1.3.Final. You can build it yourselves.

                            • 26. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                              maderhan

                              I got an other error fixed (AbstractMethodError) but now here is the next one:

                               

                               

                                15:05:01,773 DEBUG [org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService] (MSC service thread 1-23) Creating remoting EJB receiver for connection remote-ejb-connection-pi1node1
                              15:05:01,864 DEBUG [org.jboss.remoting.remote.client] (Remoting "pi1node2" read-1) Client received authentication rejected for mechanism DIGEST-MD5
                              15:05:01,866 ERROR [org.jboss.remoting.remote.connection] (Remoting "pi1node2" read-1) JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
                              15:05:01,867 DEBUG [org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService] (MSC service thread 1-23) Failed to create a connection for remote-ejb-connection-pi1node1. A reconnect handler will be added to the client context: java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
                              at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:91) [jboss-ejb-client-1.0.15.Final.jar:1.0.15.Final]
                              at org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService.createRemotingConnections(DescriptorBasedEJBClientContextService.java:140) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
                              at org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService.start(DescriptorBasedEJBClientContextService.java:101) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
                              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
                              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
                              Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
                              at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:332) [jboss-remoting-3.2.13.GA.jar:3.2.13.GA]
                              at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:225) [jboss-remoting-3.2.13.GA.jar:3.2.13.GA]
                              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.7.GA.jar:3.0.7.GA]
                              at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189) [xnio-api-3.0.7.GA.jar:3.0.7.GA]
                              at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103) [xnio-api-3.0.7.GA.jar:3.0.7.GA]
                              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.7.GA.jar:3.0.7.GA]
                              at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189) [xnio-api-3.0.7.GA.jar:3.0.7.GA]
                              at org.xnio.ssl.JsseConnectedSslStreamChannel.handleReadable(JsseConnectedSslStreamChannel.java:180) [xnio-api-3.0.7.GA.jar:3.0.7.GA]
                              at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103) [xnio-api-3.0.7.GA.jar:3.0.7.GA]
                              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.7.GA.jar:3.0.7.GA]
                              at org.xnio.nio.NioHandle.run(NioHandle.java:90)
                              at org.xnio.nio.WorkerThread.run(WorkerThread.java:187)
                              at ...asynchronous invocation...(Unknown Source)
                              at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270) [jboss-remoting-3.2.13.GA.jar:3.2.13.GA]
                              at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251) [jboss-remoting-3.2.13.GA.jar:3.2.13.GA]
                              at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349) [jboss-remoting-3.2.13.GA.jar:3.2.13.GA]
                              at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:337) [jboss-remoting-3.2.13.GA.jar:3.2.13.GA]
                              at org.jboss.as.remoting.RemoteOutboundConnectionService.connect(RemoteOutboundConnectionService.java:109) [jboss-as-remoting-7.1.1.Final.jar:7.1.1.Final]
                              at org.jboss.as.ejb3.remote.DescriptorBasedEJBClientContextService.createRemotingConnections(DescriptorBasedEJBClientContextService.java:138) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
                              
                              
                              • 27. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                                raylite3

                                You might be missing the instructions in the "Security" section in this article:

                                 

                                https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance

                                 

                                You will need to create a security realm that contains the password for the server.

                                • 28. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                                  maderhan

                                  I guess the 7.2 release could solve my problem, so I have to wait until the final release.

                                   

                                  Then I will follow all instructions from the docu (https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance) and

                                  ejb deplyment with distinct name.

                                   

                                  Thanks for all help!

                                   

                                  • 29. Re: SLSB EJB3.1 invocation server to server - localhost and remote host
                                    fgazmuri

                                    The only way to communicate with two different ejb has been that I found at the following link:

                                     

                                    http://blog.akquinet.de/2012/11/09/load-balancing-and-failover-of-remote-ejb-clients-in-eap6-and-jboss-as7/