oracle / coherence

Oracle Coherence Community Edition
https://coherence.community
Universal Permissive License v1.0
427 stars 70 forks source link

Multicast error message on MacOS #121

Closed javafanboy closed 4 months ago

javafanboy commented 4 months ago

After a long period of using a Windows I just switched back to using Mac (this time ARM M3) and ran into a problem I have never experienced before starting Coherence locally :-(

This is using Coherence CE 24.03, Java Open JDK 21 and MacOS Sonoma 14.3.1

When I run "mvn exec:java -Dexec.mainClass="com.tangosol.net.DefaultCacheServer" I get an error message saying "multicast networking appears to be inoperable on interface 192.168.1.19 as this process isn't receiving even its own transmissions"...

Just for fun I tested using the coherence console app and to my surprise it can without any problem start a 3 node cluster, I could insert data etc. so there is nothing wrong with the MacOS setup it seems so the question is why I get this error when I try to do it myself using mvn rather than with the command line client?!

I also tried the suggested work-around of setting "set JAVA_TOOL_OPTS="-Djava.net.preferIPv4Stack=true" but it did not make any difference so the problem seem to be something else...

I also tried copying and running the exact same project on one of my Windows boxes and there it ran as it always have without any errors....

Probably some really silly Mac beginners misstake but right now I do not see it... suggestions appreciated!

javafanboy commented 4 months ago

Still no idea why this error occurs on MacOS but if anybody else experience the same problem a work-around is to disable Coherence use of multicast by using the WKA setting of cluster member discovery. As I am running on a single laptop for my development I simply set -Dtangosol.coherence.wka=127.0.0.1

mgamanho commented 4 months ago

Hi, what are you firewall settings? Also normally multicast is enabled on Mac, but could be disabled in your case. Could you check the output of ifconfig on the interface you're using? Thanks

javafanboy commented 4 months ago

This is a "company managed" laptop so there COULD be some firewall settings that I am not aware of. The ifconfig output for the default interface (that I assume Java/Coherence will use) is:

ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP> inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 nd6 options=201<PERFORMNUD,DAD> gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 stf0: flags=0<> mtu 1280 anpi2: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400 ether fa:e8:94:69:ec:c8 media: none status: inactive anpi1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400 ether fa:e8:94:69:ec:c7 media: none status: inactive anpi0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400 ether fa:e8:94:69:ec:c6 media: none status: inactive en4: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400 ether fa:e8:94:69:ec:a6 nd6 options=201<PERFORMNUD,DAD> media: none status: inactive en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400 ether fa:e8:94:69:ec:a7 nd6 options=201<PERFORMNUD,DAD> media: none status: inactive en6: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400 ether fa:e8:94:69:ec:a8 nd6 options=201<PERFORMNUD,DAD> media: none status: inactive en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 36:33:85:19:0f:40 media: autoselect status: inactive en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 36:33:85:19:0f:44 media: autoselect status: inactive en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 36:33:85:19:0f:48 media: autoselect status: inactive bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=63<RXCSUM,TXCSUM,TSO4,TSO6> ether 36:33:85:19:0f:40 Configuration: id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0 maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200 root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0 ipfilter disabled flags 0x0 member: en1 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 10 priority 0 path cost 0 member: en2 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 11 priority 0 path cost 0 member: en3 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 12 priority 0 path cost 0 nd6 options=201<PERFORMNUD,DAD> media: status: inactive ap1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=6460<TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM> ether 62:3e:5f:5d:c2:79 inet6 fe80::603e:5fff:fe5d:c279%ap1 prefixlen 64 scopeid 0xe nd6 options=201<PERFORMNUD,DAD> media: autoselect () status: inactive en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=6460<TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM> ether 60:3e:5f:5d:c2:79 inet6 fe80::144f:4462:41e5:54df%en0 prefixlen 64 secured scopeid 0xf inet 192.168.1.19 netmask 0xfffffc00 broadcast 192.168.3.255 inet6 fda8:1826:27fe:9a89:13:e7c6:f5dd:370f prefixlen 64 autoconf secured nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active awdl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=6460<TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM> ether f6:5c:50:a9:d1:ab inet6 fe80::f45c:50ff:fea9:d1ab%awdl0 prefixlen 64 scopeid 0x10 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400 ether f6:5c:50:a9:d1:ab inet6 fe80::f45c:50ff:fea9:d1ab%llw0 prefixlen 64 scopeid 0x11 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: inactive utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500 inet6 fe80::8a1e:c15c:513f:5853%utun0 prefixlen 64 scopeid 0x12 nd6 options=201<PERFORMNUD,DAD> utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380 inet6 fe80::6002:31c4:27be:169c%utun1 prefixlen 64 scopeid 0x13 nd6 options=201<PERFORMNUD,DAD> utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000 inet6 fe80::6b2f:ca10:56a1:681a%utun2 prefixlen 64 scopeid 0x14 nd6 options=201<PERFORMNUD,DAD> utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1000 inet6 fe80::ce81:b1c:bd2c:69e%utun3 prefixlen 64 scopeid 0x15 nd6 options=201<PERFORMNUD,DAD> vmenet0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 ether 9e:18:90:c7:e3:c8 media: autoselect status: active vmenet1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 ether 82:7e:44:f7:86:7f media: autoselect status: active bridge100: flags=8a63<UP,BROADCAST,SMART,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500 options=3<RXCSUM,TXCSUM> ether 62:3e:5f:d5:55:64 inet 192.168.64.1 netmask 0xffffff00 broadcast 192.168.64.255 inet6 fe80::603e:5fff:fed5:5564%bridge100 prefixlen 64 scopeid 0x18 inet6 fd5d:fa7f:f824:34f1:83f:e067:3b1:79d3 prefixlen 64 autoconf secured Configuration: id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0 maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200 root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0 ipfilter disabled flags 0x0 member: vmenet0 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 22 priority 0 path cost 0 member: vmenet1 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 23 priority 0 path cost 0 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active

mgamanho commented 4 months ago

Ok, Coherence will likely pick en0 and it is multicast-capable.

What about firewall? Does it allow inbound multicast traffic? I think the setting is "Stealth mode" or some such.

javafanboy commented 4 months ago

Yes "Stealth Mode" is enabled and not possible to disable so if that blocks "multicast" then we know the reason for the problem... big thanks for the sugestion!

Setting the wka option to local host is a quite ok workaround for local testing so no big deal!

On Tue, Apr 23, 2024 at 6:36 PM Maurice Gamanho @.***> wrote:

Ok, Coherence will likely pick en0 and it is multicast-capable.

What about firewall? Does it allow inbound multicast traffic? I think the setting is "Stealth mode" or some such.

— Reply to this email directly, view it on GitHub https://github.com/oracle/coherence/issues/121#issuecomment-2072888043, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADXQF2QOIQG4CSDJRLJ33TY62EZVAVCNFSM6AAAAABGFFEFYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZSHA4DQMBUGM . You are receiving this because you authored the thread.Message ID: @.***>

javafanboy commented 4 months ago

Thanks again for the help!