Create version for project analysis not on "main branch" produces "An error has occurred. Please contact your administrator"

  • versions used: Enterprise Edition Version 8.3.1 (build 34397)

  • error observed: “An error has occurred. Please contact your administrator”

  • steps to reproduce:

    • Select a multi branch project
    • Change to a branch that is NOT the main branch
    • Go to the Activities tab
    • Click “create version” for any activity that is NOT the latest
    • Enter any version value and click “Save”
    • Red Popup will appear with the error message
  • potential workaround: none

This error occurs for both the web GUI and the api. I have full admin privileges.

The web server download log shows:

2020.12.17 15:43:15 ERROR web[AXZipVeXYbsC8y3xRpjD][o.s.s.w.WebServiceEngine] Fail to process request http://sonarqube.silabs.net/api/project_analyses/create_event
java.lang.IllegalStateException: Project of analysis 'AXZiz0VG37m3cCcywmgN' is not found
	at org.sonar.server.projectanalysis.ws.CreateEventAction.lambda$getProjectOrApplication$1(CreateEventAction.java:138)
	at java.base/java.util.Optional.orElseThrow(Optional.java:408)
	at org.sonar.server.projectanalysis.ws.CreateEventAction.getProjectOrApplication(CreateEventAction.java:138)
	at org.sonar.server.projectanalysis.ws.CreateEventAction.doHandle(CreateEventAction.java:113)
	at org.sonar.server.projectanalysis.ws.CreateEventAction.handle(CreateEventAction.java:105)
	at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:110)
	at org.sonar.server.platform.web.WebServiceFilter.doFilter(WebServiceFilter.java:88)
	at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
	at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
	at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:834)

Hi,

The current version is 8.6. Can you upgrade and try again?

 
Ann

@ganncamp we have upgraded to Enterprise Version 8.6.1 and this problem still occurs. I can easily reproduce it in the GUI trying to create a version on a branch for a project. Same error:

2020.12.17 15:43:15 ERROR web[AXZipVeXYbsC8y3xRpjD][o.s.s.w.WebServiceEngine] Fail to process request http://sonarqube.silabs.net/api/project_analyses/create_event
java.lang.IllegalStateException: Project of analysis 'AXZiz0VG37m3cCcywmgN' is not found
	at org.sonar.server.projectanalysis.ws.CreateEventAction.lambda$getProjectOrApplication$1(CreateEventAction.java:138)
	at java.base/java.util.Optional.orElseThrow(Optional.java:408)
	at org.sonar.server.projectanalysis.ws.CreateEventAction.getProjectOrApplication(CreateEventAction.java:138)
	at org.sonar.server.projectanalysis.ws.CreateEventAction.doHandle(CreateEventAction.java:113)
	at org.sonar.server.projectanalysis.ws.CreateEventAction.handle(CreateEventAction.java:105)
	at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:110)
	at org.sonar.server.platform.web.WebServiceFilter.doFilter(WebServiceFilter.java:88)
	at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
	at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
	at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
	at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:834)

Hi,

Thanks for getting back to me. I’ve referred this internally.

 
Ann

Thanks @ganncamp.

Hi @tomzudock ,

I take it this does not occur on the main branch, ever?

If you use the /api/project_analyses/search API directly, can you see this analysis with the ID ‘AXZiz0VG37m3cCcywmgN’ in the list?

@Wouter_Admiraal we do not observe this problem on master (main). @jcawthron is our DevOps engineer, so I will leave it to her to answer your second question.

Thank you @Wouter_Admiraal ,

The answers are:
YES, it does not occur on the main branch, ever, and
YES, /api/project_analyses/search shows ‘AXZiz0VG37m3cCcywmgN’.

Hi @jcawthron ,

This is really odd. I cannot reproduce the error yet, so I’ll need some more info still. Please bear with me :slightly_smiling_face:.

  • Does it happen with multiple projects, or only this one?
  • Did you upgrade SonarQube from an older version? If yes, do you know what the earliest version of SonarQube was (e.g., did you start on 5.0 many years ago, and have been upgrading ever since)?
  • Can you copy-paste the result of the /api/project_analyses/search call (or only the part concerning the 'AXZiz0VG37m3cCcywmgN ' analysis)?
  • This happens to all projects using both the api and the ui

  • the oldest version we ever used was 8.3.0.34182, we are currently at * Enterprise Edition

  • Version 8.6.1 (build 40680).

  • paste of api search:
    bash-3.2$ curl -X POST -u SQ_USERPASS "https://###########/api/project_analyses/search?project=#########&branch=rel" | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7680 100 7680 0 0 4576 0 0:00:01 0:00:01 --:--:-- 4574 { "paging": { "pageIndex": 1, "pageSize": 100, "total": 14 }, "analyses": [ { "key": "AXjnPyL4ePCLI6Mr0e3z", "date": "2021-04-18T23:04:28+0000", "events": [ { "key": "AXjnP2yvePCLI6Mr0zvG", "category": "VERSION", "name": "latest" } ], "projectVersion": "latest", "manualNewCodePeriodBaseline": false, "revision": "7d61448c2a2793d7d073d2b24d55a9cdc1267dd0" }, { "key": "AXjDMy3gePCLI6Mr9dxI", "date": "2021-04-11T23:05:35+0000", "events": [ { "key": "AXjDM4RfePCLI6Mr9yob", "category": "QUALITY_GATE", "name": "Passed", "description": "" } ], "projectVersion": "latest", "manualNewCodePeriodBaseline": false, "revision": "7d61448c2a2793d7d073d2b24d55a9cdc1267dd0" }, { "key": "AXhtQQKAePCLI6Mri_P-", "date": "2021-03-26T06:32:33+0000", "events": [], "projectVersion": "latest", "manualNewCodePeriodBaseline": false, "revision": "7d61448c2a2793d7d073d2b24d55a9cdc1267dd0" }, { "key": "AXfult5uGslCLFyrt4KV", "date": "2021-03-01T16:11:48+0000", "events": [], "projectVersion": "latest", "manualNewCodePeriodBaseline": false, "revision": "45fd0ea33fda3c6828460ad56b05cdbc9f2b041f" }, { "key": "AXfcG4hjGslCLFyrMJ38", "date": "2021-02-26T02:06:19+0000", "events": [], "projectVersion": "latest", "manualNewCodePeriodBaseline": false, "revision": "45fd0ea33fda3c6828460ad56b05cdbc9f2b041f" }, { "key": "AXejDHK5GslCLFyrZzyq", "date": "2021-02-15T00:11:19+0000", "events": [ { "key": "AXejDMQaGslCLFyraI19", "category": "QUALITY_PROFILE", "name": "Changes in 'Sonar way' (HTML)" } ], "projectVersion": "5.1.0.0", "manualNewCodePeriodBaseline": false, "revision": "45fd0ea33fda3c6828460ad56b05cdbc9f2b041f" }, { "key": "AXd_A64Ze07f_yeIbnx5", "date": "2021-02-08T00:14:26+0000", "events": [ { "key": "AXd_BEahe07f_yeIb82b", "category": "QUALITY_PROFILE", "name": "Stop using 'Sonar way' (CSS)" } ], "projectVersion": "5.1.0.0", "manualNewCodePeriodBaseline": false, "revision": "45fd0ea33fda3c6828460ad56b05cdbc9f2b041f" }, { "key": "AXc8UJ-qe07f_yeI3PHf", "date": "2021-01-26T01:25:17+0000", "events": [], "projectVersion": "5.1.0.0", "manualNewCodePeriodBaseline": false, "revision": "45fd0ea33fda3c6828460ad56b05cdbc9f2b041f" }, { "key": "AXbuycj_e07f_yeIqh0y", "date": "2021-01-11T00:07:25+0000", "events": [], "projectVersion": "5.1.0.0", "manualNewCodePeriodBaseline": false, "revision": "29e54cb593a6461f5ad2bb419d58a96d31659c54" }, { "key": "AXamyt1F37m3cCcyI6YH", "date": "2020-12-28T00:34:53+0000", "events": [], "projectVersion": "5.1.0.0", "manualNewCodePeriodBaseline": false, "revision": "537fc17f77715fad64b03e38da35f837dbbb74b4" }, { "key": "AXZiz0VG37m3cCcywmgN", "date": "2020-12-14T19:46:31+0000", "events": [ { "key": "AXZiz-Ea37m3cCcyw7l0", "category": "QUALITY_GATE", "name": "Red (was Green)", "description": "Security Rating on New Code > 1, Security Hotspots Reviewed on New Code < 100" } ], "projectVersion": "not provided", "manualNewCodePeriodBaseline": false, "revision": "069df19fa9e6baba79ec09d3f1a438335dd6ee00" }, { "key": "AXXydRu237m3cCcyQLxe", "date": "2020-11-23T00:10:54+0000", "events": [], "projectVersion": "not provided", "manualNewCodePeriodBaseline": false, "revision": "289fb53ded10b97e2c441de99ebe2d327e5f9af0" }, { "key": "AXWfnY-hXU7iQRyBlCCV", "date": "2020-11-06T22:04:40+0000", "events": [], "projectVersion": "not provided", "manualNewCodePeriodBaseline": false, "revision": "2546a31a99a643ca28c8e310debfb02c88b91f2c" }, { "key": "AXVSSnBAXU7iQRyBBVw0", "date": "2020-10-22T21:44:04+0000", "events": [], "projectVersion": "not provided", "manualNewCodePeriodBaseline": true, "revision": "51df13accf05773a0d4a56eaaa2e681465d95578" } ] } bash-3.2

OK, thanks for the info. I confirm I can now reproduce the error. I will investigate further, and post my findings here.

Hey there.

Maybe I can shed some light on this: This bug (SONAR-14256) was fixed in SonarQube 8.7.

The latest version is 8.8 with the 8.9 LTS coming May 4th!

@Colin_SonarSource thank you for pointing that out. Sounds like we should wait a week and get version 8.9 since it’s so close.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.