Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64857

Error Running Jenkins Agent as a windows service

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi, 

       

      im facing an issue while running Jenkins agent as a windows service. I have configured one of the Jenkins Slave/Node with remoting root directory using Network shared path and when i launching using web browser it is running successful. however when i click on install as a service it says connection broken msg as below, Also attached error logs for reference. 

      Kindly assist on this problem. 

       
      Connection was broken
      java.nio.channels.ClosedChannelException at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154) at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:179) at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:795) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

        Attachments

          Activity

          Hide
          mwinter69 Markus Winter added a comment -

          Seems you have a permission problem:

          Exception in thread "main" java.io.FileNotFoundException: \\Machine2\Temp_Slave\remoting\logs\remoting.log.0 (Access is denied)

          Is the service running with the same user?

          Have you configured \\Machine2\Temp_Slave as the agents root? Maybe use not a network path but a local path like c:\Temp_Slave

          Show
          mwinter69 Markus Winter added a comment - Seems you have a permission problem: Exception in thread "main" java.io.FileNotFoundException: \\Machine2\Temp_Slave\remoting\logs\remoting.log.0 (Access is denied) Is the service running with the same user? Have you configured \\Machine2\Temp_Slave as the agents root? Maybe use not a network path but a local path like c:\Temp_Slave
          Hide
          chandru_s Chandrakumar Sekar added a comment -

          Markus Winter: Im already having some agents running with use of local path which is running as launch from Browser and as a windows service. 

          When i use the network path - its success as launch from Browser and when i try to run it as a Windows service - the agent was not running and ends with generating attached error log. I assume, if its access related it should fail when i launch from Browser too ? 

          Also, i dont see any remoting root directory available in master node configuration. 

          Show
          chandru_s Chandrakumar Sekar added a comment - Markus Winter : Im already having some agents running with use of local path which is running as launch from Browser and as a windows service.  When i use the network path - its success as launch from Browser and when i try to run it as a Windows service - the agent was not running and ends with generating attached error log. I assume, if its access related it should fail when i launch from Browser too ?  Also, i dont see any remoting root directory available in master node configuration. 
          Hide
          chandru_s Chandrakumar Sekar added a comment -

          Hi, 

          is there any further update on this issue?

          Show
          chandru_s Chandrakumar Sekar added a comment - Hi,  is there any further update on this issue?
          Hide
          markewaite Mark Waite added a comment -

          Chandrakumar Sekar I think you're asking a question in a place that is not well suited for questions. If your goal is to find an answer to a question, like "Why can't I use a network share for a Jenkins agent workspace?", then you should ask the question in the Jenkins user mailing list or the Jenkins chat system.

          The Jenkins issue tracker is used to track issues. The number of people that read the issue tracker is much smaller than the number of people that read the mailing lists.

          Show
          markewaite Mark Waite added a comment - Chandrakumar Sekar I think you're asking a question in a place that is not well suited for questions. If your goal is to find an answer to a question, like "Why can't I use a network share for a Jenkins agent workspace?", then you should ask the question in the Jenkins user mailing list or the Jenkins chat system. The Jenkins issue tracker is used to track issues. The number of people that read the issue tracker is much smaller than the number of people that read the mailing lists.
          Hide
          chandru_s Chandrakumar Sekar added a comment -

          Mark Waite : my comments are reference to the update provided. basically i need to understand why windows service is getting failed when i use agent with remoting directory as network path and the same working fine as a local path. 

          Show
          chandru_s Chandrakumar Sekar added a comment - Mark Waite  : my comments are reference to the update provided. basically i need to understand why windows service is getting failed when i use agent with remoting directory as network path and the same working fine as a local path. 
          Hide
          mwinter69 Markus Winter added a comment -

          Under which user is the service running?

          But as this is definitley not a bug in Jenkins here we're talking about I will close this as not a bug

          Show
          mwinter69 Markus Winter added a comment - Under which user is the service running? But as this is definitley not a bug in Jenkins here we're talking about I will close this as not a bug

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            chandru_s Chandrakumar Sekar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: