4 Replies Latest reply on Dec 7, 2016 3:44 AM by cennore

    Problem with Jgroups when when using Cacheable entities

    cennore

      Hello,

       

      I have an application running on WIldfly 8.2; the application runs fine and I had no problem...till I had to make use of the @Cacheable feature on some entities which I felt needed caching for performance enhancement.

      The moment I did this to my JPA project (which is a dependency in the main application running on Wildfly), Wildfly starts up with errors which point to an invalid interface 0.0.0.0

       

      I need the public interface on 0.0.0.0 as I have a couple of web services which are actively being called from clients outside my own network.

       

      I've tried using -Djgroups.bind_addr=127.0.0.1 which I've seen on a couple of other forums including this but on startup I still see ejb and hibernate starting on 0.0.0.0:55200 which I presume means the bind is not working.

       

      Funny thing is same JPA project is also being used as dependency in a different project running on tomcat and it gives no problems there.

      As a developer who constantly praises Wildfly over every other AS in my workplace I look pretty silly now as I've been on this since yesternight.

       

      I hope this time I get timely response from this forum. I have posted several times here and it took days, sometimes weeks before I got even 1 response. I think that;s poor!

       

      Thanks to anyone who helps!

        • 1. Re: Problem with Jgroups when when using Cacheable entities
          wdfink

          A JGroups bind address 127.0.0.1 might be useless as server messages from other boxes are not received, so the cluster will be affected.

          If you use a public address and have other instances they should find each other.

          Other subsystems might be able to use the 0.0.0.0 address to bind against every NIC.

          The jgroups.bind_addr does not affect your public server address

          • 2. Re: Problem with Jgroups when when using Cacheable entities
            cennore

            Hello,

             

            First of, thanks for responding!

             

            Thing is I'm not running Wildfly in a cluster of any sort.

            I'm running a singe standalone instance.

             

            Understand that if I remove the @Cacheable annotation from all entities in the JPA project the problem goes away immediately.

            Also, if i set the public interface IP address in standalone.xml to 127.0.0.1 the problem also goes away!

             

            The challenge is  if I leave the public interface at 127.0.0.1 then all external web service clients cannot access the webservices on the application.

            On the other hand, if I change the public interface to 0.0.0.0 then jgroups give an "invalid interface 0.0.0.0" exception on start up and the application doesn't get deployed.

             

            Based on this explanation, what's your recommendation???

            • 3. Re: Problem with Jgroups when when using Cacheable entities
              wdfink

              Could you use the public IP address? 0.0.0.0 mean all interfaces and will not work for JGroups.

              But if you don't use a cluster, you might start a profile without clustering (standalone or standalone-full) in this case no JGroups subsysem is used.

              • 4. Re: Problem with Jgroups when when using Cacheable entities
                cennore

                You were right! Problem goes away the minute I used the actual public IP of the server.

                Thanks!