Showing exception while connecting slave to master using headless jnlp

Deadly 提交于 2019-12-10 15:27:38

问题


i am using jenkins 1.447.2 version.My master is linux and slave is windows

    Jul 27, 2012 12:44:17 PM hudson.remoting.jnlp.Main$CuiListener <init>
    INFO: Hudson agent is running in headless mode.
    Jul 27, 2012 12:44:17 PM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Locating server among [http://10.10.1.162:8080/jenkins/, http://dem
     Jul 27, 2012 12:44:38 PM hudson.remoting.jnlp.Main$CuiListener status
    INFO: Connecting to demo.sigmainfo.in:8050
     Jul 27, 2012 12:44:38 PM hudson.remoting.jnlp.Main$CuiListener status
     INFO: Handshaking
     Jul 27, 2012 12:44:58 PM hudson.remoting.jnlp.Main$CuiListener error
     SEVERE: The server rejected the connection:
     java.lang.Exception: The server rejected the connection:
     at hudson.remoting.Engine.onConnectionRejected(Engine.java:258)
     at hudson.remoting.Engine.run(Engine.java:233)

I am getting above error while tring to connect slave to master of jenkins..I got this error since i make master as static.(IP).

How to resolve this problem?


回答1:


JNLP slave connection problems are usually due to incorrect "Jenkins URL" setting in Jenkins global configuration. Please verify it.

If the setting is correct, I think you need to seriously consider the possibility that something is blocking the connection between your Windows slave and Linux master. Could there be a firewall installed on one or both hosts?

If there is a firewall, you might want to first set up a fixed port for JNLP connections and then configure the firewall on Linux master to accept inbound connections to that port and configure Windows firewall to accept outbound connections to that port.

The first part I can show you: Go to Jenkins master, Manage Jenkins, System Configuration. Check the box "Activate security".

A new section will appear. Check the box "TCP port for JNLP slave agents" and set any free port number you want. Please note that non-root processes cannot use ports under 1024, so you should choose something above that. Port numbers are 16 bit unsigned integers, so maximum is 65535.

The second part about firewall configuration I cannot help you with. How to allow access to the JNLP port is entirely up to the firewall software on your master and slave. Please refer to the manuals of those for details.

If it still does not work, I suggest you use tcpdump host demo.sigmainfo.in to see if the slave is really sending packets to the right interface of the right host.




回答2:


Once, I had this error because I already had a connection up, so check your connections.




回答3:


With a windows master and mac jenkins slave, I got;

 java.lang.exception: the serverrejected the connection: None of the protocols were accepted

because I had changed our machine's credentials and had failed to inform jenkins. Since the error seems so far off from the issue, I thought I would post for my future self.



来源:https://stackoverflow.com/questions/11688744/showing-exception-while-connecting-slave-to-master-using-headless-jnlp

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