Notifications with same content and broken links

SonarQube 9.6.1.59531(Community Edition), Scanner 4.7.0.2747, CVS Integration Snapshot 1.2

Hi there,

since update to SonarQube 9.6.1.59531 we are faced to repeating notifications with same content, even if the CVS Code line detection works properly and new code is detected correctly.

Furthermore, the links, which are in those mails lead to empty SonarQube-pages, where no issue is realy shown (It shows an info ilke “0 of 2 shown”).

Server was rebooted a lot of times, I even tried to delete index of ES (/data/es7), without getting rid of this effect.

I already enabled DEBUG-logging and could not find any further information in es.log or web.log, sonar.log.

Could some of you help me with this problem or know potentional reasons for it?

Many thanks and kind regards,
David

Hi David,

Welcome to the community!

Are you saying you receive duplicate emails?

Would you mind sharing some screenshots?

 
Ann

Hi Ann,

thank you for your fast feedback. I am happy to receive support from you. I have already read many of your posts here and was often able to find help in them. Thumbs up.

Of cause I can share some screenshots with with you.

We receive those mails with identical content after every scan. The second screenshot shows the result after clicking on der hyperlink in the notification mail.

If you need further information like logfiles etc. let me know!

Best Regards,
David


Hi,

I’d like to split this and deal with the duplicate emails first.

So… many questions:

  • Does every user get 2 emails or only some
  • For a user that does get 2 emails, can you check the account & see if the account is associated with multiple email addresses?
  • And/or do both of the emails arrive at the same address?
  • Is it possible the duplication is happening at your SMTP server?

 
Ann

Hi Ann,

see my answers inline…

Hi,

I’d like to split this and deal with the duplicate emails first.

So… many questions:

Does every user get 2 emails or only some

–>As I know all users. Each check one identical mail.
For a user that does get 2 emails, can you check the account & see if the account is associated with multiple email addresses?
→ We have only one mail address per user.
And/or do both of the emails arrive at the same address?
–>Not relevant
Is it possible the duplication is happening at your SMTP server?
–>No, there are no duplications on SMTP side

I hope you have further ideas for this problem…Do you know similar effects?

Ann

Hi,

No, this is not something we’ve seen before. That’s why I need to re-ask:

Can you please verify in your SMTP logs that the mail server receives two copies of each notification?

 
Thx,
Ann

Hi Ann,

just to clarify: We just get the same notifications for every scan! We do not receive 2 mails per scan.

I dont think this is a problem on the side of SMTP.

It seems, that the scan results are identical and previous scans are not evaluated.

Usualy we receive only the offset from scan to scan.

Best regards,
David

Hi Ann,

I deleted one small project for testing purpose.

After fresh scan, everything works fine.

I got a mail for a bug which I created for testing purpose (all links are working correctly)

I scanned again → no mail.

Bug was removed →
Info mail with closed issues.

–>EVERYTHING OK again

Now my question: Is it possible, to fix my projects without deletion? Any things I could try? For me its important to keep at least all manual added information like “false positives”- and “wont fix”-selections

Best regards,
David

Hi,

I’m confused at this point.

What exactly is duplicated? Can we get a screenshot showing the duplication? I’ve re-checked the initial screenshots you sent & I’m not seeing anything duplicated.

That’s quite understandable & you shouldn’t need to delete anything.

 
Ann

Hi Ann,

here you see my Inbox, (except 1 entry) filtered for a specific project, which is scanned nearly daily.

Content of those mail are always like the visible mail.

Best Regards,
David

Hi David,

I’m not seeing a screenshot…?

 
Ann

omg, sorry,

here it is :slight_smile:

Hi,

Thanks for the screenshot. :smiley:

Do all of these notifications have the same createdAt value in the URL? And I guess they list the same rules and files?

 
Ann

All different dates, but same content.

Only the date in the link changes to the current scan-date

“&createdAt=2022-10-03T04%3A37%3A46%2B0200”
“&createdAt=2022-10-04T04%3A37%3A46%2B0200”

Best Regards,
David

Hi David,

Thanks for the details. I’ve referred this internally.

 
Ann

Hi Ann,

any update regardng this topic?

We can`t use SonarQube anymore atm :confused:

Best Regards,
David

Hey @nexus_chili ,

Could you enable DEBUG logging and check for the below logs after analysis when you have received redundant notifications?

For user ${username} via EmailNotificationChannel

You check how to activate debug logs in our documentation here

Hi Jacek,

sorry for late response, I was ill some days :open_mouth:

In the meatime, before reading your post, I updated SonarQube to Version 9.7.1.

Unfortunatly now ES does not come up anymore.

I get the following Exception:

2022.11.10 18:42:17 WARN  web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc-org.sonar.server.qualityprofile.RegisterQualityProfiles': Initialization of bean failed; nested exception is BadRequestException{errors=[Rule with UUID AXZnt-ti0cHWapxSdKh- not found]}
2022.11.10 18:42:17 DEBUG web[][o.s.s.p.ServerLifecycleNotifier] Notify ServerStopHandler handlers...
2022.11.10 18:42:17 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc-org.sonar.server.qualityprofile.RegisterQualityProfiles': Initialization of bean failed; nested exception is BadRequestException{errors=[Rule with UUID AXZnt-ti0cHWapxSdKh- not found]}
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)

Do you have an idea what might be the reason?

See the complete logs attached.

access.log (96.3 KB)
es.log (1.7 MB)
sonar.log (15.2 KB)
web.log (6.9 MB)

Best Regards,
David

Hi there,

any help for us?

Best regards,
David

Hey @nexus_chili ,

Sorry for the late response.

It seems like you have encountered another issue. It is not ES that is failing, it is the WEB process.

Could you please try to execute those SQL queries on the database if possible and send me the results?

select * from rules r where uuid = 'AXZnt-ti0cHWapxSdKh-'
select * from active_rules ar where rule_uuid = 'AXZnt-ti0cHWapxSdKh-'
select * from rules_profiles rp where "language" = 'scala'