okorach/sonar-tools

sonar-config -i : quality profile HTTPSConnectionPool Max retries exceeded

Closed this issue · 3 comments

Hi Team

There is an issue with sonar-config -i quality profile

2024-10-24 16:40:04,036 | sonar-config | ERROR   | Thread-5        | HTTPSConnectionPool(host='sonarqube-secondary.****.com', port=443): Max retries exceeded with url: /api/qualityprofiles/activate_rule?key=AYAmt7B1pRq8y3i0PnSY&rule=findbugs%3ACAA_COVARIANT_ARRAY_ELEMENT_STORE&severity=MAJOR (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x114a81640>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
2024-10-24 16:40:04,037 | sonar-config | ERROR   | Thread-5        | HTTPSConnectionPool(host='sonarqube-secondary.****.com', port=443): Max retries exceeded with url: /api/qualityprofiles/activate_rule?key=AYAmt7B1pRq8y3i0PnSY&rule=findbugs%3ACAA_COVARIANT_ARRAY_ELEMENT_STORE&severity=MAJOR (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x114a81640>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')) while trying to activate rule findbugs:CAA_COVARIANT_ARRAY_ELEMENT_STORE in quality profile 'FindBugs (outdated copy since December 28 2023 at 12:14 PM)' of language 'java'


...

2024-10-24 16:40:09,822 | sonar-config | ERROR   | Thread-11       | HTTPSConnectionPool(host='sonarqube-secondary.****.com', port=443): Max retries exceeded with url: /api/qualityprofiles/activate_rule?key=AYpkM0ml_JVFD_-x8JeO&rule=java%3AS1596&severity=MINOR (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x114a81820>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
2024-10-24 16:40:09,822 | sonar-config | ERROR   | Thread-11       | HTTPSConnectionPool(host='sonarqube-secondary.****.com', port=443): Max retries exceeded with url: /api/qualityprofiles/activate_rule?key=AYpkM0ml_JVFD_-x8JeO&rule=java%3AS1596&severity=MINOR (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x114a81820>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')) while trying to activate rule java:S1596 in quality profile 'Android way' of language 'java'

Thanks

Hi @Jay-jakwak4 ,

This one seems more to be a network issue. The host sonarqube-secondary.****.com seems to be inytermittently not reachable. I don't think there is any problem with sonar-config in that case

Hi @okorach

Thank you for your answer.
I checked and this doesn't seem to happen all the time.
But I think it could be caused by a lot of operations happening in a short time.

If this error does occur, �can you please support the feature to retry a few more times?

Thanks

Hello @Jay-jakwak4,

I will not be able to support retry in a short term. because this requires some significant refactoring.
What I can suggest however to mitigate your intermittent problem is to reduce the number of parallel threads/operations.
By default it's 8, but you can be bring that down to 1 or 2.
sonar-config -e ... --threads 2

The more threads the faster the tool, but for a config export, it may not matter much. It's usually fast enough on 1 or 2 threads.