4 Replies Latest reply on Jun 6, 2014 10:42 PM by pbenedict

    EJB server-to-server handshake silence


      Within one machine, but using two separate WildFly instances, I can successfully initiate a handshake between the containers and execute remote calls. I am using the "remote" protocol and not "http-remoting".


      This is how the handshake looks:

      INFO  [org.jboss.ejb.client.remoting] (MSC service thread 1-10) EJBCLIENT000013:
      Successful version handshake completed for receiver context EJBReceiverContext{
      clientContext=org.jboss.ejb.client.EJBClientContext@4672e213, receiver=Remoting connection EJB receiver
      [connection=Remoting connection <c6703af>,channel=jboss.ejb,nodename=daserver]}
      on channel Channel ID efa6c4d4 (outbound) of Remoting connection 4550efaf to /


      Unfortunately, I cannot get this to work when the machines are different. I've done due diligence in my problem researching but still cannot find resolution. I verified my iptables is not blocking any connection, and I also used a packet sniffer to prove an outbound connection is being made to the destination server. However, what is most irritating, is the silence from WildFly when the handshake fails (apparently). Nothing is logged. There is no warning/error. The admin has no indication anything is wrong at server startup. I think this is a critical feature that's gone missing.


      Anyway, has anyone experienced this? And what are some possibilities for the handshake to fail silently?

        • 1. Re: EJB server-to-server handshake silence

          Which exact version of WildFly is this? Enable TRACE level logging of org.jboss.ejb.client on the server which is acting as the client (and maybe even on the other server) and see if it shows up something. There's usually a WARN logged when the connection fails.

          • 2. Re: Re: EJB server-to-server handshake silence

            I am using 8.1.0.CR2 on both machines. I added this line to each server's standalone.xml:


            <logger category="org.jboss.ejb.client">
                <level name="TRACE"/>

            Nothing logged on the client side. For the server, this was spit out. I don't know if it's related though:

            DEBUG [org.jboss.ejb.client.txn] (Periodic Recovery) Send recover request for transaction origin node identifier 1 to EJB receiver with node name www


            Does that help at all?

            • 3. Re: EJB server-to-server handshake silence

              Did you add a remoting connector for this protocol? The default is http-remoting

              • 4. Re: EJB server-to-server handshake silence

                Okay, I solved the issue but I can confirm what I originally thought: WildFly does not log anything when the handshake cannot be made. My problem was on the destination server side. That server's WildFly instance was bound to localhost (not the external IP) which prevented it from accepting incoming connections from the outside. Once I changed the bound address, I was able to make a handshake.


                I am going to go ahead and create a new JIRA issue for this [1]. I think it's a defect -- not an enhancement -- because what should be a reported error must be swallowed somewhere. BTW, errors do get reported with things such as bad remoting messages or incorrect authentication, for example, but not if the handshake fails.


                [1] [WFLY-3466] No error reported when remote handshake fails - JBoss Issue Tracker