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

perforce plugin don't support P4 ticket authentication

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      perforce plugin version: 1.3.33
      OS: windows
      web browser: all
      JAVA version:1.7.0_25
      CI Architecture: master-slave
    • Similar Issues:

      Description

      If the credential for job is P4 ticket auth, we cannot sync the source code from P4, and get the error below. But the non-ticket auth credential can be used to sync source code from P4 correctly.

      It seems current perforce plugin don't support P4 ticket authentication.

      ERROR:
      ----------------------------------------------------------------
      [EnvInject] - Loading node environment variables.
      Building remotely on Slave31 (SlaveGroup3) in workspace C:\CI\workspace\Src-Main
      Using remote perforce client: Beacon-Src-Main-461461931
      [Src-xxx] $ p4 workspace o Beacon-Src-Main-461461931
      [Src-xxx] $ p4 login -a -p
      [Src-xxx] $ p4 workspace o Beacon-Src-Main-461461931
      Caught exception communicating with perforce. Perforce password (P4PASSWD) invalid or unset.com.tek42.perforce.PerforceException: Perforce password (P4PASSWD) invalid or unset.
      at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:406)
      at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:301)
      at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:61)
      at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1641)
      at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1602)
      at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:907)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1265)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
      at hudson.model.Run.execute(Run.java:1718)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)
      ERROR: Unable to communicate with perforce. Perforce password (P4PASSWD) invalid or unset.
      Skipped archiving because build is not successful
      Sending e-mails to: xxx@xxx.com
      Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
      Finished: FAILURE

        Attachments

          Activity

          Hide
          antbur antonio bur added a comment -

          I'm not a Perforce expert, anyway when I use the command line and I do the p4 set P4PORT:myserver and than I can do the login whiteout any problem. Note I'm not interest to use the ticket, but I don't understand Jenkins is forcing to use this option. It seems that Jenkins plugin doesn't pass the password information.
          Note: I also have a Perforce that I use as test server (on this server I don't use the ssl protocol), and the perforce plugin on Jenkins works fine.

          Thanks in advance.

          Show
          antbur antonio bur added a comment - I'm not a Perforce expert, anyway when I use the command line and I do the p4 set P4PORT:myserver and than I can do the login whiteout any problem. Note I'm not interest to use the ticket, but I don't understand Jenkins is forcing to use this option. It seems that Jenkins plugin doesn't pass the password information. Note: I also have a Perforce that I use as test server (on this server I don't use the ssl protocol), and the perforce plugin on Jenkins works fine. Thanks in advance.
          Hide
          ajeng Allen Jeng added a comment -

          I see the same issue as Antoino. The issue is random since I have multiple Jenkins masters. First of all, I use ssl with our Perforce server. Here's some interesting things I've observed:
          1. only happens with Windows nodes. (Mac nodes has no problem)
          2. it's specific to a Windows node.

          Now, I haven't tried checking if it's because of different Perforce p4.exe versions – but they have no problem using the token at command line. Only with Perforce plugin.

          Show
          ajeng Allen Jeng added a comment - I see the same issue as Antoino. The issue is random since I have multiple Jenkins masters. First of all, I use ssl with our Perforce server. Here's some interesting things I've observed: 1. only happens with Windows nodes. (Mac nodes has no problem) 2. it's specific to a Windows node. Now, I haven't tried checking if it's because of different Perforce p4.exe versions – but they have no problem using the token at command line. Only with Perforce plugin.
          Hide
          rpetti Rob Petti added a comment -

          It sounds like you are both having separate issues from this ticket.

          Allen, check your P4 versions... They need to match the server.

          Antonio, I don't know if I can help you with this. You might want to do the same as Allen and double check that the perforce client versions match the server you are connecting to.

          Finally, the perforce-plugin isn't really supported at all anymore. If you have fixes, I'd be happy to merge them, but aside from that, you might want to consider migrating to the official p4-plugin. If you have issues with that plugin, you can file tickets against them or contact Perforce support.

          Show
          rpetti Rob Petti added a comment - It sounds like you are both having separate issues from this ticket. Allen, check your P4 versions... They need to match the server. Antonio, I don't know if I can help you with this. You might want to do the same as Allen and double check that the perforce client versions match the server you are connecting to. Finally, the perforce-plugin isn't really supported at all anymore. If you have fixes, I'd be happy to merge them, but aside from that, you might want to consider migrating to the official p4-plugin. If you have issues with that plugin, you can file tickets against them or contact Perforce support.
          Hide
          rpetti Rob Petti added a comment -

          Resolving ticket again, since reported issues are not related to ticket acquisition.

          Show
          rpetti Rob Petti added a comment - Resolving ticket again, since reported issues are not related to ticket acquisition.
          Hide
          ajeng Allen Jeng added a comment -

          Thanks Rob! I figure it was something silly like that!

          Antonio: if the source you're pulling isn't big, you should consider using the official P4 plugin. I have an open ticket with them (Perforce) to fix issues. The source base I'm pulling is around 16GB+. P4 plugin can ... at random, freeze up and the sync rate would drop to less than 50kb/sec. Hence, my reliance on the old Perforce plugin.

          Show
          ajeng Allen Jeng added a comment - Thanks Rob! I figure it was something silly like that! Antonio: if the source you're pulling isn't big, you should consider using the official P4 plugin. I have an open ticket with them (Perforce) to fix issues. The source base I'm pulling is around 16GB+. P4 plugin can ... at random, freeze up and the sync rate would drop to less than 50kb/sec. Hence, my reliance on the old Perforce plugin.

            People

            • Assignee:
              Unassigned
              Reporter:
              ybdesire Bin Yin
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: