Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hazelcast config file changes default behavior of network #8481

Closed
T3rm1 opened this issue Jun 30, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@T3rm1
Copy link

commented Jun 30, 2016

Using Hazelcast out of the box with no configuration creates a p2p cluster. As soon as I create a hazelcast.xml in which I only set the logging type, Hazelcast won't create a cluster but start in standalone mode.

I didn't write any network configuration in the config file so I expect the Hazelcast default behavoir.

@gurbuzali gurbuzali added this to the 3.7 milestone Jun 30, 2016

@vbekiaris

This comment has been minimized.

Copy link
Contributor

commented Jul 7, 2016

Thanks @T3rm1 for reporting this. I am trying to reproduce this issue with an XML config like this:

<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.7.xsd"
           xmlns="http://www.hazelcast.com/schema/config"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <properties>
        <property name="hazelcast.logging.type">jdk</property>
    </properties>
</hazelcast>

and I see that the Hazelcast instances I start still use the MulticastJoiner and do create a cluster (tested both with 3.6.4 and 3.7-SNAPSHOT). Can you provide your XML configuration and attempt providing a reproducer? Also, please make sure there are no other factors affecting your network (firewalls, VPN clients etc).

@vbekiaris vbekiaris modified the milestones: 3.8, 3.7 Jul 12, 2016

@T3rm1

This comment has been minimized.

Copy link
Author

commented Jul 12, 2016

I did some more testing and this happens as soon as the config is named hazelcast.xml. If I rename it to something else and set the init parameter config-location it does work as intended. By the way, I add the servlet filter programmatically.

The log looks like this with your config in hazelcast.xml: http://pastebin.com/raw/vQquA5nc

@pveentjer

This comment has been minimized.

Copy link
Member

commented Jul 12, 2016

The problem is explained here:

13:39:52,498 WARN [main] com.hazelcast.instance.Node - [192.168.100.177]:5701 [dev] [3.6.3] No join method is enabled! Starting standalone.

So you have no join mechanism enabled.

@T3rm1

This comment has been minimized.

Copy link
Author

commented Jul 12, 2016

I don't understand what you mean. If I rename the config file it does work.

@pveentjer

This comment has been minimized.

Copy link
Member

commented Jul 12, 2016

Appearently there is some kind of inconsistency somewhere.

What kind of join mechanism do you want to use? Multicast? TCP IP Discovery?

http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#discovering-cluster-members

@T3rm1

This comment has been minimized.

Copy link
Author

commented Jul 12, 2016

The default one, multicast.

@pveentjer

This comment has been minimized.

Copy link
Member

commented Jul 12, 2016

You need to enable that like this:

<hazelcast>
   ...
  <network>
    ...
        <join>
            <multicast enabled="true">
            </multicast>
            <tcp-ip enabled="false">
            </tcp-ip>
            <aws enabled="false">
            </aws>
        </join>
  <network>
@T3rm1

This comment has been minimized.

Copy link
Author

commented Jul 12, 2016

Please let us not discuss how to get this working. I have already done it like you said. Thanks anyway, I created this to report a bug. As you said there is an inconsistency which seems to be related to the file name of the config. I hope you can fix this in a future release.

@vbekiaris vbekiaris self-assigned this Jul 13, 2016

@vbekiaris

This comment has been minimized.

Copy link
Contributor

commented Jul 14, 2016

Thanks @T3rm1 for reporting this, the issue has already been addressed in 3.7 by #8123.

@vbekiaris vbekiaris closed this Jul 14, 2016

@vbekiaris vbekiaris modified the milestones: 3.7, 3.8 Jul 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.