0 Replies Latest reply on Jul 24, 2018 5:54 AM by jack yoon

    cause: java.net.BindException: Cannot assign requested address: Datagram send failed

    jack yoon Newbie

      I am a student who aspires to be a developer in Korea.

       

       

      I learned jgroups while studying ehcache and jgroup with spring-boot

       

       

      I am trying to copy / distribute the cache to two computers.

       

       

      However, I have not been able to improve my progress because I have problems while trying.

       

       

      I would like to get help for this.

       

       

      I entered dependency in pom.xml as follows.

       

       

      <dependency>

          <groupId>net.sf.ehcache</groupId>

          <artifactId>ehcache</artifactId>

          <version>2.10.4</version>

      </dependency>

       

      <dependency>

          <groupId>org.jgroups</groupId>

          <artifactId>jgroups</artifactId>

          <version>3.2.5.Final</version>

      </dependency>

       

       

      <dependency>

          <groupId>net.sf.ehcache</groupId>

          <artifactId>ehcache-jgroupsreplication</artifactId>

          <version>1.7</version>

      </dependency>

       

       

      And ehcache.xml is as follows.

       

      <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                      xsi:noNamespaceSchemaLocation="../../../main/config/ehcache.xsd">

              <diskStore path="java.io.tmpdir/one" />

              <cacheManagerPeerProviderFactory

                              class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"

                              properties="connect=UDP(mcast_addr=230.0.0.1;mcast_port=7800;):PING:

                              MERGE2:FD_SOCK:VERIFY_SUSPECT:pbcast.NAKACK:UNICAST:pbcast.STABLE:FRAG:pbcast.GMS"

                              propertySeparator="::" />

       

              <cache name="serverResourceInfoCache" maxEntriesLocalHeap="1000"

                          eternal="false" timeToIdleSeconds="1000" timeToLiveSeconds="1000"

                          overflowToDisk="false">

       

                      <cacheEventListenerFactory

                              class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"

                              properties="replicateAsynchronously=true, replicatePuts=true,

                              replicateUpdates=true, replicateUpdatesViaCopy=false,

                              replicateRemovals=true" />

              </cache>

      </ehcache>


       

      Finally, jgroups_tcp.xml looks like this

       

      <config>

              <TCP bind_addr="127.0.0.1" bind_port = "7800" loopback="true"/>

              <TCPPING timeout = "3000"

                          initial_hosts = "192.168.10.156 [7800], 192.168.10.248 [7800]"

                          port_range = "10"

                          num_initial_members = "3"/>

              <VERIFY_SUSPECT timeout = "1500"/>

              <pbcast.NAKACK use_mcast_xmit = "false" gc_lag = "100"

                          retransmit_timeout = "300,600,1200,2400,4800"

                          discard_delivered_msgs = "true"/>

              <pbcast.STABLE stability_delay = "1000" desired_avg_gossip = "50000" max_bytes = "400000"/>

              <pbcast.GMS print_local_addr = "true" join_timeout = "5000" shun = "false" view_bundling = "true"/>

      </config>

       

       

       

      However, when I rotate both of them, the following error keeps appearing

       

       

       

       

      I've looked up this error and tried several ways, but I can not finish it.

      I would appreciate it if you could give me a good way.