Federates can’t see each other on Linux

Today I tried to run a Federation on Ubuntu and I was surprised:
the Federates could not see each other .

After researching , I found that the Portico was not linking with the IPv4 interface.

To solve the problem , run the JAR Federate passing the parameter:

> java -Djava.net.preferIPv4Stack=true -jar tank.jar

or if you prefer , put in your code, BEFORE starting the Portico:

System.setProperty("java.net.preferIPv4Stack" , "true");

If you’re using Portico in a web application, you must put it in your setenv.sh ( for Tomcat ) or similar.

Add Comment