Address family not supported by protocol family

in Help Center
Hi
My publisher runs successfully, but subscriber has the below error. It it due to IPv6 or usage of lower version of Jre like 1.6? Appreciate any kind of help.
at IceInternal.Network.doBind(Network.java:251)
at IceInternal.TcpAcceptor.<init>(TcpAcceptor.java:119)
Caused by: java.net.SocketException: Address family not supported by protocol family: bind
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at IceInternal.Network.doBind(Network.java:245)
My publisher runs successfully, but subscriber has the below error. It it due to IPv6 or usage of lower version of Jre like 1.6? Appreciate any kind of help.
at IceInternal.Network.doBind(Network.java:251)
at IceInternal.TcpAcceptor.<init>(TcpAcceptor.java:119)
Caused by: java.net.SocketException: Address family not supported by protocol family: bind
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at IceInternal.Network.doBind(Network.java:245)
0
Comments
see:
Let us know if that solve your problem.
Regards,
Jose
I am running on Vista 32 bit. Do I need to add the property in config.icebox?
If yes, then it didn't worked and I am getting the same error. Below is the property:
#
#Ice.Trace.Network=1
Ice.IPv6=0
#
# Protocol Tracing
Thanks
Sukhi
Hi
I have a publisher which I run with multiple topics and need to subscribe to all the topics. How can I do so?
Thanks
Sukhi
In that case you will need to subscribe to each topic, you can use TopicManager.retrieveAll method to retrieve a dictionary of all existing topics and then iterate over the dictionary and subscribe to each topic.
The Java code will look something like this:
How to handle the exceptions will depend on your program so i have omitted this part.
Hi Jose
I have a below scenario taking the example of clock demo in subscriber:
1. There is an inner class ClockI extends _ClockDisp.
2. Say I need to return a value from the method tick inside it, somewhat like:
public string tick(String date, Ice.Current current) {
return date;
}
Below are my 2 questions:
1. Can I do so? If yes then how to retrieve the value in run method of subscriber in below statement:
communicator().waitForShutdown();
2. When I change the return type from void to string in slice file and run the publisher I get below error: (Note: I don't have any compilation errors)
operation = "tick"
at Ice.ObjectPrxHelperBase.__checkTwowayOnly(ObjectPrxHelperBase.java:2172)
at Demo.ClockPrxHelper.tick(ClockPrxHelper.java:52)
at Demo.ClockPrxHelper.tick(ClockPrxHelper.java:29)
at Sensor.run(Sensor.java:84)
at Ice.Application.doMain(Application.java:214)
at Ice.Application.main(Application.java:194)
at Ice.Application.main(Application.java:118)
Thanks
Sukhi
See: IceStorm Concepts
When using the publish/subscriber pattern like in IceStorm the application doesn't really know how many subscriber will receive the invocation. You must be aware that the same invocation will be send to all the topic subscribers, so will not make sense to have a return value here.
If you need to return a value you have several options: