groups

28 views
Skip to first unread message

Duke Tantiprasut

unread,
Dec 1, 2009, 7:39:07 PM12/1/09
to haze...@googlegroups.com

Hi All,

 

I'm having trouble creating separate groups for the hazelcast clusters. Both JVMs are running on the same localhost. The stdout on startup does show that they're picking up the correct config files however 2 members are still being discovered. Does the <group> only apply to multicast discovery ?

 

Thanks

Duke

 

<hazelcast>

    <group>

        <name>rsview</name>

        <password>resolve</password>

    </group>

    <network>

        <port auto-increment="true">5701</port>

        <join>

            <multicast enabled="false">

                <multicast-group>224.2.2.3</multicast-group>

                <multicast-port>54327</multicast-port>

            </multicast>

            <tcp-ip enabled="true">

                <interface>127.0.0.1</interface>

            </tcp-ip>

        </join>

        <interfaces enabled="true">

            <interface>127.0.0.1</interface>

        </interfaces>

...

 

and

 

<hazelcast>

    <group>

        <name>rscontrol</name>

        <password>resolve</password>

    </group>

    <network>

        <port auto-increment="true">5701</port>

        <join>

            <multicast enabled="false">

                <multicast-group>224.2.2.3</multicast-group>

                <multicast-port>54327</multicast-port>

            </multicast>

            <tcp-ip enabled="true">

                <interface>127.0.0.1</interface>

            </tcp-ip>

        </join>

        <interfaces enabled="true">

            <interface>127.0.0.1</interface>

        </interfaces>



This message contains confidential information and is intended only for the individual named. If you are not the named addressee, any delivery, disclosure, dissemination or distribution of this e-mail is unlawful and strictly prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or error-free, as information could be intercepted, corrupted, lost, destroyed, arrive late, be incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which errors or omissions arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.

Ricky Hazelwood

unread,
Dec 1, 2009, 10:39:23 PM12/1/09
to haze...@googlegroups.com
Funny how I was about to raise the same issue. I am having the same problem in my different environments. By the looks of it, tcp-ip lookup ignores the group details. For time being you can turn off tcp-ip
Cheers,
Ricky

--

You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.

Talip Ozturk

unread,
Dec 2, 2009, 3:46:15 AM12/2/09
to hazelcast
This issue was reported before by someone else. Multicast-join was
checking the group name/password but TCP-join wasn't.

http://code.google.com/p/hazelcast/issues/detail?id=151

It is actually fixed about a month ago. Please download and try the
latest snapshot.

btw. here is the test case for this. this test is part of our cluster
test suite.
@Test(timeout = 60000)
public void testDifferentGroups() {
Config c1 = new XmlConfigBuilder().build();
c1.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
c1.getNetworkConfig().getInterfaces().clear();
c1.getNetworkConfig().getInterfaces().addInterface("127.0.0.1");
c1.getNetworkConfig().getInterfaces().setEnabled(true);
Config c2 = new XmlConfigBuilder().build();
c2.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
c2.getNetworkConfig().getInterfaces().clear();
c2.getNetworkConfig().getInterfaces().addInterface("127.0.0.1");
c2.getNetworkConfig().getInterfaces().setEnabled(true);
HazelcastInstance h1 = Hazelcast.newHazelcastInstance(c1);
HazelcastInstance h2 = Hazelcast.newHazelcastInstance(c2);
assertEquals(2, h1.getCluster().getMembers().size());
assertEquals(2, h2.getCluster().getMembers().size());
Hazelcast.shutdownAll();
c2.setGroupName("differentGroup");
h1 = Hazelcast.newHazelcastInstance(c1);
h2 = Hazelcast.newHazelcastInstance(c2);
assertEquals(1, h1.getCluster().getMembers().size());
assertEquals(1, h2.getCluster().getMembers().size());
}


-talip

Duke Tantiprasut

unread,
Dec 2, 2009, 11:55:41 AM12/2/09
to haze...@googlegroups.com

Thanks guys.

 

I'll download the snapshot and give that a go.


Cheers

Duke

Reply all
Reply to author
Forward
0 new messages