Windows Firewall inbound rules and environment PATH variable
Asked Answered
B

1

0

Consider the following scenario:

Jenkins running with a master on machine A and a slave on machine B. Rather than the master's XML config referring to a hard coded Java path it was changed to reference 'java', in the environment PATH variable. This works fine for the master running on machine A, however the slave on machine B is no longer able to connect to the master host PC.

The (Windows) firewall rules for inbound traffic on machine A allow inbound communication on any protocol and port connections to 'C:\Program Files\Java\jre7\bin\java.exe', so the Jenkins service should work but it isn't. The only way I can make the connection work is by disabling the firewall.

Bainite answered 5/7, 2013 at 0:21 Comment(0)
B
0

Despite setting the inbound firewall rule to allow any connections to 'java', hoping it would pick up the environment PATH value, I still couldn't get the connection working.

In the end changing the jenkins.xml file to not use the 'java' PATH variable and instead use 'C:\Program Files\Java\jre7\bin\java.exe' and setting the inbound firewall rule back to match this worked.

Interesting that Windows saw the PATH variable and the literal file path so differently that it didn't satisfy the firewall rule (perhaps it's by design and a security feature?).

Bainite answered 5/7, 2013 at 0:21 Comment(1)
What exactly did you enter (when you expected the PATH to be used) ?Nevers

© 2022 - 2024 — McMap. All rights reserved.