sonarqube backstage integration is failing - backstage
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
Related
what goes is wrong with my heroku deploy?
I have a problem with my deploy. I build a app Localy with Laravel & vueJs this is a Pwa. So now I have end that everything works fine. My db mysql got 5 migrate, and seeders. So now I want to deploy to heroku, I do it exactly like that: https://devcenter.heroku.com/articles/getting-started-with-laravel But I got the famous 500 internal errors so I try to join my db with config var. I do heroku run php migrate working fine the seeding is good no error. I just can you drop that : 2020-04-23T08:01:00.908862+00:00 heroku[router]: at=info method=GET path="/" host=quiet-dusk-57631.herokuapp.com request_id=59ac99b0-1dbf-4b38-a2bf-641b8ef8ce33 fwd="92.137.142.110" dyno=web.1 connect=1ms service=16ms status=500 bytes=1782 protocol=https` 2020-04-23T08:01:00.902965+00:00 app[web.1]: 10.32.231.221 - - [23/Apr/2020:08:01:00 +0000] "GET / HTTP/1.1" 500 1558 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/81.0.4044.92 Chrome/81.0.4044.92 Safari/537.36 But 500 internal errors is ir :( I try something like that : Add "postinstall" "npm run prod" in script (package.json) run production npm install .... Everything I found maybe worked, but nothing work. If someone can help me :( I don't drop log or code because I don't know what is not going good and except the 500 server error on my app I got no error all is solved before. EDIT : So now the title and logo load on page top. But I got this error: Mixed Content: The page at 'https://guarded-caverns-46403.herokuapp.com/' was loaded over HTTPS, but requested an insecure script 'http://guarded-caverns-46403.herokuapp.com/js/app.js'. This request has been blocked; the content must be served over HTTPS.
In web.php i just add 'URL::forceScheme('https');' at the end. And all works good
"Failed to call HTTP server" error after upgrading SonarQube from 6.0 to 6.7.2
I have upgraded a SonarQube server from 6.0 to 6.7.2. Everything is fine, except that, after logging in as user "admin" and navigating to tab Administration, clicking on subtab System yields an error message An error has occurred: please contact your administrator. In file web.log: 2018.03.06 11:38:24 ERROR web[AWH6436/ICo3FeIjAAAz][o.s.s.w.WebServiceEngine] Fail to process request http://<HOST NAME>:20295/sonarqube/api/system/info java.lang.IllegalStateException: Failed to call HTTP server of process [key='ce', ipcIndex=3, logFilenamePrefix=ce] at org.sonar.ce.http.CeHttpClientImpl.call(CeHttpClientImpl.java:171) at org.sonar.ce.http.CeHttpClientImpl.retrieveSystemInfo(CeHttpClientImpl.java:60) at org.sonar.server.platform.ws.StandaloneSystemInfoWriter.write(StandaloneSystemInfoWriter.java:53) at org.sonar.server.platform.ws.InfoAction.handle(InfoAction.java:64) at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103) at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:86) at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126) ... Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://10.145.61.55 The IP address is that of the server. There is no mention of any port in the error message, I don't know if this has any relation with the error. It seems that the Web component cannot access the Compute Engine component. However nothing particular was found in file ce.log which ends with a trace Compute Engine is operational. I followed the short migration guide in https://docs.sonarqube.org/display/SONAR/Upgrading. Environment: Linux, JDK 8, Oracle DB Does anyone as a clue? Many thanks in advance.
For whoever who might stumble on the same issue: it was an error in my proxy configuration. Increasing the logging level by setting sonar.log.level=DEBUG in file sonar.properties yielded the following new traces in file web.log: 2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] sun.net.www.MessageHeader#668ee27b5 pairs: {GET http://127.0.0.1:40413/systemInfo HTTP/1.1: null}{User-Agent: SonarQube 6.7.2.37468 # AWHmcYEU8aGLjZ5sPfjj Java/1.8.0_60}{Host: 127.0.0.1:40413}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Proxy-Connection: keep-alive} 2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] sun.net.www.MessageHeader#527214044 pairs: {null: HTTP/1.1 301 Moved Permanently}{Server: BlueCoat-Security-Appliance}{Location: http://10.145.61.55}{Connection: Close} 2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] Redirected from http://127.0.0.1:40413/systemInfo to http://10.145.61.55 2018.03.07 11:52:04 ERROR web[AWIAFTpArQRjrTzMAAAg][o.s.s.w.WebServiceEngine] Fail to process request http://<HOST NAME>:20295/sonarqube/api/system/info The proxy was redirecting the Compute engine URL http://127.0.0.1:40413/systemInfo to http://10.145.61.55. The solution was to add 127.0.0.1 to http.nonProxyHosts in file sonar.properties.
H2O Import files via REST API from local server fails
I am trying to use h2o REST API to import CSV files that I have on my local server. Command: curl -v -X GET 'http://127.0.0.1:54321/3/ImportFiles?path=http://127.0.0.1:8083/datasets/tables/csv/RDsTWgcvAjHeWJFnbhCKTCE5rn6aLCjJ.csv' Result in following log: Trying 127.0.0.1... Connected to 127.0.0.1 (127.0.0.1) port 54321 (#0) GET /3/ImportFiles?path=http://127.0.0.1:8083/datasets/tables/csv/RDsTWgcvAjHeWJFnbhCKTCE5rn6aLCjJ.csv HTTP/1.1 Host: 127.0.0.1:54321 User-Agent: curl/7.47.0 Accept: / HTTP/1.1 200 OK X-h2o-build-project-version: 3.16.0.2 X-h2o-rest-api-version-max: 3 X-h2o-cluster-id: 1512722051559 X-h2o-cluster-good: true X-h2o-context-path: / Content-Type: application/json Content-Length: 349 Server: Jetty(8.y.z-SNAPSHOT) Connection #0 to host 127.0.0.1 left intact {"__meta":{"schema_version":3,"schema_name":"ImportFilesV3","schema_type":"ImportFiles"},"_exclude_fields":"","path":"http://127.0.0.1:8083/datasets/tables/csv/RDsTWgcvAjHeWJFnbhCKTCE5rn6aLCjJ.csv","pattern":null,"files":[],"destination_frames":[],"fails":["http://127.0.0.1:8083/datasets/tables/csv/RDsTWgcvAjHeWJFnbhCKTCE5rn6aLCjJ.csv"],"dels":[]} H2O log on TRACE level shows only: 12-08 15:41:59.951 10.8.128.101:54321 36013 #4756-331 INFO: GET /3/ImportFiles, parms: {path=http://127.0.0.1:8083/datasets/tables/csv/RDsTWgcvAjHeWJFnbhCKTCE5rn6aLCjJ.csv} Is there any way to debug while importing fails? h2o does not asking local server at all. Commands from other servers work well: curl -v -X GET "http://127.0.0.1:54321/3/ImportFiles?path=http://s3.amazonaws.com/h2o-public-test-data/smalldata/flow_examples/arrhythmia.csv.gz" curl -v -X GET "https://raw.github.com/h2oai/h2o/master/smalldata/logreg/prostate.csv"
In general, trying to interact directly with the H2O REST API isn't easy. The vast majority of people use a pre-made API client like Python or R. But if you really want to do this, I would debug it by comparing with something that's working. Like the R client for H2O. Write an R program that does this: h2o.init() h2o.startLogging() h2o.importFile("/path/to/data.csv") The startLogging() call will produce a detailed log file with all the REST API requests and responses. Look at that and try to mimic it. You can also refer to the autogenerated REST API documentation (http://docs.h2o.ai/h2o/latest-stable/h2o-docs/rest-api-reference.html), but I would caution that if you tried to write a working client just based on the docs it would be hard. Looking at a logged conversation from an already working client is by far your best bet.
library(h2o) h2o.init() h2o.startLogging() h2o.importFile("http://localhost:8082/datasets/tables/csv/vPrzC5TOQr6JTvnAYrU5AKyz8SP4ao8p.csv") Time: 2017-12-11 11:55:09.237 GET http://localhost:54321/3/Cloud?skip_ticks=true postBody: curlError: FALSE curlErrorMessage: httpStatusCode: 200 httpStatusMessage: OK millis: 7 {"__meta":{"schema_version":3,"schema_name":"CloudV3","schema_type":"Iced"},"_exclude_fields":"","skip_ticks":true,"version":"3.16.0.2","branch_name":"rel-wheeler","build_number":"2","build_age":"10 days","build_too_old":false,"node_idx":0,"cloud_name":"H2O_started_from_R_vasiliy_gey658","cloud_size":1,"cloud_uptime_millis":306486,"cloud_healthy":true,"bad_nodes":0,"consensus":true,"locked":true,"is_client":false,"nodes":[{"__meta":{"schema_version":3,"schema_name":"NodeV3","schema_type":"Iced"},"h2o":"localhost/127.0.0.1:54321","ip_port":"127.0.0.1:54321","healthy":true,"last_ping":1512982506643,"pid":97891,"num_cpus":4,"cpus_allowed":4,"nthreads":4,"sys_load":2.0917969,"my_cpu_pct":-1,"sys_cpu_pct":-1,"mem_value_size":17408,"pojo_mem":12224512,"free_mem":1896688640,"max_mem":1908930560,"swap_mem":0,"num_keys":56,"free_disk":0,"max_disk":0,"rpcs_active":0,"fjthrds":[-1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,1,0,0,0,0,0,0,0],"fjqueue":[-1,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,-1,0,0,0,0,0,0,0,0],"tcps_active":0,"open_fds":-1,"gflops":4.598999977111816,"mem_bw":6.423728128E9}],"internal_security_enabled":false} Time: 2017-12-11 11:55:09.251 GET http://localhost:54321/3/ImportFiles?path=http%3A%2F%2Flocalhost%3A8082%2Fdatasets%2Ftables%2Fcsv%2FvPrzC5TOQr6JTvnAYrU5AKyz8SP4ao8p.csv&pattern= postBody: curlError: FALSE curlErrorMessage: httpStatusCode: 200 httpStatusMessage: OK millis: 6 {"__meta":{"schema_version":3,"schema_name":"ImportFilesV3","schema_type":"ImportFiles"},"_exclude_fields":"","path":"http://localhost:8082/datasets/tables/csv/vPrzC5TOQr6JTvnAYrU5AKyz8SP4ao8p.csv","pattern":"","files":[],"destination_frames":[],"fails":["http://localhost:8082/datasets/tables/csv/vPrzC5TOQr6JTvnAYrU5AKyz8SP4ao8p.csv"],"dels":[]}
This is my import information.
NullPointerException while analyzing a project in SonarQube
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
G-WAN v7.12.6 can't visit the static contents
G-WAN out-of-box is running no problem with the dynamic contents but can't visit the static contents. I ran G-WAN with kk user(not root, no sudo). All files and directories are of kk user/group. I installed it in localhost. When I typed 127.0.0.1:8080 in the browser, it returned: Server not found Firefox can't find the server at www.index.html. It is strange that the returned server name was www.index.html When I typed 127.0.0.1:8080/index.html, it returned 404 file not found. How can I workaround these, until a new release is out? This time, there is no error message in the log file. (I installed G-WAN in Ubuntu 15.10) UPDATE: ------------------------ There are two strange info from the served_from.c, as below: This page was processed... Using get_env(): by the Server: 0.0.0.0:8080:8080(hostname: 127.0.0.1) ^^^^^^^^^^^^^^^^^(Should it be only one '8080'?) Virtual Host: /home/kk/dev/gwan_v7.12.6/0.0.0.0:8080/#0.0.0.0 HTTP method: GET HTTP request: /?served_from HTTP query: served_from HTTP entity: (null) Content-Encoding: 0 Content-Length: 0 Content-Type: 0 for the Client: 127.0.0.1:43199 Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 Using HTTP Headers to get the same information: by the Server: 27.0.0.1:8080 (hostname: 27.0.0.1) ^^^^^^^^^^^^^(Should it be 127.0.0.1 ? The leading '1' is missing.) HTTP method: GET HTTP entity: - Content-Encoding: 0 Content-Length: 0 Content-Type: 0 for the Client: 127.0.0.1:43199 ozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 Acpt-Language: n-US,en;q=0.5 Acpt-Encoding: 3: |GZIP|DEFLATE Cookies: - Is there anything wrong in v7.12.6? UPDATE 2 ================================ with the following steps, G-WAN v7.12.6 can't show static contents: 1. all files and directories are of the same user/group (i.e. kk) 2. out-of-box, listen to 8080 3. run ./gwan cannot visit static contents. with following changes, G-WAN works normally: 1. change directory 0.0.0.0.8080 to 0.0.0.0:80 2. run sudo ./gwan -d:kk:kk everything is normal. sorry for my mis-typing in the UPDATE2. It should be 0.0.0.0:80 (emphasize the colon). Actually, I typed it right in the directory name. Repeat: ./gwan should work according to G-WAN's document, since the user launching the program is owning all the files and directories.
If you can query the server for scripts then G-WAN is running fine. The problem is obviously a file permission issue, hence the error 404 file not found you got for the query 127.0.0.1:8080/index.html. This system configuration problem will affect any program, not specifically G-WAN. Consult our dedicated FAQ to find how to correct it. For the served_from.c script, feel free to display the IP address in the "correct" order and to cut the string at the expected position to avoid the listener port repetition. UPDATE: Your latest update says "changing directory 0.0.0.0.8080 to 0.0.0.0:80 works". This was the problem: "0.0.0.0.8080" has never been a valid syntax for G-WAN.