메뉴 건너뛰기

SonarQube에서 정적분석을 위해 플러그인 설치 후 Jenkins에서 빌드에러가 발생합니다. 

설치한 플러그인은 다음과 같습니다. 


  • sonar-cobertura-plugin-1.6.3.jar
  • sonar-findbugs-plugin-3.2.jar
  • sonar-java-plugin-3.5.jar
  • sonar-pmd-plugin-2.4.1.jar
  • sonar-checkstyle-plugin-2.3.jar


에러 로그는 다음과 같습니다. 혹시 동일한 문제가 있으셨던분 계신가요?


[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building calculator 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- sonar-maven-plugin:2.6:sonar (default-cli) @ calculator ---
[INFO] SonarQube version: 5.1.2
INFO: Default locale: "ko_KR", source code encoding: "UTF-8"
INFO: Work directory: C:\Jenkins\jobs\Calculator Code Sonar Build\workspace\target\sonar
INFO: SonarQube Server 5.1.2
[INFO] [20:24:21.512] Load global repositories
[INFO] [20:24:22.775] Load global repositories (done) | time=1263ms
[INFO] [20:24:22.775] Server id: 20150831200758
[INFO] [20:24:22.775] User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
[INFO] [20:24:22.806] Install plugins
[INFO] [20:24:22.822] Download sonar-cobertura-plugin-1.6.3.jar
[INFO] [20:24:22.853] Download sonar-findbugs-plugin-3.2.jar
[INFO] [20:24:23.711] Download sonar-java-plugin-3.5.jar
[INFO] [20:24:24.008] Download sonar-pmd-plugin-2.4.1.jar
[INFO] [20:24:24.694] Download sonar-checkstyle-plugin-2.3.jar
[INFO] [20:24:25.162] Install JDBC driver
[INFO] [20:24:25.178] Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
[INFO] [20:24:26.176] Initializing Hibernate
[INFO] [20:25:07.126] Load project repositories
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2015-08-31T20:25:22+09:00
[INFO] Final Memory: 22M/449M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project calculator: Fail to execute request [code=500, url=http://localhost/batch/project?key=com%3Acalculator&preview=false]: Fail to download [http://localhost/batch/project?key=com%3Acalculator&preview=false]. Response code: 500 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project calculator: Fail to execute request [code=500, url=http://localhost/batch/project?key=com%3Acalculator&preview=false]
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fail to execute request [code=500, url=http://localhost/batch/project?key=com%3Acalculator&preview=false]
	at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:132)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	... 20 more
Caused by: java.lang.IllegalStateException: Fail to execute request [code=500, url=http://localhost/batch/project?key=com%3Acalculator&preview=false]
	at org.sonar.batch.bootstrap.ServerClient.handleHttpException(ServerClient.java:139)
	at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:107)
	at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:99)
	at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:87)
	at org.sonar.batch.repository.DefaultProjectRepositoriesLoader.load(DefaultProjectRepositoriesLoader.java:55)
	at org.sonar.batch.repository.ProjectRepositoriesProvider.provide(ProjectRepositoriesProvider.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
	at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
	at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
	at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
	at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
	at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:631)
	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:677)
	at org.sonar.api.platform.ComponentContainer.getComponentByType(ComponentContainer.java:209)
	at org.sonar.batch.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:92)
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:90)
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
	at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
	at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
	at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
	at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
	at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
	at org.sonar.runner.api.Runner.execute(Runner.java:100)
	at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
	... 23 more
Caused by: org.sonar.api.utils.HttpDownloader$HttpException: Fail to download [http://localhost/batch/project?key=com%3Acalculator&preview=false]. Response code: 500
	at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:305)
	at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:255)
	at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:105)
	... 80 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
SonarQube analysis completed: FAILURE
Build step 'SonarQube' changed build result to FAILURE
Build step 'SonarQube' marked build as failure
Finished: FAILURE

TAG •

Who's Tom

profile

저는 2009년 ALM의 세계에 뛰어 들었습니다. 

지금은 ALM, DevOps, 공학 프로세스, 요구공학, 테스트 엔지니어링 등 다양한 영역에 관심이 많습니다.

http://www.curvc.com 

?
Comment '1'
  • profile
    Tom 2015.08.31 21:17

    해당 문제는 SonarQube를 외부 주소에서 내부 주소로 변경 후에 해결되었습니다. 

    예로 기존의 SonarQube 주소를 pseg.or.kr:9000으로 했다면, 변경된 주소는 localhost:9000 입니다. 

    Jenkins에서 바로 SonarQube로 이동할 수 없어 아쉽네요.

 


  1. 1
    08월 31일
    2015

    SonarQube Plugin 설치 후 Jenkins Build Error

    SonarQube에서 정적분석을 위해 플러그인 설치 후 Jenkins에서 빌드에러가 발생합니다. 설치한 플러그인은 다음과 같습니다. sonar-cobertura-plugin-1.6.3.jar sonar-findbugs-plugin-3.2.jar sonar-java-plugin-3.5.jar sonar-pmd-plugin-2.4.1.jar s...
    ByTom Reply1 Views14230
    Read More
  2. 1
    08월 29일
    2015

    Jenkins + PMD + Maven 연동 문제

    현재 Maven Java 프로젝트를 Jenkins + PMD를 사용하여 정적 분석을 수행하고 있습니다. Jenkins에서는 pmd:pmd, pmd:cpd 두 개의 goal을 추가했지만, pmd.xml 파일과 cpd.xml 파일이 비어 있어 항상 PMD 정적 분석 결과는 0으로 나옵니다. pom.xml에...
    ByTom Reply1 Views12844
    Read More
  3. 3
    08월 28일
    2015

    Redmine 구 버전 다운로드 어디서 받나요?

    Redmine 혹은 Bitnami Redmine 구버전을 다운로드 받는 곳이 따로 있을까요? 현재 Bitnami Redmine 구버전 찾고 있는데.. 잘 보이지가 않네요.
    ByTom Reply3 Views11718
    Read More
  4. 1
    08월 28일
    2015

    Jenkins + SonarQube 연동 중 빌드 에러

    Jenkins와 SonarQube를 연동하고 있습니다. 아래와 같이 문제가 발생하네요. SVN 관련 문제인거 같은데.. 해결 방법이 있을까요? [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project calcu...
    ByTom Reply1 Views17257
    Read More
  5. 3
    08월 25일
    2015

    Bitnami Redmine 전체 백업 방법

    Bitnami Redmine은 기본적으로 Bitnami stack 설치 디렉토리를 copy하거나 압축함으로써 백업을 할 수 있습니다. Windows의 경우 : 실행되고 있는 전체 서버를 중지합니다. Bitnami stack이 설치되어 있는 데렉토리를 압축합니다. 압축파일을 안전한 곳에 보관...
    ByTom Reply3 Views17222
    Read More
  6. 1
    08월 25일
    2015

    Bitnami Redmine의 Default URL을 Root로 설정하는 방법

    Bitnami Redmine 설치 후에 기본적으로 아래와 같은 형태의 URL로 접속됩니다. http://localhost/redmine redmine 없이 root 즉 아래와 같이 바로 접속하고 싶습니다. http://localhost 어떻게 해야 하나요?
    ByTom Reply1 Views17043
    Read More
  7. 1
    08월 25일
    2015

    Bitnami Redmine 기본(default) URL 변경 방법

    Bitnami Redmine의 기본(default) URL은 redmine으로 설정되어 있습니다. http://localhost/redmine 이를 다음과 같이 변경하고 싶습니다. http://localhost/pm 어떻게 해야할까요?
    ByTom Reply1 Views17996
    Read More
  8. 1
    08월 25일
    2015

    Redmine 이슈 ID Prefix 설정 못하나요?

    Redmine의 이슈 ID를 프로젝트마다 다른 Prefix를 가져가고 싶은데 가능한지요? 가능하다면 방법을 알고 싶습니다.
    ByTom Reply1 Views11024
    Read More
  9. 3
    08월 24일
    2015

    Bitnami Redmine CKEditor 설치 오류

    Bitnami Redmine 3.1 설치 후에 Plugin으로 CKEditor를 설치하고 있습니다. 하지만 bundle install --without development test 후에 아래와 같이 에러 메시지가 나타나네요. 혹시 해결책일 있을까요? C:\redmine\apps\redmine\htdocs\plugins\red...
    ByTom Reply3 Views19929
    Read More
  10. 1
    08월 24일
    2015

    SVN 저장소 생성 후 인증 문제

    아래 문서에 따라 SVN 저장소를 생성하고 사용자를 등록 했습니다. http://pseg.or.kr/pseg/index.php?mid=infouse&document_srl=4728 하지만 totoiseSVN을 이용하여 프로젝트를 checkout 후에 소스를 넣고 Commit을 할려고 하니깐 Commit ...
    ByTom Reply1 Views10687
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 Next
/ 12