4 Replies Latest reply on Apr 5, 2013 11:38 AM by Ian Lawson

    Default (Linux) Network Behaviour for startServer.sh -r hotrod

    Ian Lawson Newbie

      Last one of the day, I'm trying to setup some remote instances of Infinispan for some simple demos/tests. I've done the simplist possible approach, created a VM (RHEL6.4) and installed the Infinispan software. I've done a '/bin/startServer.sh -r hotrod' and can run connectivity tests against it *fine* if I use localhost:11222 or 127.0.0.1:11222.

       

      However, if I attempt to connect externally or even internally using a FQDN such as rhel1.test.com (which translates to the IP) I get connection refused. I have a test app that does a RemoteCacheManager( ip ).

       

      Doing a netstat -l it reveals that Infinispan is listening on localhost:11222 only - is this a Linux issue/setting or some simple configuration I have overlooked? Seems odd that I can connect fine with a Java client on localhost/127.0.0.1 so I'm guessing something Linux-y.

       

      For the record, I have disabled iptables and ip6tables for now, so it isn't a firewall issue.

        • 1. Re: Default (Linux) Network Behaviour for startServer.sh -r hotrod
          Tristan Tarrant Master

          You should make it listen on 0.0.0.0 or your network adapter's address. 127.0.0.1 is loopback only, i.e. only connections coming from the same host can see it.

          • 2. Re: Default (Linux) Network Behaviour for startServer.sh -r hotrod
            Ian Lawson Newbie

            That's startServer.sh -r hotrod --host=0.0.0.0 ?

             

            Just tried mapping it to the machine name (i.e. myMachine.foo.bar) and it *appeared* to work, although the cache failed to respond (it didn't give me three pages worth of stacktrace, which was a relief) :-)

            • 3. Re: Default (Linux) Network Behaviour for startServer.sh -r hotrod
              Tristan Tarrant Master

              Mapping it to the machine name will make it do a host name lookup, so make sure the name is mapped correctly:

               

              $ host outerrim

              outerrim has address 192.168.1.27

               

              Use ifconfig to determine your external interface IP address:

               

              $ ifconfig

              eth0      Link encap:Ethernet  HWaddr f0:de:f1:7b:e9:22 

                        UP BROADCAST MULTICAST  MTU:1500  Metric:1

                        RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                        collisions:0 txqueuelen:1000

                        RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

                        Interrupt:20 Memory:f2600000-f2620000

               

              lo        Link encap:Local Loopback 

                        inet addr:127.0.0.1  Mask:255.0.0.0

                        inet6 addr: ::1/128 Scope:Host

                        UP LOOPBACK RUNNING  MTU:65536  Metric:1

                        RX packets:193613 errors:0 dropped:0 overruns:0 frame:0

                        TX packets:193613 errors:0 dropped:0 overruns:0 carrier:0

                        collisions:0 txqueuelen:0

                        RX bytes:32582272 (32.5 MB)  TX bytes:32582272 (32.5 MB)

               

              wlan0     Link encap:Ethernet  HWaddr 00:24:d7:d4:0e:30 

                        inet addr:192.168.1.27  Bcast:192.168.1.255  Mask:255.255.255.0

                        inet6 addr: fe80::224:d7ff:fed4:e30/64 Scope:Link

                        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                        RX packets:1884883 errors:0 dropped:0 overruns:0 frame:0

                        TX packets:1210557 errors:0 dropped:0 overruns:0 carrier:0

                        collisions:0 txqueuelen:1000

                        RX bytes:2005154678 (2.0 GB)  TX bytes:157541631 (157.5 MB)

              • 4. Re: Default (Linux) Network Behaviour for startServer.sh -r hotrod
                Ian Lawson Newbie

                Set it up to start listening on 0.0.0.0 and everything works a charm, many thanks