Sonar-scan hanging


(Craig Martin) #1

I am trying to run sonar-scanner and it is hanging before the Load/download plugins. The following is the last few lines output to the screen:

12:21:38.097 INFO: Load global settings (done) | time=134ms
12:21:38.115 INFO: Server id: XXXXX-XXXXXX
12:21:38.136 DEBUG: Create : C:\Users\user1.sonar_tmp
12:21:38.137 INFO: User cache: C:\Users\user1.sonar\cache

From looking at previous logs, it appears that the following step would be next:
04:11:08.476 INFO: Load/download plugins

However, it never gets there. It just hangs. Any thoughts on how to go about troubleshooting? Without any kind of error, I am lost at where to even begin looking.

Thanks!
Craig


(G Ann Campbell) #2

Hi Craig,

Can you try re-running analysis with -Dsonar.verbose=true included on the command line? That should give you more detailed logs.

 
Ann


(Craig Martin) #3

This hung in the same location, and didn’t provide any extra information (at least to the screen). Is there another location where more detailed logs are stored?


(G Ann Campbell) #4

Hi Craig,

To make sure, can you reach your SonarQube server from the build machine?

 
Ann


(Craig Martin) #5

Yes… I can hit the server and get responses back just fine with curl.


(Duarte Meneses) #7

Hi Craig,

while it’s hanging, could you please get the stack trace of the process with jstack [pid_of_the_scanner_process]?
Jstack should be in your [JDK_HOME]/bin.


(Craig Martin) #8

Hi Duarte -

Sorry for the delayed response. The output of jstack is attached. I hope you can get more out of it than I can - I am not really seeing anything to indicate where to look next.

sonar_stack.txt (6.4 KB)

Thanks!
Craig


(Duarte Meneses) #9

Thanks Craig.
It looks like the main thread is blocked while trying to lock a region of a temporary file, and it should not block there.
So a few questions:
a) did you wait a while before getting the stack trace, to make sure it’s hanging (and if you do it again, is it blocked at the same place?)
b) what JRE are you using?
c) is there anything special about the temporary folder in your system or is it just a regular FS?