我已经在AWS ec2上设置了一个Jenkins实例。我随身带了几台机器(Ubuntu,Mac),它们应该是从属的。
我已经在我的Jenkins主机上配置了节点,并且我正在尝试通过随机端口使用JNLP-4协议连接从机。
我已经启用了安全性,选择了代理的TCP端口作为随机,启用远程命令行界面,启用代理->主访问控制。
完成所有这些操作后,当我尝试连接时,我得到以下错误:
Vighneshs-MBP:Downloads vighneshpai$ java -jar agent.jar -jnlpUrl https://my.host.name/computer/Mac/slave-agent.jnlp -secret cf400d1a4e0a1dcc75da2b361efafbce3321e17b935bdcf14350a36e
Oct 11, 2018 8:43:50 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: Mac
Oct 11, 2018 8:43:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Oct 11, 2018 8:43:50 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 3.25
Oct 11, 2018 8:43:50 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /Users/vighneshpai/Downloads/remoting as a remoting work directory
Both error and output logs will be printed to /Users/vighneshpai/Downloads/remoting
Oct 11, 2018 8:43:50 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://my.host.name/]
Oct 11, 2018 8:43:51 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, JNLP-connect, Ping, JNLP2-connect, JNLP3-connect]
Oct 11, 2018 8:43:56 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver isPortVisible
WARNING: connect timed out
Oct 11, 2018 8:43:56 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: https://my.host.name/ provided port:49187 is not reachable
java.io.IOException: https://my.host.name/ provided port:49187 is not reachable
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:286)
at hudson.remoting.Engine.innerRun(Engine.java:523)
at hudson.remoting.Engine.run(Engine.java:474)我还尝试使用固定端口,并将该端口添加到允许入站访问的端口列表中。仍然无法连接。
相同的机器,没有任何问题连接到在本地机器上运行的Jenkins。
可能的问题是什么?
发布于 2018-12-12 15:38:11
在/etc/default/jenkins中设置属性-Dhudson.TcpSlaveAgentListener.hostName解决了我的问题。
发布于 2019-03-07 11:35:26
将端口更改为固定而不是随机,并允许aws中的该特定端口作为TCP的例外,解决了此问题。
发布于 2019-03-20 15:13:00
如果你在环境变量中设置了http_ proxy /https_proxy (这是一个jenkins不喜欢的代理),那么它也会抛出这个隐含的错误。
https://stackoverflow.com/questions/52764668
复制相似问题