shortishly / mdns

Multicast DNS in Erlang/OTP
Apache License 2.0
52 stars 15 forks source link

Nodes not discovering #1

Open Licenser opened 12 years ago

Licenser commented 12 years ago

Hi there I as pretty excited finding this :) but sadly I totally fail to get it working :(

I see the nodes in the ./browse.sh script but they don't seem to see eachother at all.

Browsing for _erlang._tcp
Talking to DNS SD Daemon at Mach port 5891
Timestamp     A/R Flags Domain                   Service Type             Instance Name
16:41:35.161  Add     1 local.                   _erlang._tcp.            snarl@Schroedinger
16:41:35.161  Add     1 local.                   _erlang._tcp.            wiggle@Schroedinger
16:41:35.161  Add     0 local.                   _erlang._tcp.            sniffle@Schroedinger

On the two nodes I ran (same on the second node with equivalent results):

(wiggle@Schroedinger.local)5> mdns:start().
ok
(wiggle@Schroedinger.local)7> mdns:discovered().
[]
(wiggle@Schroedinger.local)9> mdns_node_discovery:advertise().
ok
(wiggle@Schroedinger.local)10> mdns:discovered().              
[]
(wiggle@Schroedinger.local)11> nodes().
[]
shortishly commented 12 years ago

Hi. I've just pushed a commit which causes the connect handler to crash if it can't connect to the newly discovered node. Also changed the advertisement so that the hostname is included as part of the broadcast resource record, which is now used to connect the nodes together.

On one host:

./start-dev.sh a

On the same or different host:

./start-dev.sh b

On the original host:

(a@impel102d.home)1> nodes().
['a@impel101d.home']

On the original host:

(a@impel101d.home)1> nodes().
['a@impel102d.home']

If they fail to connect, the handler should now crash. Usual things to check - do a net_adm:ping(Host) to make sure that they can connect normally.

Licenser commented 12 years ago

Hi, thanks for looking into this, but for some reason I still face the same probem. I ran exactly ./start-dev.sh a and b (smae OSX host) and did a ./browse.sh which shows both ondes, still the nodes don't see each other.

Licenser commented 12 years ago

I've tracked down the problem - it seems that local nodes are not discovered, explictly excluded. Is there a reason behind that?

shortishly commented 12 years ago

Not a good reason. I've pushed a couple of updates that work with local (same epmd) nodes.

On 23 July 2012 14:15, Heinz N. Gies reply@reply.github.com wrote:

I've tracked down the problem - it seems that local nodes are not discovered, explictly excluded. Is there a reason behind that?


Reply to this email directly or view it on GitHub: https://github.com/shortishly/erlang-mdns/issues/1#issuecomment-7177485