Git Product home page Git Product logo

Comments (11)

tomasbjerre avatar tomasbjerre commented on September 23, 2024

You most likely have a stacktrace in your server log, can you see it?

from violation-comments-to-stash-plugin.

dcsobral avatar dcsobral commented on September 23, 2024

I do!

ava.lang.IllegalStateException: Jenkins has not been started, or was
already shut down
at jenkins.model.Jenkins.getActiveInstance(Jenkins.java:760)
at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:384)
at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:360)
at org.jenkinsci.plugins.jvctb.config.CredentialsHelper.getAllCredentials(CredentialsHelper.java:50)
at org.jenkinsci.plugins.jvctb.config.CredentialsHelper.findCredentials(CredentialsHelper.java:41)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.doPerform(JvctbPerformer.java:80)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:149)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:136)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2772)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at hudson.remoting.Engine$1$1.run(Engine.java:85)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to
mesos-jenkins-61d23ca4b0b74529836c2ade4b627050-mesos(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:781)
at hudson.FilePath.act(FilePath.java:1007)
at hudson.FilePath.act(FilePath.java:996)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.jvctsPerform(JvctbPerformer.java:136)
at org.jenkinsci.plugins.jvctb.ViolationsToBitbucketServerRecorder.perform(ViolationsToBitbucketServerRecorder.java:61)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1047)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1745)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)

On 11 August 2016 at 23:21, Tomas Bjerre [email protected] wrote:

You most likely have a stacktrace in your server log, can you see it?

β€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAInFxszfclQ3qKrXHvqKk1bZ_LSQLXuks5qfAL2gaJpZM4Jixgk
.

Daniel C. Sobral

I travel to the future all the time.

from violation-comments-to-stash-plugin.

tomasbjerre avatar tomasbjerre commented on September 23, 2024

I'm not sure this is a bug in this plugin. But I can dig a bit... better feedback would be nice =)

from violation-comments-to-stash-plugin.

a-melnyk avatar a-melnyk commented on September 23, 2024

Hello, @tomasbjerre
I reproduced this bug too

Jenkins verions: 2.7.2
Violation Comments to Bitbucket Server Plugin: 1.21

Configuration: (running it on slave)

step([$class: 'ViolationsToBitbucketServerRecorder',
          config: [
            createCommentWithAllSingleFileComments: false,
            createSingleFileComments: true,
            projectKey: 'KEY',
            pullRequestId: 'ID',
            repoSlug: 'REPO_NAME',
            useUsernamePasswordCredentials: true,
            usernamePasswordCredentialsId: 'XXX',
            violationConfigs: [
              [pattern: '.*/jshint\\.xml$', reporter: 'CHECKSTYLE']
            ]
          ]
       ])

jenkins server log:

Aug 12, 2016 11:08:03 AM org.jenkinsci.plugins.jvctb.perform.JvctbPerformer jvctsPerform
SEVERE:
java.lang.IllegalStateException: Jenkins has not been started, or was already shut down
at jenkins.model.Jenkins.getActiveInstance(Jenkins.java:732)
at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:384)
at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:360)
at org.jenkinsci.plugins.jvctb.config.CredentialsHelper.getAllCredentials(CredentialsHelper.java:50)
at org.jenkinsci.plugins.jvctb.config.CredentialsHelper.findCredentials(CredentialsHelper.java:41)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.doPerform(JvctbPerformer.java:80)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:149)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:136)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2772)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to jenkins-slave.example.com(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:781)
at hudson.FilePath.act(FilePath.java:1007)
at hudson.FilePath.act(FilePath.java:996)
at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.jvctsPerform(JvctbPerformer.java:136)
at org.jenkinsci.plugins.jvctb.ViolationsToBitbucketServerRecorder.perform(ViolationsToBitbucketServerRecorder.java:61)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:68)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
at hudson.security.ACL.impersonate(ACL.java:213)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

from violation-comments-to-stash-plugin.

dcsobral avatar dcsobral commented on September 23, 2024

Note that I'm using withCredentials as a wrapper to provide the password,
so while violation fails, withCredentials succeeds in the very same place.

On Fri, Aug 12, 2016, 05:28 gips0n [email protected] wrote:

Hello, @tomasbjerre https://github.com/tomasbjerre
I reproduced this bug too

Jenkins verions: 2.7.2
Violation Comments to Bitbucket Server Plugin: 1.21

Configuration: (running it on slave)

step([$class: 'ViolationsToBitbucketServerRecorder',
config: [
createCommentWithAllSingleFileComments: false,
createSingleFileComments: true,
projectKey: 'KEY',
pullRequestId: 'ID',
repoSlug: 'REPO_NAME',
useUsernamePasswordCredentials: true,
usernamePasswordCredentialsId: 'XXX',
violationConfigs: [
[pattern: '.*/jshint.xml$', reporter: 'CHECKSTYLE']
]
]
])

jenkins server log:

Aug 12, 2016 11:08:03 AM
org.jenkinsci.plugins.jvctb.perform.JvctbPerformer jvctsPerform
SEVERE:
java.lang.IllegalStateException: Jenkins has not been started, or was
already shut down
at jenkins.model.Jenkins.getActiveInstance(Jenkins.java:732)

at
com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:384)
at
com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:360)
at
org.jenkinsci.plugins.jvctb.config.CredentialsHelper.getAllCredentials(CredentialsHelper.java:50)
at
org.jenkinsci.plugins.jvctb.config.CredentialsHelper.findCredentials(CredentialsHelper.java:41)
at
org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.doPerform(JvctbPerformer.java:80)
at
org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:149)
at
org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:136)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2772)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)

at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to jenkins-slave.example.com(Native Method)

at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:781)
at hudson.FilePath.act(FilePath.java:1007)
at hudson.FilePath.act(FilePath.java:996)
at
org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.jvctsPerform(JvctbPerformer.java:136)
at
org.jenkinsci.plugins.jvctb.ViolationsToBitbucketServerRecorder.perform(ViolationsToBitbucketServerRecorder.java:61)

at
org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:68)
at
org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
at
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
at hudson.security.ACL.impersonate(ACL.java:213)
at
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

β€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAInF3148yfHLDAr74lK0nGxt1TSZNS6ks5qfFjrgaJpZM4Jixgk
.

from violation-comments-to-stash-plugin.

tomasbjerre avatar tomasbjerre commented on September 23, 2024

This actually works for me...

Here is my credential that I use:

skarmbild fran 2016-08-12 19 23 58

So its 966164cb-d477-45f0-8d4e-522f50528df4.

And my pipeline script looks like this:


node {

 sh '''
 rm -rf rep_1
 git clone http://admin:admin@localhost:7990/bitbucket/scm/project_1/rep_1.git
 cd *
 git merge origin/feature/addingcrap
 ./gradlew build
 '''

 step([
  $class: 'ViolationsToBitbucketServerRecorder', 
  config: [
   bitbucketServerUrl: 'http://localhost:7990/bitbucket', 
   createCommentWithAllSingleFileComments: true, 
   createSingleFileComments: true, 
   projectKey: 'PROJECT_1', 
   repoSlug: 'rep_1', 
   pullRequestId: '1', 
   useUsernamePassword: false, 
   username: '', 
   password: '', 
   useUsernamePasswordCredentials: true,
   usernamePasswordCredentialsId: '966164cb-d477-45f0-8d4e-522f50528df4',
   violationConfigs: [
    [ pattern: '.*/checkstyle/.*\\.xml$', reporter: 'CHECKSTYLE' ], 
    [ pattern: '.*/findbugs/.*\\.xml$', reporter: 'FINDBUGS' ], 
   ]
  ]
 ])
}

from violation-comments-to-stash-plugin.

dcsobral avatar dcsobral commented on September 23, 2024

Pretty much the same thing here. I'm using the 3c104... from here:

On 12 August 2016 at 11:26, Tomas Bjerre [email protected] wrote:

This actually works for me...

Here is my credential that I use:

[image: skarmbild fran 2016-08-12 19 23 58]
https://cloud.githubusercontent.com/assets/439571/17631002/669b7dd4-60c2-11e6-80ca-4cf69f262ea7.png

So its 966164cb-d477-45f0-8d4e-522f50528df4.

And my pipeline script looks like this:

node {

sh '''
rm -rf rep_1
git clone http://admin:admin@localhost:7990/bitbucket/scm/project_1/rep_1.git
cd *
git merge origin/feature/addingcrap
./gradlew build
'''

step([
$class: 'ViolationsToBitbucketServerRecorder',
config: [
bitbucketServerUrl: 'http://localhost:7990/bitbucket',
createCommentWithAllSingleFileComments: true,
createSingleFileComments: true,
projectKey: 'PROJECT_1',
repoSlug: 'rep_1',
pullRequestId: '1',
useUsernamePassword: false,
username: '',
password: '',
useUsernamePasswordCredentials: true,
usernamePasswordCredentialsId: '966164cb-d477-45f0-8d4e-522f50528df4',
violationConfigs: [
[ pattern: './checkstyle/..xml$', reporter: 'CHECKSTYLE' ],
[ pattern: './findbugs/..xml$', reporter: 'FINDBUGS' ],
]
]
])
}

β€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAInFyJv3ff_HAeTzE-eLoHVojfWzyKnks5qfKy2gaJpZM4Jixgk
.

Daniel C. Sobral

I travel to the future all the time.

from violation-comments-to-stash-plugin.

a-melnyk avatar a-melnyk commented on September 23, 2024

I tried @tomasbjerre variant of pipeline script, and it works, but only when you're executing ViolationsToBitbucketServerRecorder on master, but if you're trying to run it on slave it still fails with:

Jenkins has not been started, or was already shut down

I also tried another two variants:

  • useUsernamePassword: true + plaintext username/password
  • withCredentials(UsernamePasswordMultiBinding) + useUsernamePassword: true

and they bought are working on master and slave

So, +1 to #14 (comment), it seems, that withCredentials works on jenkins-slave too, but useUsernamePasswordCredentials/usernamePasswordCredentialsId works only on master

from violation-comments-to-stash-plugin.

tomasbjerre avatar tomasbjerre commented on September 23, 2024

Should be fixed now in 1.22.

from violation-comments-to-stash-plugin.

a-melnyk avatar a-melnyk commented on September 23, 2024

Tested with version 1.22
Works as expected, thanks!

from violation-comments-to-stash-plugin.

tomasbjerre avatar tomasbjerre commented on September 23, 2024

Sweet! @dcsobral Open issue again if you have any problems.

from violation-comments-to-stash-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.