[JIRA] (JENKINS-39211) Authentication of AccuRev plug-in fails randomly

2 views
Skip to first unread message

arno@90a.nl (JIRA)

unread,
Oct 24, 2016, 6:17:02 AM10/24/16
to jenkinsc...@googlegroups.com
Arno Moonen created an issue
 
Jenkins / Bug JENKINS-39211
Authentication of AccuRev plug-in fails randomly
Issue Type: Bug Bug
Assignee: Joseph Petersen
Components: accurev-plugin
Created: 2016/Oct/24 10:16 AM
Priority: Minor Minor
Reporter: Arno Moonen

I've noticed this several times now since upgrading to a version of the accurev plugin greater than 0.6.
After some time (timing really varies from minutes to hours) the authentication with AccuRev fails and I see this stack trace in the polling log:

ERROR: Failed to record SCM polling for com.tikal.jenkins.plugins.multijob.MultiJobProject@4ac441[PRODUCT/SOME-PRODUCT]
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)

Strange thing is that after this failure, the children of this multijob are being executed (as mentioned JENKINS-39033).
Looking at the error log of the Jenkins master server, I see this error for all of my jobs.

I've tried to configure the plug-in with different options set in the Jenkins configuration for the AccuRev plug-in, but so far it seems that this occurs regardless of the configuration options for the plug-in.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

arno@90a.nl (JIRA)

unread,
Oct 24, 2016, 6:20:09 AM10/24/16
to jenkinsc...@googlegroups.com
Arno Moonen updated an issue
Change By: Arno Moonen
I've noticed this several times now since upgrading to a version of the accurev plugin greater than 0.6.
After some time (timing really varies from minutes to hours) the authentication with AccuRev fails and I see this stack trace in the polling log:

{code}

ERROR: Failed to record SCM polling for com.tikal.jenkins.plugins.multijob.MultiJobProject@4ac441[PRODUCT/SOME-PRODUCT]
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)
{code}


Strange thing is that after this failure, the children of this multijob are being executed (as mentioned JENKINS-39033).
Looking at the error log of the Jenkins master server, I see this error for all of my jobs.

I've tried to configure the plug-in with different options set in the Jenkins configuration for the AccuRev plug-in, but so far it seems that this occurs regardless of the configuration options for the plug-in.

The logs of the AccuRev server do not even show a failed log-in attempt and restarting the Jenkins master server (temporarily) solves the problem.
Therefore, I suspect an error in the plug-in.

arno@90a.nl (JIRA)

unread,
Oct 24, 2016, 6:27:03 AM10/24/16
to jenkinsc...@googlegroups.com
Arno Moonen commented on Bug JENKINS-39211
 
Re: Authentication of AccuRev plug-in fails randomly

I'll try to add some additional logging to the plug-in later today. Perhaps that can show us what is going on.

josephp90@gmail.com (JIRA)

unread,
Oct 24, 2016, 6:48:01 AM10/24/16
to jenkinsc...@googlegroups.com

Is it only related to polling. Cause I recall the polling does not attempt to login.

josephp90@gmail.com (JIRA)

unread,
Oct 24, 2016, 6:50:01 AM10/24/16
to jenkinsc...@googlegroups.com

Spoke too soon, it does run through login.

josephp90@gmail.com (JIRA)

unread,
Oct 24, 2016, 7:14:04 AM10/24/16
to jenkinsc...@googlegroups.com

On a given Project head to the AccuRev Polling Log http://INSTANCE:8080/job/PROJECTNAME/scmPollLog/

This log should help clarify the issue.
Example output from login phase:

Started on Oct 24, 2016 1:03:00 PM
No workspace required.
Running commands from folder "Å:\Jenkins\jobs\PROJECTNAME"
[PROJECTNAME] $ "Å:\Program Files\AccuRev\bin\accurev.exe" info -H ACCUREV:5050
Currently authenticated with Accurev server as 'USERNAME', not logging in again.
[PROJECTNAME] $ "Å:\Program Files\AccuRev\bin\accurev.exe" show -H ACCUREV:5050 -fx -p depot streams
Checking transactions of type [chstream, defcomp, mkstream, promote] in stream [PROJECT_STREAM]

arno@90a.nl (JIRA)

unread,
Oct 24, 2016, 8:47:01 AM10/24/16
to jenkinsc...@googlegroups.com

The stack trace I've included above comes from the polling log.

arno@90a.nl (JIRA)

unread,
Oct 24, 2016, 8:49:02 AM10/24/16
to jenkinsc...@googlegroups.com
Arno Moonen edited a comment on Bug JENKINS-39211
The stack trace I've included above comes from the polling log.


If I recall correctly it did not show anyother actions.
Perhaps this means that the server instance is {{NULL}} when {{Login.ensureLoggedInToAccurev}} is called.
I'll add additional logging and "hope" that it will occur again soon.

arno@90a.nl (JIRA)

unread,
Oct 24, 2016, 9:40:03 AM10/24/16
to jenkinsc...@googlegroups.com

I found out what goes wrong.
We use Job DSL to generate our jobs and we only supply a server name there.
In AbstractModeDelegate around line 59, scm.getServerUUID() is used to retrieve the server instance, but this method returns null in my case.
This causes server to be null, which in turn causes Login.ensureLoggedInToAccurev to return false.
I'll try to make the code more robust for these kind of situations.
Shouldn't be to hard.

arno@90a.nl (JIRA)

unread,
Oct 24, 2016, 10:12:02 AM10/24/16
to jenkinsc...@googlegroups.com

I've almost fixed it. Will send in a PR later today or tomorrow.

arno@90a.nl (JIRA)

unread,
Oct 24, 2016, 10:30:02 AM10/24/16
to jenkinsc...@googlegroups.com

arno@90a.nl (JIRA)

unread,
Oct 24, 2016, 10:35:01 AM10/24/16
to jenkinsc...@googlegroups.com
Arno Moonen edited a comment on Bug JENKINS-39211
I found out what goes wrong.
We use Job DSL to generate our jobs and we only supply a server name there.
In {{AbstractModeDelegate}} around line 59, {{scm.getServerUUID()}} is used to retrieve the server instance, but this method returns {{null}} in my case.
This causes {{server}} to be {{null}}, which in turn causes {{Login.ensureLoggedInToAccurev}} to return {{false}}.

I'll try to make the code more robust for these kind of situations.
Shouldn't be to too hard.

josephp90@gmail.com (JIRA)

unread,
Oct 24, 2016, 11:00:02 AM10/24/16
to jenkinsc...@googlegroups.com

Thanks for the PR
Adjusted the logger, and also added a

josephp90@gmail.com (JIRA)

unread,
Oct 24, 2016, 11:11:02 AM10/24/16
to jenkinsc...@googlegroups.com
Joseph Petersen edited a comment on Bug JENKINS-39211
Thanks for the PR :)
Adjusted the logger, and also added a
save.

arno@90a.nl (JIRA)

unread,
Oct 25, 2016, 1:51:02 AM10/25/16
to jenkinsc...@googlegroups.com

Did not yet know that the static logger was available.
Your additional changes look good to me.

josephp90@gmail.com (JIRA)

unread,
Oct 25, 2016, 5:21:01 AM10/25/16
to jenkinsc...@googlegroups.com
Joseph Petersen resolved as Fixed
 

Fixed in 0.7.6, Thanks for the PR

Change By: Joseph Petersen
Status: Open Resolved
Resolution: Fixed

josephp90@gmail.com (JIRA)

unread,
Mar 7, 2020, 1:07:23 AM3/7/20
to jenkinsc...@googlegroups.com
Joseph Petersen assigned an issue to Joseph Petersen
Change By: Joseph Petersen
Assignee: Joseph Petersen (old)
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages