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

P4 Task: failed: com.perforce.p4java.exception.ConnectionException: java.net.SocketException: Connection reset when running p4sync

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: p4-plugin
    • Labels:
      None
    • Environment:
      Jenkins LTS ver. 2.121.1
      P4 Plugin 1.8.10
    • Similar Issues:

      Description

      Hi,

      I'm conscious that this might not be being caused by the p4-plugin, but I'm not sure where else to turn at the moment.

      I have a declarative pipeline running on an agent running as a service on Windows Server 2016, and every time I attempt to sync, I get the following:

      18:49:13 p4 sync C:\JenkinsRoot\workspace\Test/...@4162157
      18:49:13 
      18:49:14 ... totalFileSize 1527902497
      18:49:14 ... totalFileCount 16689
      18:49:14 //depot_path/file - added as workspace_path\file
      ...~1000 more lines...
      18:49:14 
      18:50:01 P4 Task: attempt: 1
      18:50:04 P4 Task: failed: com.perforce.p4java.exception.ConnectionException: java.net.SocketException: Connection reset
      

      I've tried both of the following p4sync steps:

      p4sync charset: 'none', credential: '<credential>', format: '<instance-name>_${NODE_NAME}_${JOB_NAME}_${EXECUTOR_NUMBER}',
          populate: syncOnly(force: false, have: true, modtime: false, pin: '', quiet: false, revert: true,
              parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4']),
          source: depotSource('//depot_path/...')
      
      p4sync charset: 'none', credential: '<credential>', format: '<instance-name>_${NODE_NAME}_${JOB_NAME}_${EXECUTOR_NUMBER}',
          populate: autoClean(delete: true, modtime: false, pin: '', quiet: false, replace: true, tidy: false,
              parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4']),
          source: depotSource('//depot_path/...')
      

      With quiet enabled, it will fail the same, but with no progress output.

      Worse, and potentially unrelated, but just in case, if I enable parallel sync, it doesn't sync at all:

      19:06:29 p4 sync --parallel=threads=4,min=1,minsize=1024 C:\JenkinsRoot\workspace\Test/...@4162703
      19:06:29 
      19:06:42 ... totalFileSize 1154840546
      19:06:42 ... totalFileCount 7080
      [snip file progress - wherein it lists every file not already synced]
      19:06:49 19:06:49 duration: 0m 20s
      19:06:49 
      19:06:49 P4 Task: saving built changes.
      19:06:49 Found last change 4162157 on syncID <instance-name>_NODE_NAME_Test_EXECUTOR_NUMBER
      

      However it doesn't actually sync those files, and it doesn't update the client have.

      There are no issues syncing directly with the P4 client on the agent machine.

      If I sync past the affected files above manually, the Jenkins job will just fail the same way after syncing a different set of files.

        Attachments

          Activity

          Hide
          philmcardlecg Phil McArdle added a comment -

          I've since tried the p4 plugin versions 1.8.6 and 1.8.0, just to pick two, and I'm seeing both of the same behaviours above continue, so I'm at a bit of a loss.

          Show
          philmcardlecg Phil McArdle added a comment - I've since tried the p4 plugin versions 1.8.6 and 1.8.0, just to pick two, and I'm seeing both of the same behaviours above continue, so I'm at a bit of a loss.
          Hide
          philmcardlecg Phil McArdle added a comment - - edited

          Now running Jenkins LTS 2.107.3 (downgraded) and P4 plugin 1.8.10 and still seeing it.

          If I sync most of the path manually on the machine, the Jenkins job will complete the rest of it - but it can't sync the entire set (and it doesn't update have when it fails). I haven't tested exactly what threshold breaks it.

          Also fails with a freestyle job, which is reasonable to expect.

          Show
          philmcardlecg Phil McArdle added a comment - - edited Now running Jenkins LTS 2.107.3 (downgraded) and P4 plugin 1.8.10 and still seeing it. If I sync most of the path manually on the machine, the Jenkins job will complete the rest of it - but it can't sync the entire set (and it doesn't update have when it fails). I haven't tested exactly what threshold breaks it. Also fails with a freestyle job, which is reasonable to expect.
          Hide
          philmcardlecg Phil McArdle added a comment -

          Okay, I've since setup this same job on a different Jenkins master, using a different node, everything is fine. If I use the other Jenkins master, but the same node as above, it fails in the same way, so something wrong with my node..

          Show
          philmcardlecg Phil McArdle added a comment - Okay, I've since setup this same job on a different Jenkins master, using a different node, everything is fine. If I use the other Jenkins master, but the same node as above, it fails in the same way, so something wrong with my node..
          Hide
          philmcardlecg Phil McArdle added a comment -

          Built a new machine using Server 2012. Everything works. Not sure whether this was an issue with 2016, or just that particular machine, but not a bug with Jenkins or the P4 plugin.

          Show
          philmcardlecg Phil McArdle added a comment - Built a new machine using Server 2012. Everything works. Not sure whether this was an issue with 2016, or just that particular machine, but not a bug with Jenkins or the P4 plugin.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            philmcardlecg Phil McArdle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: