Azure windows slave keeps disconnecting

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Azure windows slave keeps disconnecting

Shubham Bansal
I have a Linux Azure machine as master and it connects to the windows slave machine using the option "Launch Agent by connecting it to master"

This connects the agent fine but gets disconnected after some time (around 20-30 minutes). I tried running the agent as windows service but the service keeps restarting frequently causing the build to fail of it is triggered at this time of restart process. 

Can someone here suggest a more robust way to connect?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Azure windows slave keeps disconnecting

Mark Waite-2
Connecting the agent to the master is a robust way to connect.  Many users around the world use that method to connect agents to masters, including Windows masters, Linux masters, and other platforms.

If the agent is being disconnected after some time, there may be something on the agent computer which kills the client process that runs on the agent (for example, some program that won't allow Java programs to run for an extended period).  If the agent process dies or is killed on the agent computer, the agent will be disconnected.  If you're running the agent process from the command line, then you may find hints to the cause of the command line failure in the command prompt window that launched the agent.  If you're running the agent process by clicking the "Launch" button to launch the agent from the browser, you may want to try running the agent from the command line instead, just in case some diagnostic messages might help you.

There may be something in the networking definition between the master and the agents which is causing the agent process to die.  Usually, when the network connection is interrupted between a master and  agent launched to connect to the master.  This seems less likely to be the problem, since you mentioned that the when running as a restart, the service restarted frequently.

On Mon, Aug 5, 2019 at 5:46 AM Shubham Bansal <[hidden email]> wrote:
I have a Linux Azure machine as master and it connects to the windows slave machine using the option "Launch Agent by connecting it to master"

This connects the agent fine but gets disconnected after some time (around 20-30 minutes). I tried running the agent as windows service but the service keeps restarting frequently causing the build to fail of it is triggered at this time of restart process. 

Can someone here suggest a more robust way to connect?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGOi2C1UjaNb-9w%2B7Tk4OCeNenTDSQjDcac-i8KuDRi%2Bg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Azure windows slave keeps disconnecting

Shubham Bansal
https://pastebin.com/ib0PK5af

Can you tell me more from these logs of the slave windows machine?


On Monday, 5 August 2019 17:42:23 UTC+5:30, Mark Waite wrote:
Connecting the agent to the master is a robust way to connect.  Many users around the world use that method to connect agents to masters, including Windows masters, Linux masters, and other platforms.

If the agent is being disconnected after some time, there may be something on the agent computer which kills the client process that runs on the agent (for example, some program that won't allow Java programs to run for an extended period).  If the agent process dies or is killed on the agent computer, the agent will be disconnected.  If you're running the agent process from the command line, then you may find hints to the cause of the command line failure in the command prompt window that launched the agent.  If you're running the agent process by clicking the "Launch" button to launch the agent from the browser, you may want to try running the agent from the command line instead, just in case some diagnostic messages might help you.

There may be something in the networking definition between the master and the agents which is causing the agent process to die.  Usually, when the network connection is interrupted between a master and  agent launched to connect to the master.  This seems less likely to be the problem, since you mentioned that the when running as a restart, the service restarted frequently.

On Mon, Aug 5, 2019 at 5:46 AM Shubham Bansal <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="FswaxuOeFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sbans...@...> wrote:
I have a Linux Azure machine as master and it connects to the windows slave machine using the option "Launch Agent by connecting it to master"

This connects the agent fine but gets disconnected after some time (around 20-30 minutes). I tried running the agent as windows service but the service keeps restarting frequently causing the build to fail of it is triggered at this time of restart process. 

Can someone here suggest a more robust way to connect?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="FswaxuOeFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Azure windows slave keeps disconnecting

Mark Waite-2
When the master log says:

  1. Aug 05, 2019 8:54:51 AM hudson.remoting.jnlp.Main$CuiListener error
  2. SEVERE: The server rejected the connection: None of the protocols were accepted
  3. java.lang.Exception: The server rejected the connection: None of the protocols were accepted
  4.     at hudson.remoting.Engine.onConnectionRejected(Engine.java:682)
  5.     at hudson.remoting.Engine.innerRun(Engine.java:639)
  6.     at hudson.remoting.Engine.run(Engine.java:474)

that might hint that either something is damaging the communication between the agent or something is changing the configuration of the master to reject agent protocols that were previously accepted.  The protocols which are accepted can be modified from a "Configure Global Security" page of "Manage Jenkins".  The "Agents" section of that page includes a link to enable and disable specific protocols.

On Mon, Aug 5, 2019 at 6:29 AM Shubham Bansal <[hidden email]> wrote:
https://pastebin.com/ib0PK5af

Can you tell me more from these logs of the slave windows machine?


On Monday, 5 August 2019 17:42:23 UTC+5:30, Mark Waite wrote:
Connecting the agent to the master is a robust way to connect.  Many users around the world use that method to connect agents to masters, including Windows masters, Linux masters, and other platforms.

If the agent is being disconnected after some time, there may be something on the agent computer which kills the client process that runs on the agent (for example, some program that won't allow Java programs to run for an extended period).  If the agent process dies or is killed on the agent computer, the agent will be disconnected.  If you're running the agent process from the command line, then you may find hints to the cause of the command line failure in the command prompt window that launched the agent.  If you're running the agent process by clicking the "Launch" button to launch the agent from the browser, you may want to try running the agent from the command line instead, just in case some diagnostic messages might help you.

There may be something in the networking definition between the master and the agents which is causing the agent process to die.  Usually, when the network connection is interrupted between a master and  agent launched to connect to the master.  This seems less likely to be the problem, since you mentioned that the when running as a restart, the service restarted frequently.

On Mon, Aug 5, 2019 at 5:46 AM Shubham Bansal <[hidden email]> wrote:
I have a Linux Azure machine as master and it connects to the windows slave machine using the option "Launch Agent by connecting it to master"

This connects the agent fine but gets disconnected after some time (around 20-30 minutes). I tried running the agent as windows service but the service keeps restarting frequently causing the build to fail of it is triggered at this time of restart process. 

Can someone here suggest a more robust way to connect?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEKRT8eYNUkoRTmMf%2B4sjKtbyCuBHp6TkVm%2B06JJFjSaA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Azure windows slave keeps disconnecting

Shubham Bansal
The protocol is chosen as "Inbound TCP Agent Protocol/4 (TLS encryption)" with fixed port "5378". 
What can possibly be an issue here?
And you have mentioned that something is changing the configuration, is there a way to figure that out what is the cause?

On Monday, 5 August 2019 18:17:05 UTC+5:30, Mark Waite wrote:
When the master log says:

  1. Aug 05, 2019 8:54:51 AM hudson.remoting.jnlp.Main$CuiListener error
  2. SEVERE: The server rejected the connection: None of the protocols were accepted
  3. java.lang.Exception: The server rejected the connection: None of the protocols were accepted
  4.     at hudson.remoting.Engine.onConnectionRejected(Engine.java:682)
  5.     at hudson.remoting.Engine.innerRun(Engine.java:639)
  6.     at hudson.remoting.Engine.run(Engine.java:474)

that might hint that either something is damaging the communication between the agent or something is changing the configuration of the master to reject agent protocols that were previously accepted.  The protocols which are accepted can be modified from a "Configure Global Security" page of "Manage Jenkins".  The "Agents" section of that page includes a link to enable and disable specific protocols.

On Mon, Aug 5, 2019 at 6:29 AM Shubham Bansal <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="V1eMecigFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sbans...@...> wrote:
<a href="https://pastebin.com/ib0PK5af" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2Fib0PK5af\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3yZohlR94eDo4EmmZOmtVzUgpQg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2Fib0PK5af\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3yZohlR94eDo4EmmZOmtVzUgpQg&#39;;return true;">https://pastebin.com/ib0PK5af

Can you tell me more from these logs of the slave windows machine?


On Monday, 5 August 2019 17:42:23 UTC+5:30, Mark Waite wrote:
Connecting the agent to the master is a robust way to connect.  Many users around the world use that method to connect agents to masters, including Windows masters, Linux masters, and other platforms.

If the agent is being disconnected after some time, there may be something on the agent computer which kills the client process that runs on the agent (for example, some program that won't allow Java programs to run for an extended period).  If the agent process dies or is killed on the agent computer, the agent will be disconnected.  If you're running the agent process from the command line, then you may find hints to the cause of the command line failure in the command prompt window that launched the agent.  If you're running the agent process by clicking the "Launch" button to launch the agent from the browser, you may want to try running the agent from the command line instead, just in case some diagnostic messages might help you.

There may be something in the networking definition between the master and the agents which is causing the agent process to die.  Usually, when the network connection is interrupted between a master and  agent launched to connect to the master.  This seems less likely to be the problem, since you mentioned that the when running as a restart, the service restarted frequently.

On Mon, Aug 5, 2019 at 5:46 AM Shubham Bansal <[hidden email]> wrote:
I have a Linux Azure machine as master and it connects to the windows slave machine using the option "Launch Agent by connecting it to master"

This connects the agent fine but gets disconnected after some time (around 20-30 minutes). I tried running the agent as windows service but the service keeps restarting frequently causing the build to fail of it is triggered at this time of restart process. 

Can someone here suggest a more robust way to connect?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="V1eMecigFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/62ac473f-9777-4a88-a996-0255c7abf851%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Azure windows slave keeps disconnecting

Shubham Bansal
In reply to this post by Mark Waite-2
https://pastebin.com/yzL2vE9g

On Monday, 5 August 2019 18:17:05 UTC+5:30, Mark Waite wrote:
When the master log says:

  1. Aug 05, 2019 8:54:51 AM hudson.remoting.jnlp.Main$CuiListener error
  2. SEVERE: The server rejected the connection: None of the protocols were accepted
  3. java.lang.Exception: The server rejected the connection: None of the protocols were accepted
  4.     at hudson.remoting.Engine.onConnectionRejected(Engine.java:682)
  5.     at hudson.remoting.Engine.innerRun(Engine.java:639)
  6.     at hudson.remoting.Engine.run(Engine.java:474)

that might hint that either something is damaging the communication between the agent or something is changing the configuration of the master to reject agent protocols that were previously accepted.  The protocols which are accepted can be modified from a "Configure Global Security" page of "Manage Jenkins".  The "Agents" section of that page includes a link to enable and disable specific protocols.

On Mon, Aug 5, 2019 at 6:29 AM Shubham Bansal <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="V1eMecigFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sbans...@...> wrote:
<a href="https://pastebin.com/ib0PK5af" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2Fib0PK5af\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3yZohlR94eDo4EmmZOmtVzUgpQg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2Fib0PK5af\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3yZohlR94eDo4EmmZOmtVzUgpQg&#39;;return true;">https://pastebin.com/ib0PK5af

Can you tell me more from these logs of the slave windows machine?


On Monday, 5 August 2019 17:42:23 UTC+5:30, Mark Waite wrote:
Connecting the agent to the master is a robust way to connect.  Many users around the world use that method to connect agents to masters, including Windows masters, Linux masters, and other platforms.

If the agent is being disconnected after some time, there may be something on the agent computer which kills the client process that runs on the agent (for example, some program that won't allow Java programs to run for an extended period).  If the agent process dies or is killed on the agent computer, the agent will be disconnected.  If you're running the agent process from the command line, then you may find hints to the cause of the command line failure in the command prompt window that launched the agent.  If you're running the agent process by clicking the "Launch" button to launch the agent from the browser, you may want to try running the agent from the command line instead, just in case some diagnostic messages might help you.

There may be something in the networking definition between the master and the agents which is causing the agent process to die.  Usually, when the network connection is interrupted between a master and  agent launched to connect to the master.  This seems less likely to be the problem, since you mentioned that the when running as a restart, the service restarted frequently.

On Mon, Aug 5, 2019 at 5:46 AM Shubham Bansal <[hidden email]> wrote:
I have a Linux Azure machine as master and it connects to the windows slave machine using the option "Launch Agent by connecting it to master"

This connects the agent fine but gets disconnected after some time (around 20-30 minutes). I tried running the agent as windows service but the service keeps restarting frequently causing the build to fail of it is triggered at this time of restart process. 

Can someone here suggest a more robust way to connect?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="V1eMecigFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a84ee633-920b-462c-9243-cd5e56542bd0%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Azure windows slave keeps disconnecting

Mark Waite-2
In reply to this post by Shubham Bansal


On Mon, Aug 5, 2019 at 6:54 AM Shubham Bansal <[hidden email]> wrote:
The protocol is chosen as "Inbound TCP Agent Protocol/4 (TLS encryption)" with fixed port "5378". 

That's a reasonable configuration.  That is listed as an unassigned port in at least one of the ports databases, so it should be reasonable to use that port number.
 
What can possibly be an issue here?

Something on the agent could be killing the agent process.
Something on the network between the agent and the master could be breaking or damaging the communication.
Something on the master could be breaking or damaging the communication between the agent and the master.
 
And you have mentioned that something is changing the configuration, is there a way to figure that out what is the cause?

Unless you see protocol 4 listed as disabled, then it is unlikely that anything has changed the configuration.  I was speculating that something might be changing the configuration, but if something is changing the configuration, then you should see the protocol listed as 'disabled' instead of 'enabled'.

Mark Waite
 

On Monday, 5 August 2019 18:17:05 UTC+5:30, Mark Waite wrote:
When the master log says:

  1. Aug 05, 2019 8:54:51 AM hudson.remoting.jnlp.Main$CuiListener error
  2. SEVERE: The server rejected the connection: None of the protocols were accepted
  3. java.lang.Exception: The server rejected the connection: None of the protocols were accepted
  4.     at hudson.remoting.Engine.onConnectionRejected(Engine.java:682)
  5.     at hudson.remoting.Engine.innerRun(Engine.java:639)
  6.     at hudson.remoting.Engine.run(Engine.java:474)

that might hint that either something is damaging the communication between the agent or something is changing the configuration of the master to reject agent protocols that were previously accepted.  The protocols which are accepted can be modified from a "Configure Global Security" page of "Manage Jenkins".  The "Agents" section of that page includes a link to enable and disable specific protocols.

On Mon, Aug 5, 2019 at 6:29 AM Shubham Bansal <[hidden email]> wrote:
https://pastebin.com/ib0PK5af

Can you tell me more from these logs of the slave windows machine?


On Monday, 5 August 2019 17:42:23 UTC+5:30, Mark Waite wrote:
Connecting the agent to the master is a robust way to connect.  Many users around the world use that method to connect agents to masters, including Windows masters, Linux masters, and other platforms.

If the agent is being disconnected after some time, there may be something on the agent computer which kills the client process that runs on the agent (for example, some program that won't allow Java programs to run for an extended period).  If the agent process dies or is killed on the agent computer, the agent will be disconnected.  If you're running the agent process from the command line, then you may find hints to the cause of the command line failure in the command prompt window that launched the agent.  If you're running the agent process by clicking the "Launch" button to launch the agent from the browser, you may want to try running the agent from the command line instead, just in case some diagnostic messages might help you.

There may be something in the networking definition between the master and the agents which is causing the agent process to die.  Usually, when the network connection is interrupted between a master and  agent launched to connect to the master.  This seems less likely to be the problem, since you mentioned that the when running as a restart, the service restarted frequently.

On Mon, Aug 5, 2019 at 5:46 AM Shubham Bansal <[hidden email]> wrote:
I have a Linux Azure machine as master and it connects to the windows slave machine using the option "Launch Agent by connecting it to master"

This connects the agent fine but gets disconnected after some time (around 20-30 minutes). I tried running the agent as windows service but the service keeps restarting frequently causing the build to fail of it is triggered at this time of restart process. 

Can someone here suggest a more robust way to connect?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/62ac473f-9777-4a88-a996-0255c7abf851%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF%2BsWkLFiDm5W_oBx9JMyRuFJNcGgeBYpjAxqU_Hb%3Di%3DQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Azure windows slave keeps disconnecting

Shubham Bansal

https://pastebin.com/yzL2vE9g
Did you see these logs?


On Monday, 5 August 2019 21:01:46 UTC+5:30, Mark Waite wrote:


On Mon, Aug 5, 2019 at 6:54 AM Shubham Bansal <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="KgrYNMWpFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sbans...@...> wrote:
The protocol is chosen as "Inbound TCP Agent Protocol/4 (TLS encryption)" with fixed port "5378". 

That's a reasonable configuration.  That is listed as an unassigned port in at least one of the <a href="https://www.speedguide.net/port.php?port=5378" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.speedguide.net%2Fport.php%3Fport%3D5378\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFq2kC5R6BzmeouPON_Q-yE7fpojA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.speedguide.net%2Fport.php%3Fport%3D5378\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFq2kC5R6BzmeouPON_Q-yE7fpojA&#39;;return true;">ports databases, so it should be reasonable to use that port number.
 
What can possibly be an issue here?

Something on the agent could be killing the agent process.
Something on the network between the agent and the master could be breaking or damaging the communication.
Something on the master could be breaking or damaging the communication between the agent and the master.
 
And you have mentioned that something is changing the configuration, is there a way to figure that out what is the cause?

Unless you see protocol 4 listed as disabled, then it is unlikely that anything has changed the configuration.  I was speculating that something might be changing the configuration, but if something is changing the configuration, then you should see the protocol listed as 'disabled' instead of 'enabled'.

Mark Waite
 

On Monday, 5 August 2019 18:17:05 UTC+5:30, Mark Waite wrote:
When the master log says:

  1. Aug 05, 2019 8:54:51 AM hudson.remoting.jnlp.Main$CuiListener error
  2. SEVERE: The server rejected the connection: None of the protocols were accepted
  3. java.lang.Exception: The server rejected the connection: None of the protocols were accepted
  4.     at hudson.remoting.Engine.onConnectionRejected(Engine.java:682)
  5.     at hudson.remoting.Engine.innerRun(Engine.java:639)
  6.     at hudson.remoting.Engine.run(Engine.java:474)

that might hint that either something is damaging the communication between the agent or something is changing the configuration of the master to reject agent protocols that were previously accepted.  The protocols which are accepted can be modified from a "Configure Global Security" page of "Manage Jenkins".  The "Agents" section of that page includes a link to enable and disable specific protocols.

On Mon, Aug 5, 2019 at 6:29 AM Shubham Bansal <[hidden email]> wrote:
<a href="https://pastebin.com/ib0PK5af" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2Fib0PK5af\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3yZohlR94eDo4EmmZOmtVzUgpQg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fpastebin.com%2Fib0PK5af\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3yZohlR94eDo4EmmZOmtVzUgpQg&#39;;return true;">https://pastebin.com/ib0PK5af

Can you tell me more from these logs of the slave windows machine?


On Monday, 5 August 2019 17:42:23 UTC+5:30, Mark Waite wrote:
Connecting the agent to the master is a robust way to connect.  Many users around the world use that method to connect agents to masters, including Windows masters, Linux masters, and other platforms.

If the agent is being disconnected after some time, there may be something on the agent computer which kills the client process that runs on the agent (for example, some program that won't allow Java programs to run for an extended period).  If the agent process dies or is killed on the agent computer, the agent will be disconnected.  If you're running the agent process from the command line, then you may find hints to the cause of the command line failure in the command prompt window that launched the agent.  If you're running the agent process by clicking the "Launch" button to launch the agent from the browser, you may want to try running the agent from the command line instead, just in case some diagnostic messages might help you.

There may be something in the networking definition between the master and the agents which is causing the agent process to die.  Usually, when the network connection is interrupted between a master and  agent launched to connect to the master.  This seems less likely to be the problem, since you mentioned that the when running as a restart, the service restarted frequently.

On Mon, Aug 5, 2019 at 5:46 AM Shubham Bansal <[hidden email]> wrote:
I have a Linux Azure machine as master and it connects to the windows slave machine using the option "Launch Agent by connecting it to master"

This connects the agent fine but gets disconnected after some time (around 20-30 minutes). I tried running the agent as windows service but the service keeps restarting frequently causing the build to fail of it is triggered at this time of restart process. 

Can someone here suggest a more robust way to connect?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="KgrYNMWpFgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/62ac473f-9777-4a88-a996-0255c7abf851%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/62ac473f-9777-4a88-a996-0255c7abf851%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/62ac473f-9777-4a88-a996-0255c7abf851%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/62ac473f-9777-4a88-a996-0255c7abf851%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/df5822e6-082f-4cc2-9b89-8ce5570d3f98%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Azure windows slave keeps disconnecting

Mark Waite-2


On Mon, Aug 5, 2019 at 9:33 AM Shubham Bansal <[hidden email]> wrote:

https://pastebin.com/yzL2vE9g
Did you see these logs?


Yes. Did you see my quote from those logs in my reply 5 August 2019 18:17:05 UTC+5:30?

I don't have anything else to offer.  There are thousands of installations successfully running Jenkins masters and Jenkins agents on different machines using the same connection technique you're using.  I've made my guesses about what might be different in your environment compared to those other installations.

Mark Waite
 

On Monday, 5 August 2019 21:01:46 UTC+5:30, Mark Waite wrote:


On Mon, Aug 5, 2019 at 6:54 AM Shubham Bansal <[hidden email]> wrote:
The protocol is chosen as "Inbound TCP Agent Protocol/4 (TLS encryption)" with fixed port "5378". 

That's a reasonable configuration.  That is listed as an unassigned port in at least one of the ports databases, so it should be reasonable to use that port number.
 
What can possibly be an issue here?

Something on the agent could be killing the agent process.
Something on the network between the agent and the master could be breaking or damaging the communication.
Something on the master could be breaking or damaging the communication between the agent and the master.
 
And you have mentioned that something is changing the configuration, is there a way to figure that out what is the cause?

Unless you see protocol 4 listed as disabled, then it is unlikely that anything has changed the configuration.  I was speculating that something might be changing the configuration, but if something is changing the configuration, then you should see the protocol listed as 'disabled' instead of 'enabled'.

Mark Waite
 

On Monday, 5 August 2019 18:17:05 UTC+5:30, Mark Waite wrote:
When the master log says:

  1. Aug 05, 2019 8:54:51 AM hudson.remoting.jnlp.Main$CuiListener error
  2. SEVERE: The server rejected the connection: None of the protocols were accepted
  3. java.lang.Exception: The server rejected the connection: None of the protocols were accepted
  4.     at hudson.remoting.Engine.onConnectionRejected(Engine.java:682)
  5.     at hudson.remoting.Engine.innerRun(Engine.java:639)
  6.     at hudson.remoting.Engine.run(Engine.java:474)

that might hint that either something is damaging the communication between the agent or something is changing the configuration of the master to reject agent protocols that were previously accepted.  The protocols which are accepted can be modified from a "Configure Global Security" page of "Manage Jenkins".  The "Agents" section of that page includes a link to enable and disable specific protocols.

On Mon, Aug 5, 2019 at 6:29 AM Shubham Bansal <[hidden email]> wrote:
https://pastebin.com/ib0PK5af

Can you tell me more from these logs of the slave windows machine?


On Monday, 5 August 2019 17:42:23 UTC+5:30, Mark Waite wrote:
Connecting the agent to the master is a robust way to connect.  Many users around the world use that method to connect agents to masters, including Windows masters, Linux masters, and other platforms.

If the agent is being disconnected after some time, there may be something on the agent computer which kills the client process that runs on the agent (for example, some program that won't allow Java programs to run for an extended period).  If the agent process dies or is killed on the agent computer, the agent will be disconnected.  If you're running the agent process from the command line, then you may find hints to the cause of the command line failure in the command prompt window that launched the agent.  If you're running the agent process by clicking the "Launch" button to launch the agent from the browser, you may want to try running the agent from the command line instead, just in case some diagnostic messages might help you.

There may be something in the networking definition between the master and the agents which is causing the agent process to die.  Usually, when the network connection is interrupted between a master and  agent launched to connect to the master.  This seems less likely to be the problem, since you mentioned that the when running as a restart, the service restarted frequently.

On Mon, Aug 5, 2019 at 5:46 AM Shubham Bansal <[hidden email]> wrote:
I have a Linux Azure machine as master and it connects to the windows slave machine using the option "Launch Agent by connecting it to master"

This connects the agent fine but gets disconnected after some time (around 20-30 minutes). I tried running the agent as windows service but the service keeps restarting frequently causing the build to fail of it is triggered at this time of restart process. 

Can someone here suggest a more robust way to connect?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/245d1ca6-c04a-469d-a3c3-5ee1e96ba966%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a1bcedbd-1fa4-4bf2-866e-7652d4d6c98e%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/62ac473f-9777-4a88-a996-0255c7abf851%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/df5822e6-082f-4cc2-9b89-8ce5570d3f98%40googlegroups.com.


--
Thanks!
Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF6EK0W8_i9_XOrNu97E69299q2HyYs5zDi%3DfJfupYTCg%40mail.gmail.com.