Windows Firewall inbound rules and environment PATH variable

余生颓废 提交于 2019-12-12 01:07:51

问题


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.


回答1:


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?).



来源:https://stackoverflow.com/questions/17479565/windows-firewall-inbound-rules-and-environment-path-variable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!