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

Error Running Jenkins Agent as a windows service

      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)

          [JENKINS-64857] Error Running Jenkins Agent as a windows service

          Chandrakumar Sekar created issue -

          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

          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

          mwinter69: 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. 

          Chandrakumar Sekar added a comment - mwinter69 : 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. 
          Chandrakumar Sekar made changes -
          Assignee New: Markus Winter [ mwinter69 ]
          Chandrakumar Sekar made changes -
          Assignee Original: Markus Winter [ mwinter69 ]

          Hi, 

          is there any further update on this issue?

          Chandrakumar Sekar added a comment - Hi,  is there any further update on this issue?

          Mark Waite added a comment -

          chandru_s 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.

          Mark Waite added a comment - chandru_s 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.

          markewaite : 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. 

          Chandrakumar Sekar added a comment - markewaite  : 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. 

          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

          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
          Markus Winter made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: