I am getting a "Synchronization issues have encountered a problem" along with a NullPointerException while analyzing a project in SonarQube 6.2.
I am using Eclipse Mars 4.5.2 and I tried using SonarLint but didnt find it very useful because it didnt show me SonarQube Issues view and all the errors were not listed in there. So, I instead downloaded the SonarQube plugin (http://downloads.sonarsource.com/eclipse/eclipse/)
I see the below issues in the access.log (in SonarQube directory) -
127.0.0.1 - - [15/Feb/2017:11:40:50 -0500] "GET /api/resources?resource=ffsUser%3AffsUser&verbose=false& HTTP/1.1" 200 237 "-" "Apache-HttpClient/4.3.6 (java 1.5)" "AVpCmoaydo39Zfz7AAAv"
127.0.0.1 - - [15/Feb/2017:11:40:50 -0500] "GET /api/issues/search?componentRoots=ffsUser:ffsUser&pageIndex=1&pageSize=-1&resolved=false HTTP/1.1" 200 - "-" "Java/1.8.0_45" "AVpCmoaydo39Zfz7AAAw"
It's not surprising that you're encountering problems attempting to run the old Eclipse plugin against a current version of SonarQube. There are reasons that plugin as abandoned.
Your best bet would be to try again with SonarLint, which is designed to help you keep new code clean and to clean up the code you're already working on anyway
Related
I am currently exploring backstage integration with our own sonarqube instance.
Followed instructions from:
https://github.com/backstage/backstage/tree/master/plugins/sonarqube
and
https://github.com/backstage/backstage/tree/master/plugins/sonarqube-backend
my config file is updated with:
proxy:
'/sonarqube':
target: https://sonarqube.gcp.xyz.com/api
allowedMethods: ['GET']
auth: <<token from sonarqube>>
sonarQube:
baseUrl: https://sonarqube.gcp.xyz.com
apikey: <<token from sonarqube>>
i am testing app in local using yarn dev command and i see no errors for sonarqube.
[1] 2022-11-16T03:53:35.856Z proxy info [HPM] Proxy created: /sonarqube -> https://sonarqube.gcp.cna.com/api type=plugin
[1] 2022-11-16T03:53:35.857Z proxy info [HPM] Proxy rewrite rule created: "^/api/proxy/sonarqube/?" ~> "/" type=plugin
some where in the log i see following statement.
[1] 2022-11-16T03:54:14.347Z backstage info 127.0.0.1 - - [16/Nov/2022:03:54:14 +0000] "GET /api/sonarqube/instanceUrl?instanceKey= HTTP/1.1" 404 - "http://localhost:3000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.52" type=incomingRequest
Issue:
I don't see the sonar api working. I see following error. The key mentioned is present in the sonarqube baseUrl instance.
No information to display
There is no SonarQube project with key 'jupiter-camunda'.
please help be debug this issue. Logs are not helpful in finding what is wrong. is it poiting to the baseurl i provided or going to sonarqube.org ?
How to get this working.
Initially I tried with just sonarqube plugin, got same result. So tried adding sonarbackend and no success either.
I had a similar issue the documentation isn't great and you only really need to follow the steps in the backend, first, you need to fix your app-config.yaml file.
Remove the proxy definition it doesn't actually need it.
Correct the case on sonarqube to fully lowercase as per below (match the backend docs)
sonarqube:
baseUrl: https://sonarqube.gcp.xyz.com
apikey: <<token from sonarqube>>
Double check you have correctly installed the backend as per https://github.com/backstage/backstage/tree/master/plugins/sonarqube-backend
I've got sonarqube 6.5 with default configs. When sonar.forceAuthentication flag is set to false, I can create and analyse project through command given below.
mvn sonar:sonar -Dsonar.host.url=https://mySonarHost/sonar -Dsonar.login=mySonarUserKey
When I enable sonar.forceAuthentication parameter (sonar.forceAuthentication=true), I can't analyse project. I always get maven error:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project storm: Not authorized. Please check the properties sonar.login and sonar.password. -> [Help 1]
It doesn't work on default admin account nor created user account (with permission to analyse project). I've also tried not to use user key, but user' login and password (-Dsonar.login and -Dsonar.password in maven config) but it also doesn't work.
I've tried to use different sonar version (from 4.5.7, through 5.6.6 to the newest, 6.5, but I always get the same result).
During the connection, I've got such messages in my access.log:
IP_ADDRESS - - [08/Sep/2017:12:03:33 +0200] "GET /sonar/batch/index HTTP/1.1" 200 - "-" "ScannerMaven/3.3.0.603/3.5.0" "SOME_KEY"
IP_ADDRESS - - [08/Sep/2017:12:03:33 +0200] "GET /sonar/api/settings/values.protobuf HTTP/1.1" 401 - "-" "ScannerMaven/3.3.0.603/3.5.0" "SOME_KEY"
It's required for me to set sonar.forceAuthentication parameter to true (only trusted users can have access to it).
Any idea how to configure and access sonarqube through maven with credential parameters?
Did you set both sonar.login and sonar.password parameters (Analyzing with SonarQube Scanner for Maven (Archive)) ?
Note that in recent versions (like SonarQube 6.5), you should use a user token and just set it in the sonar.login parameter: User Token
This is a minimal command that I use to update Sonar Cube Dashboard for my project,
mvn clean install sonar:sonar -Dsonar.host.url=<Server_URL> -Dsonar.login=<Token_For_Your_User_Id> -Dsonar.projectKey=<It will be calculated by default using group id & artifact id but its advisable that you use a unique string for all users> -Dsonar.projectName=<Descriptive Project Name to show on dashboard> -Dsonar.projectVersion=<if you wish to specify a version number>
You can always wrap a string value in double quotes if it has spaces in it.
Before using above command, you need to generate token for your user id as specified in answer provided by Eric. There is no need to pass password property.
For the sake of simplicity and clarity, here's how to add just your sonar credentials to the mvn command:
mvn verify sonar:sonar -Dsonar.login=admin -Dsonar.password=password
I added a single space after -D and all was well with the world!
I found the problem in some PHP code I'm working on but I can reproduce it using wget and curl, from the linux terminal. When I use the respective programmes to fetch the same image file from my server, the file sizes are different and the smaller curl file is corrupt. This happens on all image files, but doesn't always corrupt the file.
0.0.0.0 - - [18/Aug/2013:23:41:48 +0200] "GET /test.png HTTP/1.1" 200 555247 "-" "Wget/1.13.4 (linux-gnu)"
0.0.0.0 - - [18/Aug/2013:23:42:53 +0200] "GET /test.png HTTP/1.1" 200 555191 "-" "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3"
You will notice the png file downloaded with curl is 56bytes smaller, which is enough to corrupt the image.
The server in question is my own server running ubuntu server, and apache, as far as I'm aware there is nothing none standard on it, or my curl\wget setup. (And yes I fudged the IP address for security)
Any help most appreciated.
Everytime I run an import profile in Magento after about 2 - 3 minutes it logs me out. I have checked the apache error logs, this is the lead up to the log out:
[13/Sep/2012:14:58:41 +0100] "POST /index.php/admin/system_convert_gui/batchRun/key/151d60f07b9e68b0023da294f315c3cc/?isAjax=true HTTP/1.1" 200 52
[13/Sep/2012:14:58:42 +0100] "POST /index.php/admin/system_convert_gui/batchRun/key/151d60f07b9e68b0023da294f315c3cc/?isAjax=true HTTP/1.1" 200 52
[13/Sep/2012:14:58:44 +0100] "POST /index.php/admin/system_convert_gui/batchRun/key/151d60f07b9e68b0023da294f315c3cc/?isAjax=true HTTP/1.1" 200 148
[13/Sep/2012:14:58:44 +0100] "GET /index.php/admin/index/login/key/70f0f08a622f871979b3890c5f769bf4/ HTTP/1.1" 200 1001
In the system log I get:
2012-09-13T14:13:00+00:00 DEBUG (7): Cannot send headers; headers already sent in /var/www/vhosts/httpdocs/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php, line 278
2012-09-13T14:13:00+00:00 DEBUG (7): HEADERS ALREADY SENT: [0] /var/www/vhosts/httpdocs/app/code/core/Mage/Core/Controller/Response/Http.php:44
Nothing in the exception log. I have researched the headers already sent issue but nothing has fixed this. Any suggestions would be greatly appreciated.
Magento version 1.4.0.1
It's an annoyance. I get it on ee 1.8 during any import/export process that counts the items processed as it goes.
I solved it by adding ob_start() just before that line throwing the error.
I realize I should override the function, but I'm using an old version and will upgrade soon. Hopefully this is fixed in 1.12
I upgraded to ruby 1.9.3 this morning, kept the same version of Rails 3.0.8 and installed / updated passenger-3.0.9. Everything seems to run OK when I launch the application, until I try and login (make a database connection), I get a 502 Bad Gateway and the following error message in the console:
[NOTE] You may have encountered a bug in the Ruby interpreter or
extension libraries. Bug reports are welcome. For details:
http://www.ruby-lang.org/bugreport.html
2011/10/31 08:37:22 [error] 6201#0: *6 upstream prematurely closed
connection while reading response header from upstream, client:
127.0.0.1, server: _, request: "GET /status HTTP/1.1", upstream: "passenger:unix:/passenger_helper_server:", host: "0.0.0.0:3000"
Any ideas? Thank you
This has been discussed in the last week on the Passenger mailing list.
Looks like it's still an open bug:
http://code.google.com/p/phusion-passenger/issues/detail?id=714
Only solution I know of is to downgrade to 1.9.2-p290 until it's fixed.