ERROR: Failed to upload report - 500: An error has occurred. Please contact your administrator

4,522 views
Skip to first unread message

LnT

unread,
Nov 8, 2017, 2:56:28 AM11/8/17
to SonarQube

Hi,

in Vertual machine 'A' - installed jenkins master 2.20 and SonarQube6.5.   
in Virutual Machine 'B' - installed  MySQL5.7.

SonarQube run as windows service and I see sonarqube default tables populated in MySQL DB.
Tried to run sonarqube scanned on source code files (js) from jenkins. Size of source code is about 30MB.


please find below tail log of SonarQube scanner

 ================================================================================
 INFO: CPD calculation finished
 INFO: Analysis report generated in 96690ms, dir size=108 MB
 INFO: Analysis reports compressed in 43993ms, zip size=34 MB
 INFO: ------------------------------------------------------------------------
 INFO: EXECUTION FAILURE
 INFO: ------------------------------------------------------------------------
 INFO: Total time: 11:42.237s
 INFO: Final Memory: 58M/1288M
 INFO: ------------------------------------------------------------------------
 ERROR: Error during SonarQube Scanner execution
 ERROR: Failed to upload report - 500: An error has occurred. Please contact your administrator
 ERROR:
 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
 ERROR: SonarQube scanner exited with non-zero code: 1
 ================================================================================

I tried to increase max_allowed_packets in MySQL server

Before increase, max_allowed_packet value is like below
 ====================================================
 mysql> Select @@global.max_allowed_packet;
 +-----------------------------+
 | @@global.max_allowed_packet |
 +-----------------------------+
 |                     4194304 |
 +-----------------------------+
 1 row in set (0.00 sec)
 ====================================================
 
Updated F:\mysql\my.ini file in mysql server. Restarted Mysql server and sonarqube as well.
After increase, max_allowed_packet value is like below

 ====================================================

 mysql> Select @@global.max_allowed_packet;

 +-----------------------------+

 | @@global.max_allowed_packet |

 +-----------------------------+

 |                     4194304 |

 +-----------------------------+

 1 row in set (0.00 sec)

 ====================================================

I dont see max_allowed_packet value is getting changed.

Please help.

Regards,
LnT 


Daniel Schwarz

unread,
Nov 8, 2017, 3:34:39 AM11/8/17
to LnT, SonarQube
Dear LnT,

The scanner logs says:
 ERROR: Failed to upload report - 500: An error has occurred. Please contact your administrator

If we are lucky, we might find something interesting in the server's web.log. Could you please check, whether there is something special in there, and if so, paste that log lines here?

Thanks!
Daniel

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/4f1372fa-2668-45c1-bf30-d7ef2f80ec51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Daniel Schwarz | SonarSource

Developer

https://sonarsource.com

LnT

unread,
Nov 8, 2017, 3:40:20 AM11/8/17
to SonarQube
Hi Daniel,

I'm happy to share. PFA web.log

Regards,
Lnt
web.log

Daniel Schwarz

unread,
Nov 8, 2017, 3:57:51 AM11/8/17
to LnT, SonarQube
Hi Lnt,

To me it seems to be a MySQL administration question. I've little knowledge in that area.

However I found a Stackoverflow with people facing similar issues:
* especially this answer sound promising: https://stackoverflow.com/a/32840664/476791

Did you add the max_allowed_packet setting inside your [mysqld] section in you my.ini? Please double check, that this my.ini is used by your MySQL instance.

Cheers
Daniel


For more options, visit https://groups.google.com/d/optout.

LnT

unread,
Nov 8, 2017, 4:13:43 AM11/8/17
to SonarQube
Dear Daniel,

  yes , added the max_allowed_packet setting inside your [mysqld] section in you my.ini
  PFA
  I'm also novice w.r.t MySQL  :-(

Regards,
LnT
Capture-sonar.JPG

Daniel Schwarz

unread,
Nov 8, 2017, 4:48:58 AM11/8/17
to LnT, SonarQube
Hi LnT,

I'm only guessing, but could you maybe give this a try:
- - - - - - - - - - - - - - - - 8< - -
[mysqld]
basedir=F:\\mysql
datadir=F:\\mydata\\data
bind-address=127.0.0.1
max_allowed_packet=128M
explicit_defaults_for_timestamp=TRUE
- - >8 - - - - - - - - - - - - - - - -

The MySQL documentation for trouble shooting uses the "...M" notation: https://dev.mysql.com/doc/refman/5.6/en/packet-too-large.html

The property's documentations on the other hand states, that non-multiples of 1024 numbers will be rounded down: https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_max_allowed_packet

Did you double check, that the my.ini file you update is the one, used by your running mysql instance? (you could for example rename that file and check, whether mysql complains about it during startup)

Cheers
Daniel


For more options, visit https://groups.google.com/d/optout.

LnT

unread,
Nov 8, 2017, 6:44:10 AM11/8/17
to SonarQube
Sorry Daniel. My Bad.
I found right my.ini file @ C:\ProgramData\MySQL\MySQL Server 5.7.

Its working now.... :)

Daniel Schwarz

unread,
Nov 8, 2017, 6:45:51 AM11/8/17
to LnT, SonarQube
No problem :) - I'm glad I could help!

Cheers
Daniel


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages