YS_NE
YS_NE

Reputation: 344

Getting error on running multicast test using Coherence jar

I am running multicast test on my computer to check if it can exchange packets with other nodes running at my workplace. I am connected thru vpn to workplace network. Within workplace test runs fine but not when I am on vpn. Can anyone point out what I am missing, is there something specific need to be enabled on VPN. Here is log below :

$ java -cp ./coherence-3.5.1.b461.jar -Djava.net.preferIPv4Stack=true 
com.tangosol.net.MulticastTest -group=237.0.0.1:30012 -ttl 4
2018-10-26 04:05:54.303/0.318 Oracle Coherence 3.5.1/461 <Info> 
(thread=main, member=n/a): Loaded operational configuration from 
resource "jar:file:/coherence-3.5.1.b461.jar!/tangosol-coherence.xml"
2018-10-26 04:05:54.307/0.321 Oracle Coherence 3.5.1/461 <Info> 
(thread=main, member=n/a): Loaded operational overrides from resource 
"jar:file:/coherence-3.5.1.b461.jar!/tangosol-coherence-override- 
dev.xml"
2018-10-26 04:05:54.307/0.321 Oracle Coherence 3.5.1/461 <D5> 
(thread=main, member=n/a): Optional configuration override "/tangosol- 
coherence-override.xml" is not specified
2018-10-26 04:05:54.309/0.324 Oracle Coherence 3.5.1/461 <D5> 
(thread=main, member=n/a): Optional configuration override "/custom- 
mbeans.xml" is not specified

Oracle Coherence Version 3.5.1/461
Grid Edition: Development mode
Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights 
reserved.

Starting test on ip=C02NK9NJG3QC/10.30.61.25, group=/237.0.0.1:30012, 
ttl=4
Configuring multicast socket...
2018-10-26 04:05:54.373/0.387 Oracle Coherence GE 3.5.1/461 <Error> 
(thread=main, member=n/a): An exception occurred while executing the 
MulticastTest:
2018-10-26 04:05:54.373/0.388 Oracle Coherence GE 3.5.1/461 <Error> 
(thread=main, member=n/a): (Wrapped) java.net.SocketException: Can't 
assign requested address (Error setting socket option)
at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
at com.tangosol.net.MulticastTest.initSocket(MulticastTest.java:323)
at com.tangosol.net.MulticastTest.run(MulticastTest.java:267)
at com.tangosol.net.MulticastTest.main(MulticastTest.java:126)
Caused by: java.net.SocketException: Can't assign requested address 
(Error setting socket option)
at java.net.PlainDatagramSocketImpl.socketSetOption0(Native Method)
at java.net.PlainDatagramSocketImpl.socketSetOption 
(PlainDatagramSocketImpl.java:74)
at java.net.AbstractPlainDatagramSocketImpl.setOption 
(AbstractPlainDatagramSocketImpl.java:309)
at java.net.MulticastSocket.setInterface(MulticastSocket.java:471)
at com.tangosol.net.MulticastTest.initSocket(MulticastTest.java:315)
... 2 more

2018-10-26 04:05:54.373/0.388 Oracle Coherence GE 3.5.1/461 <Error> 
(thread=main, member=n/a):

Exiting MulticastTest

Upvotes: 0

Views: 449

Answers (1)

aff
aff

Reputation: 191

Why the error?

I do not know for sure without further details & analysis, but part of this answer might explain the error you got. Here is the relevant quote, emphasis mine:

In my case I had just began using a VPN to a network that required authentication. ... but via the VPN the multicast requests were met with an authentication challenge and this error was the result.

How to fix it, or rather... what are the alternatives?

I have no direct experience in this issue, so I cannot offer the solution to your specific case:

I am running multicast test on my computer to check if it can exchange packets with other nodes running at my workplace.

But I think you can consider the alternatives depending on your needs:

Use multicast within your local network

If you actually need for the multicast to work with your computer within your local network, say for a local debugging session, and not needing to connect to machines on your workplace network, then make sure the multicast is using your local network interface.

Your computer may have different IP address for the different network interfaces it currently connect to. You can check them by issuing ipconfig/ifconfig command.

For your instance, the JVM picks a network interface whose IP is 10.30.61.25 for multicast. And it appears it have issues with using that IP. If that IP is your VPN IP, and if your local IP is 112.1.1.100, then try to specify your local IP with -local <IP>, like this:

java -cp ./coherence-3.5.1.b461.jar -Djava.net.preferIPv4Stack=true com.tangosol.net.MulticastTest -group 237.0.0.1:30012 -ttl 4 -local 112.1.1.100

Use multicast within your workplace network

If you primarily need for the multicast to work within your workplace network, then try to run the multicast only within that workplace network. So, set up the multicast test to run remotely on your workplace's servers/hosts.

Upvotes: 1

Related Questions