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

Clearcase polling doesn't work with Linux Master and Windows Slave

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • clearcase-plugin
    • None
    • Running the Master on Red Hat Enterprise 6 with the windows slave on windows XP.

      Hi all. I've run into an issue with my Hudson install. We've
      successfully got hudson running on a linux server as a master polling
      clearcase and kicking off builds. I also was able to get Hudson
      running on a Windoiws XP machine as a master polling clearcase and
      kicking off builds.

      Now I've tried to switch the Windows build over as a slave to the Unix
      master. If I hit the build now button it will successfully build on
      the Windows XP machine, but the clearcase polling keeps saying no
      changes.

      Can anyone point me in a direction where I might be going wrong?

      Here's a copy of the polling log showing changes:

      ------------------------------------------------------------------------------------------------------------
      [Med_Desktop_Client_11.02] $ cleartool lsview jarmenia_med-win-
      slave_Med_Desktop_Client_11.02_hudson
      jarmenia_med-win-slave_Med_Desktop_Client_11.02_hudson
      gnvccnas
      \winviewstore2\mmrd\jarmenia\view.2.vws
      [view] $ cleartool lshistory -all -since 31-jan-11.21:35:55utc+0000 -
      fmt '\"%Nd\" \"%u\" \"%En\" \"%Vn\" \"%e\" \"%o\" \n%c\n' -minor -nco
      med_desktop
      "20110131.163817" "vobadm" "WO94919.4" "" "rename branch type"
      "rename"
      Changed name of branch type from "WO94919" to "WO94919.4".

      "20110131.163814" "vobadm" "c:\hudson\workspace
      \Med_Desktop_Client_11.02\view\med_desktop\Desktop\DesktopTest
      \BalanceDuePresenterTest.cs" "\main\rel11.02\WO94919.4\1" "remove
      label "RFM" from version" "rmlabel"

      "20110131.163812" "vobadm" "c:\hudson\workspace
      \Med_Desktop_Client_11.02\view\med_desktop\Desktop\DesktopTest
      \BalanceDuePresenterTest.cs" "\main\rel11.02\17" "make attribute
      "WONum" on version" "mkattr"
      Added attribute "WONum" with value 94919.

      "20110131.163810" "vobadm" "c:\hudson\workspace
      \Med_Desktop_Client_11.02\view\med_desktop\Desktop\DesktopTest
      \BalanceDuePresenterTest.cs" "\main\rel11.02\17" "create version"
      "checkin"

      Comment History:

      John Armenia, Monday, January 31, 2011 4:34:17 PM

      "20110131.163755" "vobadm" "c:\hudson\workspace
      \Med_Desktop_Client_11.02\view\med_desktop\Desktop\Desktop\Properties
      \AssemblyInfo.cs" "\main\rel11.02\32" "make attribute "WONum" on
      version" "mkattr"
      Added attribute "WONum" with value 94919.

      "20110131.163754" "vobadm" "c:\hudson\workspace
      \Med_Desktop_Client_11.02\view\med_desktop\Desktop\Desktop\Properties
      \AssemblyInfo.cs" "\main\rel11.02\32" "create version" "checkin"
      Bumping the version number.

      "20110131.163735" "vobadm" "c:\hudson\workspace
      \Med_Desktop_Client_11.02\view\med_desktop\Desktop\DesktopTest
      \BalanceDuePresenterTest.cs" "\main\rel11.02\17" "make hyperlink
      "Merge" on version" "mkhlink"
      Attached hyperlink "Merge@135124@\med_desktop".

      "20110131.163735" "vobadm" "c:\hudson\workspace
      \Med_Desktop_Client_11.02\view\med_desktop\Desktop\DesktopTest
      \BalanceDuePresenterTest.cs" "\main\rel11.02\WO94919.4\1" "make
      hyperlink "Merge" on version" "mkhlink"
      Attached hyperlink "Merge@135124@\med_desktop".

      "20110131.163735" "vobadm" "Merge@135124@\med_desktop" "" "create
      hyperlink" "mkhlink"

      "20110131.163607" "jarmenia" "c:\hudson\workspace
      \Med_Desktop_Client_11.02\view\med_desktop\Desktop\DesktopTest
      \BalanceDuePresenterTest.cs" "\main\rel11.02\WO94919.4\1" "remove
      label "RFL" from version" "rmlabel"

      "20110131.163606" "jarmenia" "c:\hudson\workspace
      \Med_Desktop_Client_11.02\view\med_desktop\Desktop\DesktopTest
      \BalanceDuePresenterTest.cs" "\main\rel11.02\WO94919.4\1" "make label
      "RFM" on version" "mklabel"

      Done. Took 1.6 sec
      No changes
      ----------------------------------------------------------------------------------------------------------------

          [JENKINS-8688] Clearcase polling doesn't work with Linux Master and Windows Slave

          Yakov Shossel added a comment -

          I have the same issue.
          Here is "UCM ClearCase Polling Log"

          Started on Feb 15, 2011 12:05:35 PM
          [Connect_ci_ISM] $ /usr/atria/bin/cleartool desc -fmt %[found_bls]Xp\n stream:Connect_9.2_int@\att_pvob
          java.io.IOException: Cannot run program "/usr/atria/bin/cleartool" (in directory "c:\hudson\workspace\Connect_ci_ISM"): CreateProcess error=3, The system cannot find the path specified
          at java.lang.ProcessBuilder.start(Unknown Source)
          at hudson.Proc$LocalProc.<init>(Proc.java:192)
          at hudson.Proc$LocalProc.<init>(Proc.java:164)
          at hudson.Launcher$LocalLauncher.launch(Launcher.java:638)
          at hudson.Launcher$ProcStarter.start(Launcher.java:273)
          at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793)
          at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767)
          at hudson.remoting.UserRequest.perform(UserRequest.java:114)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:270)
          at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at hudson.remoting.Engine$1$1.run(Engine.java:58)
          at java.lang.Thread.run(Unknown Source)
          Caused by: java.io.IOException: CreateProcess error=3, The system cannot find the path specified
          at java.lang.ProcessImpl.create(Native Method)
          at java.lang.ProcessImpl.<init>(Unknown Source)
          at java.lang.ProcessImpl.start(Unknown Source)
          ... 17 more
          ERROR: Failed to record SCM polling
          java.lang.NullPointerException
          at hudson.plugins.clearcase.AbstractClearCaseScm.compareRemoteRevisionWith(AbstractClearCaseScm.java:546)
          at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:354)
          at hudson.scm.SCM.poll(SCM.java:371)
          at hudson.model.AbstractProject.poll(AbstractProject.java:1289)
          at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420)
          at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449)
          at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)

          Yakov Shossel added a comment - I have the same issue. Here is "UCM ClearCase Polling Log" Started on Feb 15, 2011 12:05:35 PM [Connect_ci_ISM] $ /usr/atria/bin/cleartool desc -fmt % [found_bls] Xp\n stream:Connect_9.2_int@\att_pvob java.io.IOException: Cannot run program "/usr/atria/bin/cleartool" (in directory "c:\hudson\workspace\Connect_ci_ISM"): CreateProcess error=3, The system cannot find the path specified at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:192) at hudson.Proc$LocalProc.<init>(Proc.java:164) at hudson.Launcher$LocalLauncher.launch(Launcher.java:638) at hudson.Launcher$ProcStarter.start(Launcher.java:273) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:58) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: CreateProcess error=3, The system cannot find the path specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 17 more ERROR: Failed to record SCM polling java.lang.NullPointerException at hudson.plugins.clearcase.AbstractClearCaseScm.compareRemoteRevisionWith(AbstractClearCaseScm.java:546) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:354) at hudson.scm.SCM.poll(SCM.java:371) at hudson.model.AbstractProject.poll(AbstractProject.java:1289) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)

          Hi Yakov,

          Your issue is a little different - you have cleartool location misconfigured for Windows slave. Please enter windows slave settings, tick the tool location checkbox and provide location for cleartool. Otherwise you are trying to use global setting, which is /usr/atria/bin/cleartool in your case and does not work on Windows.

          Regards

          Krzysztof Malinowski added a comment - Hi Yakov, Your issue is a little different - you have cleartool location misconfigured for Windows slave. Please enter windows slave settings, tick the tool location checkbox and provide location for cleartool. Otherwise you are trying to use global setting, which is /usr/atria/bin/cleartool in your case and does not work on Windows. Regards

          John,

          It's unable to help you without your clearcase scm configuration. Please provide scm configuration settings, especially load rules and branches/labels setup.

          Regards

          Krzysztof Malinowski added a comment - John, It's unable to help you without your clearcase scm configuration. Please provide scm configuration settings, especially load rules and branches/labels setup. Regards

          John Armenia added a comment -

          Here's teh config spec I'm using:
          element * CHECKEDOUT
          element * \main\rel11.02\LATEST
          element \med_desktop REL11.01.00
          element \med_desktop\... REL11.01.00
          element * \main\0

          Load Rules
          load \med_desktop

          Branch Tags
          REL11.02

          Please let me know if you need anything else.

          John Armenia added a comment - Here's teh config spec I'm using: element * CHECKEDOUT element * \main\rel11.02\LATEST element \med_desktop REL11.01.00 element \med_desktop\... REL11.01.00 element * \main\0 Load Rules load \med_desktop Branch Tags REL11.02 Please let me know if you need anything else.

          Hi John,

          Your reported polling log suggests that you have set change detect by labels and not by any branch. In this configuration Clearcase plugin will detect changes by tracking labels only and will ignore any checkin operations. So if you put REL11.02 in Label(s) entry, the build will only be triggered if somebody places (or removes) REL11.02 Clearcase label.

          Krzysztof Malinowski added a comment - Hi John, Your reported polling log suggests that you have set change detect by labels and not by any branch. In this configuration Clearcase plugin will detect changes by tracking labels only and will ignore any checkin operations. So if you put REL11.02 in Label(s) entry, the build will only be triggered if somebody places (or removes) REL11.02 Clearcase label.

          John Armenia added a comment -

          So I made that change but I can't tell if the polling is working as we have recently switched to using build triggers. I can however say that Jenkins is still reporting no changes in a build when I know for a fact there are changes. This leads me to believe something still isn't correct.

          John Armenia added a comment - So I made that change but I can't tell if the polling is working as we have recently switched to using build triggers. I can however say that Jenkins is still reporting no changes in a build when I know for a fact there are changes. This leads me to believe something still isn't correct.

          John,

          I can only comment on the polling log you submitted in this issue. Since lshistory was called with -minor, this means that you enabled tracking changes by labels. In the polling log there are only three entries which could trigger the build: mklabel and rmlabel of RFM and rmlabel of RFL. The build will only be triggered if you set RFM and/or RFL in Label(s) configuration field. Please review your configuration and update this issue accordingly.

          Best regards,
          Krzysztof

          Krzysztof Malinowski added a comment - John, I can only comment on the polling log you submitted in this issue. Since lshistory was called with -minor, this means that you enabled tracking changes by labels. In the polling log there are only three entries which could trigger the build: mklabel and rmlabel of RFM and rmlabel of RFL. The build will only be triggered if you set RFM and/or RFL in Label(s) configuration field. Please review your configuration and update this issue accordingly. Best regards, Krzysztof

          Nick Rimmer added a comment -

          Hi,

          I think we have a similar issue and have may have isolated the cause. We have version 1.3.6 of the clearcase plugin + Jenkins 1.421 installed on a 32 Bit Windows XP SP2. In summary we think the cleartool lshistory command does not have the correct syntax for running on Windows XP. If you replace the first and last single quotes with double quotes then it appears to work.

          Does this make sense?

          Nick

          DETAIL
          ======
          If we look at the console output when we force a build the following command is issued to determine the changes...

          cleartool lshistory -all -since 24-aug-11.10:10:53utc+0000 -fmt '\"%Nd\" \"%u\" \"%En\" \"%Vn\" \"%e\" \"%o\" \"%[activity]Xp\" \n%c\n' -branch brtype_1_0_0_Integration -nco ucmdemo_1\D

          If I copy this command to a Windows XP CMD prompt and run it is produces the following output...

          === INCORRECT OUTPUT ===
          cleartool: Error: Unable to access ""%u"": No such file or directory.
          cleartool: Error: Unable to access ""%En"": No such file or directory.
          cleartool: Error: Unable to access ""%Vn"": No such file or directory.
          cleartool: Error: Unable to access ""%e"": No such file or directory.
          cleartool: Error: Unable to access ""%o"": No such file or directory.
          cleartool: Error: Unable to access ""%[activity]Xp"": No such file or directory.

          cleartool: Error: Unable to access "\n%c\n'": ClearCase object not found.
          cleartool: Error: Unable to access "-branch": No such file or directory.
          cleartool: Error: Unable to determine VOB for pathname ".".
          cleartool: Error: Unable to access "-nco": No such file or directory.
          '"20110824.143007"'"20110824.143007"'"20110824.142954"'"20110824.142943"'"201108
          24.142930"'"20110824.142656"'"20110824.142646"'"20110824.142622"'"20110824.14052
          4"'"20110824.140516"'"20110824.140443"'"20110824.131858"'"20110824.131858"'"2011
          0824.130211"'"20110824.130211"'"20110824.111247"
          === END OF INCORRECT OUTPUT ===

          However, if I change the first a last quotes from a single quote to a double quote then the expected output is reported. So the command is now the following...

          cleartool lshistory -all -since 24-aug-11.10:10:53utc+0000 -fmt "\"%Nd\" \"%u\" \"%En\" \"%Vn\" \"%e\" \"%o\" \"%[activity]Xp\" \n%c\n" -branch brtype_1_0_0_Integration -nco ucmdemo_1\D

          === START OF CORRECT OUTPUT ===
          "20110824.142954" "NRimmer" "M:\nrimmer_D_1_0_0\ucmdemo_1\D\src\helloworld.txt" "\main\D_1_0_0_Integration\7" "create version" "checkin" "activity:deliver.nrimmer_D_1_0_0.20110824.142937@\project_ucmdemo"

          "20110824.142656" "NRimmer" "M:\nrimmer_D_1_0_0\ucmdemo_1\D\src\helloworld.txt" "\main\D_1_0_0_Integration\6" "create version" "checkin" "activity:deliver.nrimmer_D_1_0_0.20110824.142629@\project_ucmdemo"

          "20110824.140524" "NRimmer" "M:\nrimmer_D_1_0_0\ucmdemo_1\D\src\helloworld.txt" "\main\D_1_0_0_Integration\5" "create version" "checkin" "activity:deliver.nrimmer_D_1_0_0.20110824.140506@\project_ucmdemo"
          === END OF CORRECT OUTPUT ===

          Nick Rimmer added a comment - Hi, I think we have a similar issue and have may have isolated the cause. We have version 1.3.6 of the clearcase plugin + Jenkins 1.421 installed on a 32 Bit Windows XP SP2. In summary we think the cleartool lshistory command does not have the correct syntax for running on Windows XP. If you replace the first and last single quotes with double quotes then it appears to work. Does this make sense? Nick DETAIL ====== If we look at the console output when we force a build the following command is issued to determine the changes... cleartool lshistory -all -since 24-aug-11.10:10:53utc+0000 -fmt '\"%Nd\" \"%u\" \"%En\" \"%Vn\" \"%e\" \"%o\" \"% [activity] Xp\" \n%c\n' -branch brtype _1_0_0_Integration -nco ucmdemo_1\D If I copy this command to a Windows XP CMD prompt and run it is produces the following output... === INCORRECT OUTPUT === cleartool: Error: Unable to access ""%u"": No such file or directory. cleartool: Error: Unable to access ""%En"": No such file or directory. cleartool: Error: Unable to access ""%Vn"": No such file or directory. cleartool: Error: Unable to access ""%e"": No such file or directory. cleartool: Error: Unable to access ""%o"": No such file or directory. cleartool: Error: Unable to access ""% [activity] Xp"": No such file or directory. cleartool: Error: Unable to access "\n%c\n'": ClearCase object not found. cleartool: Error: Unable to access "-branch": No such file or directory. cleartool: Error: Unable to determine VOB for pathname ".". cleartool: Error: Unable to access "-nco": No such file or directory. '"20110824.143007"'"20110824.143007"'"20110824.142954"'"20110824.142943"'"201108 24.142930"'"20110824.142656"'"20110824.142646"'"20110824.142622"'"20110824.14052 4"'"20110824.140516"'"20110824.140443"'"20110824.131858"'"20110824.131858"'"2011 0824.130211"'"20110824.130211"'"20110824.111247" === END OF INCORRECT OUTPUT === However, if I change the first a last quotes from a single quote to a double quote then the expected output is reported. So the command is now the following... cleartool lshistory -all -since 24-aug-11.10:10:53utc+0000 -fmt "\"%Nd\" \"%u\" \"%En\" \"%Vn\" \"%e\" \"%o\" \"% [activity] Xp\" \n%c\n" -branch brtype _1_0_0_Integration -nco ucmdemo_1\D === START OF CORRECT OUTPUT === "20110824.142954" "NRimmer" "M:\nrimmer_D_1_0_0\ucmdemo_1\D\src\helloworld.txt" "\main\D_1_0_0_Integration\7" "create version" "checkin" "activity:deliver.nrimmer_D_1_0_0.20110824.142937@\project_ucmdemo" "20110824.142656" "NRimmer" "M:\nrimmer_D_1_0_0\ucmdemo_1\D\src\helloworld.txt" "\main\D_1_0_0_Integration\6" "create version" "checkin" "activity:deliver.nrimmer_D_1_0_0.20110824.142629@\project_ucmdemo" "20110824.140524" "NRimmer" "M:\nrimmer_D_1_0_0\ucmdemo_1\D\src\helloworld.txt" "\main\D_1_0_0_Integration\5" "create version" "checkin" "activity:deliver.nrimmer_D_1_0_0.20110824.140506@\project_ucmdemo" === END OF CORRECT OUTPUT ===

          Nick Rimmer added a comment - - edited

          Sorry for the double post of this comment!

          Nick Rimmer added a comment - - edited Sorry for the double post of this comment!

          Xiaokun Hou added a comment -

          I tried commands in linux with command. No result returned.
          cleartool lsh -fmt "%Xn\n" -avobs

          If '-avobs' is not used, then it works. I'm afraid it's a clearcase issue...

          Xiaokun Hou added a comment - I tried commands in linux with command. No result returned. cleartool lsh -fmt "%Xn\n" -avobs If '-avobs' is not used, then it works. I'm afraid it's a clearcase issue...

            Unassigned Unassigned
            jarmenia John Armenia
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: