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

Job not stopped after AccuRev authentication failure

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      For some reason I get Authentication failures every now and then (tried several configuration options).
      I have not yet been able to pin point what is causing this, but I have noticed that jobs do not stop their execution when AccuRev fails to authenticate.

      In my opinion, if a new version could not be retrieved from the VCS, there is no point in continuing the execution of the job and the job should be stopped.
      This is currently not the case.

      "Luckily" I use the Clean Workspace plug-in, so my build fails because the necessary files are not found, because the checkout failed.
      However, I'm pretty sure that not everyone will be in the same situation and it is silly to continue with an unknown/unwanted state.

        Attachments

          Activity

          arnom Arno Moonen created issue -
          Hide
          casz Joseph Petersen added a comment -

          Did you update to 0.7.3? Cause it is fixed in that version

          Show
          casz Joseph Petersen added a comment - Did you update to 0.7.3? Cause it is fixed in that version
          Hide
          arnom Arno Moonen added a comment -

          I did upgrade, but then we started seeing those authentication errors, so I downgraded back to 0.7.2.

          Regarding the authentication error, the Jenkins log reports this:

          Failed to record SCM polling for hudson.model.FreeStyleProject@179afa2[update_slaves]
          java.lang.NullPointerException
          	at hudson.plugins.accurev.FindAccurevClientExe.invoke(FindAccurevClientExe.java:63)
          	at hudson.plugins.accurev.FindAccurevClientExe.invoke(FindAccurevClientExe.java:14)
          	at hudson.FilePath.act(FilePath.java:1018)
          	at hudson.FilePath.act(FilePath.java:996)
          	at hudson.plugins.accurev.delegates.AbstractModeDelegate.setup(AbstractModeDelegate.java:65)
          	at hudson.plugins.accurev.delegates.AbstractModeDelegate.compareRemoteRevisionWith(AbstractModeDelegate.java:101)
          	at hudson.plugins.accurev.AccurevSCM.compareRemoteRevisionWith(AccurevSCM.java:442)
          	at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:391)
          	at hudson.scm.SCM.poll(SCM.java:408)
          	at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1482)
          	at hudson.model.AbstractProject._poll(AbstractProject.java:1452)
          	at hudson.model.AbstractProject.poll(AbstractProject.java:1363)
          	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:528)
          	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:574)
          	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          	at java.util.concurrent.FutureTask.run(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          	at java.lang.Thread.run(Unknown Source)
          

          So, even though the client worked fine before, for some reason it can not find it any more...
          Also, restarting the master server (even though polling is done on another agent) seems to "solve" the error (temporarily though).

          I'll try 0.7.3 again.

          Show
          arnom Arno Moonen added a comment - I did upgrade, but then we started seeing those authentication errors, so I downgraded back to 0.7.2. Regarding the authentication error, the Jenkins log reports this: Failed to record SCM polling for hudson.model.FreeStyleProject@179afa2[update_slaves] java.lang.NullPointerException at hudson.plugins.accurev.FindAccurevClientExe.invoke(FindAccurevClientExe.java:63) at hudson.plugins.accurev.FindAccurevClientExe.invoke(FindAccurevClientExe.java:14) at hudson.FilePath.act(FilePath.java:1018) at hudson.FilePath.act(FilePath.java:996) at hudson.plugins.accurev.delegates.AbstractModeDelegate.setup(AbstractModeDelegate.java:65) at hudson.plugins.accurev.delegates.AbstractModeDelegate.compareRemoteRevisionWith(AbstractModeDelegate.java:101) at hudson.plugins.accurev.AccurevSCM.compareRemoteRevisionWith(AccurevSCM.java:442) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:391) at hudson.scm.SCM.poll(SCM.java:408) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1482) at hudson.model.AbstractProject._poll(AbstractProject.java:1452) at hudson.model.AbstractProject.poll(AbstractProject.java:1363) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:528) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:574) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang. Thread .run(Unknown Source) So, even though the client worked fine before, for some reason it can not find it any more... Also, restarting the master server (even though polling is done on another agent) seems to "solve" the error (temporarily though). I'll try 0.7.3 again.
          Hide
          arnom Arno Moonen added a comment - - edited

          I still see this behavior with 0.7.3 on Jenkins CI 2.19.1:

          Started by user Moonen, Arno
          [EnvInject] - Loading node environment variables.
          Building remotely on some-agent
          [WS-CLEANUP] Deleting project workspace...
          [WS-CLEANUP] Done
          Authenticating with Accurev server...
          [SOME-PRODUCT-SW] $ "C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ********
          FATAL: Failed authentication. Please re-try the 'login' command.
          FATAL: login ("C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ******) failed with exit code 1
              >> Job status: [0_build] the 'build only if scm changes' feature is disabled.
          Starting build job PRODUCT/Steps/SOME-PRODUCT-SW/0_build.
          Finished Build : #650 of Job : PRODUCT/Steps/SOME-PRODUCT-SW/0_build with status : FAILURE
          Build step 'MultiJob Phase' marked build as failure
          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
          

          Also, I get the following error in the polling log when using the latest version (I filtered out the name of the job):

          [SOME-PROD-SW] $ "C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ********
          FATAL: Failed authentication. Please re-try the 'login' command.
          FATAL: login ("C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ******) failed with exit code 1
          ERROR: Failed to record SCM polling for com.tikal.jenkins.plugins.multijob.MultiJobProject@1bbdea7[PRODUCTS/SOME-PROD-SW]
          java.lang.IllegalArgumentException: Authentication failure
          	at hudson.plugins.accurev.delegates.AbstractModeDelegate.setup(AbstractModeDelegate.java:64)
          	at hudson.plugins.accurev.delegates.AbstractModeDelegate.compareRemoteRevisionWith(AbstractModeDelegate.java:92)
          	at hudson.plugins.accurev.AccurevSCM.compareRemoteRevisionWith(AccurevSCM.java:450)
          	at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:391)
          	at hudson.scm.SCM.poll(SCM.java:408)
          	at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1482)
          	at hudson.model.AbstractProject._poll(AbstractProject.java:1452)
          	at hudson.model.AbstractProject.poll(AbstractProject.java:1363)
          	at com.tikal.jenkins.plugins.multijob.MultiJobProject.poll(MultiJobProject.java:95)
          	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:528)
          	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:574)
          	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          	at java.util.concurrent.FutureTask.run(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          	at java.lang.Thread.run(Unknown Source)
          

          The client I'm currently working for does not use passwords for AccuRev (so they fill in a username and leave the password field blank).
          Might this be the cause of this issue?

          Show
          arnom Arno Moonen added a comment - - edited I still see this behavior with 0.7.3 on Jenkins CI 2.19.1: Started by user Moonen, Arno [EnvInject] - Loading node environment variables. Building remotely on some-agent [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Done Authenticating with Accurev server... [SOME-PRODUCT-SW] $ "C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ******** FATAL: Failed authentication. Please re- try the 'login' command. FATAL: login ( "C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ******) failed with exit code 1 >> Job status: [0_build] the 'build only if scm changes' feature is disabled. Starting build job PRODUCT/Steps/SOME-PRODUCT-SW/0_build. Finished Build : #650 of Job : PRODUCT/Steps/SOME-PRODUCT-SW/0_build with status : FAILURE Build step 'MultiJob Phase' marked build as failure 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 Also, I get the following error in the polling log when using the latest version (I filtered out the name of the job): [SOME-PROD-SW] $ "C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ******** FATAL: Failed authentication. Please re- try the 'login' command. FATAL: login ( "C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ******) failed with exit code 1 ERROR: Failed to record SCM polling for com.tikal.jenkins.plugins.multijob.MultiJobProject@1bbdea7[PRODUCTS/SOME-PROD-SW] java.lang.IllegalArgumentException: Authentication failure at hudson.plugins.accurev.delegates.AbstractModeDelegate.setup(AbstractModeDelegate.java:64) at hudson.plugins.accurev.delegates.AbstractModeDelegate.compareRemoteRevisionWith(AbstractModeDelegate.java:92) at hudson.plugins.accurev.AccurevSCM.compareRemoteRevisionWith(AccurevSCM.java:450) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:391) at hudson.scm.SCM.poll(SCM.java:408) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1482) at hudson.model.AbstractProject._poll(AbstractProject.java:1452) at hudson.model.AbstractProject.poll(AbstractProject.java:1363) at com.tikal.jenkins.plugins.multijob.MultiJobProject.poll(MultiJobProject.java:95) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:528) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:574) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang. Thread .run(Unknown Source) The client I'm currently working for does not use passwords for AccuRev (so they fill in a username and leave the password field blank). Might this be the cause of this issue?
          Hide
          casz Joseph Petersen added a comment -

          Yes. the blank password was not working for me I cannot see any reason why it would not... But I hoped it would only affect a few

          My advice try again with a simple password.

          Show
          casz Joseph Petersen added a comment - Yes. the blank password was not working for me I cannot see any reason why it would not... But I hoped it would only affect a few My advice try again with a simple password.
          Hide
          arnom Arno Moonen added a comment -

          This is not an option. I'm not the administrator of the AccuRev server and changing the password would break other systems that work.

          However, as mentioned before, this bug still exists.
          I'll create a new one for the blank password issue.
          Perhaps I'll have some time this week to look into either one (or both) issues.

          Show
          arnom Arno Moonen added a comment - This is not an option. I'm not the administrator of the AccuRev server and changing the password would break other systems that work. However, as mentioned before, this bug still exists. I'll create a new one for the blank password issue. Perhaps I'll have some time this week to look into either one (or both) issues.
          Hide
          casz Joseph Petersen added a comment -

          unix and Jenkins is odd...
          unix "" is somehow not adhered to and on windows it is fine. tried to escape them doesn't help

          Show
          casz Joseph Petersen added a comment - unix and Jenkins is odd... unix "" is somehow not adhered to and on windows it is fine. tried to escape them doesn't help
          Hide
          arnom Arno Moonen added a comment -

          At this client, we are only using Windows.

          Show
          arnom Arno Moonen added a comment - At this client, we are only using Windows.
          Hide
          casz Joseph Petersen added a comment -

          I have tried a bunch of escaping... Cannot get it to work on unix.. I will release it though a fix for windows it is simply cmd.addQuoted("", true) but that does not work on unix

          Show
          casz Joseph Petersen added a comment - I have tried a bunch of escaping... Cannot get it to work on unix.. I will release it though a fix for windows it is simply cmd.addQuoted("", true) but that does not work on unix
          Show
          casz Joseph Petersen added a comment - Arno Moonen https://jenkins.ci.cloudbees.com/job/plugins/job/accurev-plugin/158/org.jenkins-ci.plugins$accurev/ This build includes empty password fix on Windows
          Hide
          arnom Arno Moonen added a comment -

          I almost thought that it worked without any problems, however, the authentication is completed successfully, but later on the getconfig command fails:

          Started by upstream project "PROD-FAMILY/SOME-PRODUCT_nightly" build number 8
          originally caused by:
           Started by timer
          [EnvInject] - Loading node environment variables.
          Building remotely on slave-agent (windows accurev) in workspace D:\jenkins\workspace\PROD-FAMILY\SOME-PRODUCT
          [WS-CLEANUP] Deleting project workspace...
          [WS-CLEANUP] Done
          Authenticating with Accurev server...
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ********
          Authentication completed successfully.
          Getting a list of streams...
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" show -H accurev:5050 -fx -p COMPANY-DEPOT streams
          Getting a list of workspaces...
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" show -H accurev:5050 -fx -p COMPANY-DEPOT wspaces
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" show -H accurev:5050 -fx -p COMPANY-DEPOT streams
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" update -H accurev:5050 -fx
          Populating from workspace...
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" pop -H accurev:5050 -L D:\jenkins\workspace\PROD-FAMILY\SOME-PRODUCT -O -R .
          Populated 624 elements and 128 directories.Populate completed successfully.
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s JENKINS_PROD-FAMILY-22-WIP-SW_CI -t now.1
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s PROD-FAMILY-22-WIP-SW -t now.1
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s SOME-PRODUCT -t now.1
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s SW -t now.1
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s COMPANY-DEPOT -t now.1
          Latest Transaction ID: 213580
          Latest transaction Date: 2016/10/17 19:07:05
          Calculating changelog...
          [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" getconfig -H accurev:5050 -s -r settings.xml
          FATAL: slave-agent.company.local: Get config to fetch webURL ("C:\Program Files\AccuRev\bin\accurev.exe" getconfig -H accurev:5050 -s -r settings.xml) failed with java.io.EOFException: input contained no data
          java.io.EOFException: input contained no data
          	at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
          	at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
          	at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
          	at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
          	at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
          	at hudson.plugins.accurev.parsers.xml.ParseGetConfig.parse(ParseGetConfig.java:19)
          	at hudson.plugins.accurev.parsers.xml.ParseGetConfig.parse(ParseGetConfig.java:13)
          	at hudson.plugins.accurev.AccurevLauncher.lambda$runCommand$0(AccurevLauncher.java:128)
          	at hudson.plugins.accurev.AccurevLauncher.runCommand(AccurevLauncher.java:206)
          	at hudson.plugins.accurev.AccurevLauncher.runCommand(AccurevLauncher.java:121)
          	at hudson.plugins.accurev.cmd.ChangeLogCmd.retrieveWebURL(ChangeLogCmd.java:115)
          	at hudson.plugins.accurev.delegates.AbstractModeDelegate.captureChangeLog(AbstractModeDelegate.java:227)
          	at hudson.plugins.accurev.delegates.AbstractModeDelegate.checkout(AbstractModeDelegate.java:186)
          	at hudson.plugins.accurev.AccurevSCM.checkout(AccurevSCM.java:372)
          	at hudson.scm.SCM.checkout(SCM.java:495)
          	at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
          	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
          	at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136)
          	at hudson.model.Run.execute(Run.java:1720)
          	at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:404)
          FATAL: slave-agent.company.local: Get config to fetch webURL ("C:\Program Files\AccuRev\bin\accurev.exe" getconfig -H accurev:5050 -s -r settings.xml) failed with hudson.AbortException: input contained no data
          hudson.AbortException: input contained no data
          	at hudson.plugins.accurev.AccurevLauncher.logException(AccurevLauncher.java:348)
          	at hudson.plugins.accurev.AccurevLauncher.logCommandException(AccurevLauncher.java:333)
          	at hudson.plugins.accurev.AccurevLauncher.runCommand(AccurevLauncher.java:208)
          	at hudson.plugins.accurev.AccurevLauncher.runCommand(AccurevLauncher.java:121)
          	at hudson.plugins.accurev.cmd.ChangeLogCmd.retrieveWebURL(ChangeLogCmd.java:115)
          	at hudson.plugins.accurev.delegates.AbstractModeDelegate.captureChangeLog(AbstractModeDelegate.java:227)
          	at hudson.plugins.accurev.delegates.AbstractModeDelegate.checkout(AbstractModeDelegate.java:186)
          	at hudson.plugins.accurev.AccurevSCM.checkout(AccurevSCM.java:372)
          	at hudson.scm.SCM.checkout(SCM.java:495)
          	at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
          	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
          	at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136)
          	at hudson.model.Run.execute(Run.java:1720)
          	at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:404)
          ERROR: input contained no data
          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
          
          Show
          arnom Arno Moonen added a comment - I almost thought that it worked without any problems, however, the authentication is completed successfully, but later on the getconfig command fails: Started by upstream project "PROD-FAMILY/SOME-PRODUCT_nightly" build number 8 originally caused by: Started by timer [EnvInject] - Loading node environment variables. Building remotely on slave-agent (windows accurev) in workspace D:\jenkins\workspace\PROD-FAMILY\SOME-PRODUCT [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Done Authenticating with Accurev server... [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" login -H accurev:5050 CI ******** Authentication completed successfully. Getting a list of streams... [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" show -H accurev:5050 -fx -p COMPANY-DEPOT streams Getting a list of workspaces... [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" show -H accurev:5050 -fx -p COMPANY-DEPOT wspaces [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" show -H accurev:5050 -fx -p COMPANY-DEPOT streams [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" update -H accurev:5050 -fx Populating from workspace... [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" pop -H accurev:5050 -L D:\jenkins\workspace\PROD-FAMILY\SOME-PRODUCT -O -R . Populated 624 elements and 128 directories.Populate completed successfully. [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s JENKINS_PROD-FAMILY-22-WIP-SW_CI -t now.1 [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s PROD-FAMILY-22-WIP-SW -t now.1 [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s SOME-PRODUCT -t now.1 [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s SW -t now.1 [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" hist -H accurev:5050 -fx -p COMPANY-DEPOT -s COMPANY-DEPOT -t now.1 Latest Transaction ID: 213580 Latest transaction Date: 2016/10/17 19:07:05 Calculating changelog... [SOME-PRODUCT] $ "C:\Program Files\AccuRev\bin\accurev.exe" getconfig -H accurev:5050 -s -r settings.xml FATAL: slave-agent.company.local: Get config to fetch webURL ( "C:\Program Files\AccuRev\bin\accurev.exe" getconfig -H accurev:5050 -s -r settings.xml) failed with java.io.EOFException: input contained no data java.io.EOFException: input contained no data at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003) at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046) at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) at hudson.plugins.accurev.parsers.xml.ParseGetConfig.parse(ParseGetConfig.java:19) at hudson.plugins.accurev.parsers.xml.ParseGetConfig.parse(ParseGetConfig.java:13) at hudson.plugins.accurev.AccurevLauncher.lambda$runCommand$0(AccurevLauncher.java:128) at hudson.plugins.accurev.AccurevLauncher.runCommand(AccurevLauncher.java:206) at hudson.plugins.accurev.AccurevLauncher.runCommand(AccurevLauncher.java:121) at hudson.plugins.accurev.cmd.ChangeLogCmd.retrieveWebURL(ChangeLogCmd.java:115) at hudson.plugins.accurev.delegates.AbstractModeDelegate.captureChangeLog(AbstractModeDelegate.java:227) at hudson.plugins.accurev.delegates.AbstractModeDelegate.checkout(AbstractModeDelegate.java:186) at hudson.plugins.accurev.AccurevSCM.checkout(AccurevSCM.java:372) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1278) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136) at hudson.model.Run.execute(Run.java:1720) at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) FATAL: slave-agent.company.local: Get config to fetch webURL ( "C:\Program Files\AccuRev\bin\accurev.exe" getconfig -H accurev:5050 -s -r settings.xml) failed with hudson.AbortException: input contained no data hudson.AbortException: input contained no data at hudson.plugins.accurev.AccurevLauncher.logException(AccurevLauncher.java:348) at hudson.plugins.accurev.AccurevLauncher.logCommandException(AccurevLauncher.java:333) at hudson.plugins.accurev.AccurevLauncher.runCommand(AccurevLauncher.java:208) at hudson.plugins.accurev.AccurevLauncher.runCommand(AccurevLauncher.java:121) at hudson.plugins.accurev.cmd.ChangeLogCmd.retrieveWebURL(ChangeLogCmd.java:115) at hudson.plugins.accurev.delegates.AbstractModeDelegate.captureChangeLog(AbstractModeDelegate.java:227) at hudson.plugins.accurev.delegates.AbstractModeDelegate.checkout(AbstractModeDelegate.java:186) at hudson.plugins.accurev.AccurevSCM.checkout(AccurevSCM.java:372) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1278) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136) at hudson.model.Run.execute(Run.java:1720) at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) ERROR: input contained no data 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
          Hide
          casz Joseph Petersen added a comment -

          What do you get of you fire the same getconfig manually?

          Show
          casz Joseph Petersen added a comment - What do you get of you fire the same getconfig manually?
          Hide
          casz Joseph Petersen added a comment - - edited

          Just to answer the original question

          The way I can stop the build is to throw errors out of the checkout like so:

          [demo] $ /Applications/AccuRev/bin/accurev show -H accurev:5050 -fx -p depot -s none_existing_stream streams
          FATAL: <streams>
          </streams>
          FATAL: Restricted show streams command (/Applications/AccuRev/bin/accurev show -H accurev:5050 -fx -p depot -s none_existing_stream streams) failed with exit code 1
          FATAL: Stream(s) not found
          java.lang.IllegalStateException: Stream(s) not found
          	at hudson.plugins.accurev.delegates.AbstractModeDelegate.checkout(AbstractModeDelegate.java:170)
          	at hudson.plugins.accurev.AccurevSCM.checkout(AccurevSCM.java:372)
          	at hudson.scm.SCM.checkout(SCM.java:495)
          	at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
          	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
          	at hudson.model.Run.execute(Run.java:1720)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:404)
          Finished: FAILURE
          
          Show
          casz Joseph Petersen added a comment - - edited Just to answer the original question The way I can stop the build is to throw errors out of the checkout like so: [demo] $ /Applications/AccuRev/bin/accurev show -H accurev:5050 -fx -p depot -s none_existing_stream streams FATAL: <streams> </streams> FATAL: Restricted show streams command (/Applications/AccuRev/bin/accurev show -H accurev:5050 -fx -p depot -s none_existing_stream streams) failed with exit code 1 FATAL: Stream(s) not found java.lang.IllegalStateException: Stream(s) not found at hudson.plugins.accurev.delegates.AbstractModeDelegate.checkout(AbstractModeDelegate.java:170) at hudson.plugins.accurev.AccurevSCM.checkout(AccurevSCM.java:372) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1278) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1720) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Finished: FAILURE
          Hide
          arnom Arno Moonen added a comment -

          Running the command manually also does not give any output (nor on my local machine, nor on the slave).
          What output would you expect and what is it used for?
          The command does exit with exit code 0.

          Show
          arnom Arno Moonen added a comment - Running the command manually also does not give any output (nor on my local machine, nor on the slave). What output would you expect and what is it used for? The command does exit with exit code 0 .
          Hide
          casz Joseph Petersen added a comment - - edited

          Before the ParseGetConfig just ignored the file not existing that is my fault for not catching that.

          Issue lies with the accurev command. It does not provide a nice exit if the file does not exists. What would have been nice is to send EOF.

          Go scold your accurev admin for not setting up a settings.xml file. Also scold him for using empty password

          The file should look like this

          settings.xml:

          <settings>
          <webui url="http://accurevserver:8080/accurev"/>
          </settings>
          

          I will catch the EOFException to avoid any issues for now.

          Show
          casz Joseph Petersen added a comment - - edited Before the ParseGetConfig just ignored the file not existing that is my fault for not catching that. Issue lies with the accurev command. It does not provide a nice exit if the file does not exists. What would have been nice is to send EOF. Go scold your accurev admin for not setting up a settings.xml file. Also scold him for using empty password The file should look like this settings.xml: <settings> <webui url= "http: //accurevserver:8080/accurev" /> </settings> I will catch the EOFException to avoid any issues for now.
          Hide
          casz Joseph Petersen added a comment -

          Latest build with ParseGetConfig fix: https://jenkins.ci.cloudbees.com/job/plugins/job/accurev-plugin/162/org.jenkins-ci.plugins$accurev/
          I will release it asap, that you can confirm it does fix the issue

          Show
          casz Joseph Petersen added a comment - Latest build with ParseGetConfig fix: https://jenkins.ci.cloudbees.com/job/plugins/job/accurev-plugin/162/org.jenkins-ci.plugins$accurev/ I will release it asap, that you can confirm it does fix the issue
          Hide
          arnom Arno Moonen added a comment -

          Just installed it and so far it seems to work fine. If I experience any issues, I'll be sure to report them back to you.

          Show
          arnom Arno Moonen added a comment - Just installed it and so far it seems to work fine. If I experience any issues, I'll be sure to report them back to you.
          Hide
          casz Joseph Petersen added a comment - - edited

          You need to place theĀ settings.xml here

          \path to your AcStore\AcStore\site_slice\dispatch\config\settings.xml

          Show
          casz Joseph Petersen added a comment - - edited You need to place theĀ settings.xml here \path to your AcStore\AcStore\site_slice\dispatch\config\settings.xml
          Hide
          arnom Arno Moonen added a comment -

          The admin added that file and running the getconfig command locally shows me the contents similar to your example.
          How can I verify if this is used in Jenkins?

          In the console output I still see this, which makes me think that it does not work:

          [SOME-PRODUCT-SW] $ "C:\Program Files\AccuRev\bin\accurev.exe" getconfig -H accurev:5050 -s -r settings.xml
          Setting AC_SYNC to "IGNORE"
          
          Show
          arnom Arno Moonen added a comment - The admin added that file and running the getconfig command locally shows me the contents similar to your example. How can I verify if this is used in Jenkins? In the console output I still see this, which makes me think that it does not work: [SOME-PRODUCT-SW] $ "C:\Program Files\AccuRev\bin\accurev.exe" getconfig -H accurev:5050 -s -r settings.xml Setting AC_SYNC to "IGNORE"
          Hide
          casz Joseph Petersen added a comment -

          The webui URL is used in the changelog

          You can verify it on a builds latest changelog.
          http://jenkinsserver:8080/job/yourbuild/lastSuccessfulBuild/changes
          It should list the transactions in the changelog:
          Transaction 1000 by some user:
          Some comment

          the transaction number should have a URL looking like: http://accurevserver:8080/accurev/WebGui.jsp?tran_number=1000&depot=some_depot&view=trans_hist

          Hope that answers your question

          Show
          casz Joseph Petersen added a comment - The webui URL is used in the changelog You can verify it on a builds latest changelog. http://jenkinsserver:8080/job/yourbuild/lastSuccessfulBuild/changes It should list the transactions in the changelog: Transaction 1000 by some user: Some comment the transaction number should have a URL looking like: http://accurevserver:8080/accurev/WebGui.jsp?tran_number=1000&depot=some_depot&view=trans_hist Hope that answers your question
          casz Joseph Petersen made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              casz Joseph Petersen
              Reporter:
              arnom Arno Moonen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: