Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server doesn't listen on IPv4 on Raspberry Pi #676

Closed
sgruby opened this issue Jun 21, 2017 · 2 comments
Closed

Server doesn't listen on IPv4 on Raspberry Pi #676

sgruby opened this issue Jun 21, 2017 · 2 comments

Comments

@sgruby
Copy link

sgruby commented Jun 21, 2017

I installed HA Bridge on a Raspberry Pi 2 today (latest Raspbian Jessie Lite) and installed the java 8 SDK. In troubleshooting the startup, I realized that while it was listening on all interfaces, it was only listening on IPv6. I found a reference on the Vera forums that I need to add:

-Djava.net.preferIPv4Stack=true

On the line that starts the bridge for Raspberry Pi. It might be useful to add this in the documentation.

ExecStart=/usr/bin/java -jar -Dconfig.file=/home/pi/habridge/data/habridge.config -Djava.net.preferIPv4Stack=true /home/pi/habridge/ha-bridge.jar

@bwssytems
Copy link
Owner

Yes, I see that now as well. Will need to see what sparkjava is doing as of some version around 2, this code is called:

        String ipV6Stack = System.getProperty("ipV6Stack");
        if(ipV6Stack == null || !ipV6Stack.equalsIgnoreCase("true")) {
        	System.setProperty("java.net.preferIPv4Stack" , "true");

@bwssytems
Copy link
Owner

Well, looking into the internal set and it is not valid after the vm starts, it must be passed on the command line. Thanks, will update the documentation.

@bwssytems bwssytems added this to the v4.5.6 milestone Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants