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

Jenkins2, P4 Plugin: ERROR: P4: Task Exception: Unexpected release2 message in protocol dispatcher when using multiple View Mapping

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: p4-plugin
    • Labels:
    • Environment:
      OS: Ubuntu 18.04
      JDK 1.8.0_181
      P4 Plugin v
      Jenkins v2.222.3
      P4 Plugin v1.10.12
      Jenkins master in container (image: jenkins/jenkins:2.222.3)
      Jenkin slaves in container (image: jenkins/jnlp-slave:3.27-1)
    • Similar Issues:

      Description

      ERROR: P4: Task Exception: Unexpected release2 message in protocol dispatcher when using multiple View Mapping

      Testing jenkins upgrade from v1.651 to v2.222.3 on a P4 job with multiple View Mapping.

      On jenkins v.1651 multiple View Mapping works with the following:

      //depot/kernel/05.00/... //ci-kernel-5.0/...
      -//depot/kernel/05.00/sna/... //ci-kernel-5.0/sna/...
      -//depot/kernel/05.00/proactor/... //ci-kernel-5.0/proactor/...
      -//depot/kernel/05.00/spm/... //ci-kernel-5.0/spm/...
      -//depot/kernel/05.00/ws/mox/... //ci-kernel-5.0/ws/mox/...

      On jenkins2 v 2.222.3 with  the following view mapping for P4 Plugin v1.10.12

      //depot/kernel/05.00/... //${P4_CLIENT}/...
      //depot/kernel/05.00/sna/... //${P4_CLIENT}/...
      //depot/kernel/05.00/proactor/... //${P4_CLIENT}/...
      //depot/kernel/05.00/spm/... //${P4_CLIENT}/...
      //depot/kernel/05.00/ws/mox/... //${P4_CLIENT}/...
      

      Get the following:

      Date 2020/05/20 19:41:44:Date 2020/05/20 19:41:44:Operation: flush2SSL receive failed.read: socket: Connection timed out
      P4: Unable to setup workspace: com.perforce.p4java.exception.ConnectionException: Unexpected release2 message in protocol dispatcher at com.perforce.p4java.impl.mapbased.rpc.packet.RpcPacketDispatcher.dispatch(RpcPacketDispatcher.java:225) at com.perforce.p4java.impl.mapbased.rpc.OneShotServerImpl.execMapCmdList(OneShotServerImpl.java:363) at com.perforce.p4java.impl.mapbased.rpc.OneShotServerImpl.execMapCmdList(OneShotServerImpl.java:203) at com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator.execMapCmdList(BaseDelegator.java:138) at com.perforce.p4java.impl.mapbased.server.cmd.ClientDelegator.getClient(ClientDelegator.java:62) at com.perforce.p4java.impl.mapbased.server.Server.getClient(Server.java:1394) at org.jenkinsci.plugins.p4.client.ClientHelper.updateClient(ClientHelper.java:176) at org.jenkinsci.plugins.p4.client.ClientHelper.clientLogin(ClientHelper.java:160) at org.jenkinsci.plugins.p4.client.ClientHelper.<init>(ClientHelper.java:100) at org.jenkinsci.plugins.p4.tasks.AbstractTask.tryTask(AbstractTask.java:166) at org.jenkinsci.plugins.p4.tasks.CheckoutTask.invoke(CheckoutTask.java:157) at org.jenkinsci.plugins.p4.tasks.CheckoutTask.invoke(CheckoutTask.java:32) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3069) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:117) at java.lang.Thread.run(Thread.java:748)Caused by: com.perforce.p4java.exception.ProtocolError: Unexpected release2 message in protocol dispatcher at com.perforce.p4java.impl.mapbased.rpc.func.proto.ProtocolFunctionDispatcher.dispatch(ProtocolFunctionDispatcher.java:110) at com.perforce.p4java.impl.mapbased.rpc.packet.RpcPacketDispatcher.dispatch(RpcPacketDispatcher.java:189) ... 21 more
      ERROR: P4: Task Exception: Unexpected release2 message in protocol dispatcher
      

       

       

       

       

       

       

        Attachments

          Activity

          Hide
          p4karl Karl Wirth added a comment -

          Hi David Rodriguez - Sorry for the delay. Been on vacation.

          You can find some examples of using our workspace mappings here:

               https://www.perforce.com/manuals/p4guide/Content/P4Guide/configuration.workspace_view.html

           

          For your examples the top one is a good mapping and probably the one you want. It says give me "//depot/kernel/05.00/..." but then exclude the directories on lines that start with "-". For example dont sync anything under "//depot/kernel/05.00/sna/..." and "//depot/kernel/05.00/proactor/...". However if it was me writing it I would make the right hand side match the left hand side (not essential but just a convention for readability):
          //depot/kernel/05.00/... //${P4_CLIENT}/...//depot/kernel/05.00/sna/... //${P4_CLIENT}/sna/...//depot/kernel/05.00/proactor/... //${P4_CLIENT}/proactor/...//depot/kernel/05.00/spm/... //${P4_CLIENT}/spm/...//depot/kernel/05.00/ws/mox/... //${P4_CLIENT}/ws/mox/...
          These exclussionary mappings are discussed here:

                https://www.perforce.com/manuals/p4guide/Content/P4Guide/configuration.workspace_view.exclude.html

           

          The second option you provide is a bad mapping because following lines are in the same workspace location as previous lines so override them. For example in your example above only "//depot/kernel/05.00/ws/max..." will be synced. All lines after the first are also redundant because "..." is the Perforce wildcard for all files in this directory and all directories under this point. Therefore if you are syncing "//depot/kernel/05.00/..." you will also get "//depot/kernel/05.00/ws/max..." etc.

          The following document shows an example where your second mapping may have made sense because you are changing the location of files in the workspace:

              https://www.perforce.com/manuals/p4guide/Content/P4Guide/configuration.workspace_view.mapping.html

          For example say I want to put everything under '05.00' into a directoy called 'Code' on my disk except I want to put 'sna' in a different directory:
          //depot/kernel/05.00/... //${P4_CLIENT}/Code/....//depot/kernel/05.00/sna/... //${P4_CLIENT}/MyNewDirectory/sna...
          The reasons you would want to reorganize files in this way is usually to suit an IDE or new build environment that mandates a different direcory structure.

            

           

          Show
          p4karl Karl Wirth added a comment - Hi David Rodriguez - Sorry for the delay. Been on vacation. You can find some examples of using our workspace mappings here:      https://www.perforce.com/manuals/p4guide/Content/P4Guide/configuration.workspace_view.html   For your examples the top one is a good mapping and probably the one you want. It says give me "//depot/kernel/05.00/..." but then exclude the directories on lines that start with "-". For example dont sync anything under "//depot/kernel/05.00/sna/..." and "//depot/kernel/05.00/proactor/...". However if it was me writing it I would make the right hand side match the left hand side (not essential but just a convention for readability): //depot/kernel/05.00/... //${P4_CLIENT}/... //depot/kernel/05.00/sna/... //${P4_CLIENT}/sna/... //depot/kernel/05.00/proactor/... //${P4_CLIENT}/proactor/... //depot/kernel/05.00/spm/... //${P4_CLIENT}/spm/... //depot/kernel/05.00/ws/mox/... //${P4_CLIENT}/ws/mox/... These exclussionary mappings are discussed here:       https://www.perforce.com/manuals/p4guide/Content/P4Guide/configuration.workspace_view.exclude.html   The second option you provide is a bad mapping because following lines are in the same workspace location as previous lines so override them. For example in your example above only "//depot/kernel/05.00/ws/max..." will be synced. All lines after the first are also redundant because "..." is the Perforce wildcard for all files in this directory and all directories under this point. Therefore if you are syncing "//depot/kernel/05.00/..." you will also get "//depot/kernel/05.00/ws/max..." etc. The following document shows an example where your second mapping may have made sense because you are changing the location of files in the workspace:     https://www.perforce.com/manuals/p4guide/Content/P4Guide/configuration.workspace_view.mapping.html For example say I want to put everything under '05.00' into a directoy called 'Code' on my disk except I want to put 'sna' in a different directory: //depot/kernel/05.00/... //${P4_CLIENT}/Code/....//depot/kernel/05.00/sna/... //${P4_CLIENT}/MyNewDirectory/sna... The reasons you would want to reorganize files in this way is usually to suit an IDE or new build environment that mandates a different direcory structure.     
          Hide
          drodspike David Rodriguez added a comment -

          Hi Karl, after your explanation that the "dash" is used to exclude directories from mapping.  I reconfigured the job as follows using env var "${P4_CLIENT}.  It worked fine.

          //depot/kernel/05.00/... ///...
          -//depot/kernel/05.00/sna/... //${P4_CLIENT}/sna/...
          -//depot/kernel/05.00/proactor/... //${P4_CLIENT}/proactor/...
          -//depot/kernel/05.00/spm/... //${P4_CLIENT}/spm/...
          -//depot/kernel/05.00/ws/mox/... //${P4_CLIENT}/ws/mox/...
          
          

          So as for me, this issue is resolved unless you want me to try something else.

          Show
          drodspike David Rodriguez added a comment - Hi Karl, after your explanation that the "dash" is used to exclude directories from mapping.  I reconfigured the job as follows using env var "${P4_CLIENT}.  It worked fine. //depot/kernel/05.00/... ///... - //depot/kernel/05.00/sna/... //${P4_CLIENT}/sna/... - //depot/kernel/05.00/proactor/... //${P4_CLIENT}/proactor/... - //depot/kernel/05.00/spm/... //${P4_CLIENT}/spm/... - //depot/kernel/05.00/ws/mox/... //${P4_CLIENT}/ws/mox/... So as for me, this issue is resolved unless you want me to try something else.
          Hide
          drodspike David Rodriguez added a comment -

          I do have a question, regarding upgrade of a jenkins v1.65  p4 job (plugin="perforce@1.3.35")  to jenkins v2.222.3. (plugin="p4@1.10.12") . When I did the initial upgrade of the jenkins p4 jobs,   Source Code Management configuration for the p4 jobs were set to "none".   Is this expected behavior requiring the p4 jobs to be manually re-configured for perforce Software?

          Show
          drodspike David Rodriguez added a comment - I do have a question, regarding upgrade of a jenkins v1.65  p4 job (plugin="perforce@1.3.35")  to jenkins v2.222.3. (plugin="p4@1.10.12") . When I did the initial upgrade of the jenkins p4 jobs,   Source Code Management configuration for the p4 jobs were set to "none".   Is this expected behavior requiring the p4 jobs to be manually re-configured for perforce Software?
          Hide
          p4karl Karl Wirth added a comment -

          Hi David Rodriguez - You are the second person to report this. Jenkins have changed their credential storage slightly so the credentials need to be readded. I have a meeting with the Dev's later this month so will see what we can do. At minimum I think we should warn users in the release notes and docs.

          Show
          p4karl Karl Wirth added a comment - Hi David Rodriguez - You are the second person to report this. Jenkins have changed their credential storage slightly so the credentials need to be readded. I have a meeting with the Dev's later this month so will see what we can do. At minimum I think we should warn users in the release notes and docs.
          Hide
          drodspike David Rodriguez added a comment -

          Thank you Karl!

          Show
          drodspike David Rodriguez added a comment - Thank you Karl!

            People

            • Assignee:
              p4karl Karl Wirth
              Reporter:
              drodspike David Rodriguez
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: