Error while running docker sonarscanner begin command - windows

I pulled the latest docker image for sonarqube and the image runs fine. The sonarqube server is listening at localhost:9000. When I run the dotnet sonarscanner begin to analyze asp.net Core 3.1 project, after some time, I get timeout error. Below is the log from the command
Using the .NET Core version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
18:47:29.653 Updating build integration targets...
18:49:09.803 Failed to request and parse 'http://localhost:9000/api/server/version': The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
18:49:09.811 The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
18:49:09.814 Pre-processing failed. Exit code: 1
The API request works fine through Postman. What could cause the failure?

After I try to change port 9000 to 8000 and retry and it worked!
ports:
- "8000:9000"

Related

WinError 10061 occurs during executing GitLab pipeline

During the execution of tests within the pipeline, the following error occurs:
The problem appeared after I launched a local server with port 9999 in order to build an allure report. The server was later stopped, but the problem persisted. How to fix the error?

Circle Ci - Start react server and test via cypress

I'm running cypress on a server started in cirleci script. Though cypress can't seam to find the local server that I just started. Here's my scripts / setup. I've also tried the cypress circlci-orb and get the same error, so was trying run things myself to help debug. Here's the script details:
- run:
name: 'Run app tests'
command: |
cd app
yarn install --frozen-lockfile
yarn lint
yarn cypress:ci
package.json script:
"cypress:ci": "CYPRESS_BASE_URL=http://localhost:3000 yarn start & wait-on http-get://localhost:3000 && cypress run"
Error:
$ craco start
ℹ 「wds」: Project is running at http://192.168.208.3/
ℹ 「wds」: webpack output is served from
ℹ 「wds」: Content not from webpack is served from /root/project/app/public
ℹ 「wds」: 404s will fallback to /
Starting the development server...
.....
react startup output
......
Cypress tests are kicked off and get the following error
We attempted to make an http request to this URL but the request failed without a response.
We received this error at the network level:
> Error: connect ECONNREFUSED 127.0.0.1:3000
The solution: Up your resource class! In your circleci/config.yml
jobs:
continuous-integration:
resource_class: large
It was non obvious as there were no memory/resource warnings, but according to the circle ci team:
When the machine runs out of memory processes are killed which could include the server.
That server was the cra-server i was trying to start. I upped the resource class and voilà it ran and was found by cypress! In our case we bumped it from a medium to a large class, but may be different for you.
Here's the available resource classes you can use:
https://circleci.com/product/features/resource-classes/

Sonarqube Failed to upload report 413

I am running sonarqube using gradle command ./gradlew sonarqube -Dsonar.host.url=https://sonar-server-url.
I am getting error Failed to upload report - HTTP code 413.
Request Entity Too Large.
I am using sonarserver version : Community Edition Version 7.8.
I am running sonar report using gradle command: ./gradlew sonarqube -Dsonar.host.url=https://sonar-server-url
I am getting error Failed to upload report.
Sonarqube server is on oracle cloud (oci) node and the report file size is 10M.
413 Request Entity Too Large
I got this when I was using the Nginx server for SonarQube.
Explanation
A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when a client attempts to upload a large file to a web server, and the server responds with a 413 error to alert the client.
Solution
For Nginx servers
To allow the request size to be up to 20 megabytes, add the following line to your Nginx configuration file:
...
client_max_body_size 20M;
....
configuration files should be found in /etc/nginx/ directory
Tips
I would recommend updating the dedicated configuration file for SonarQube server placed inside /etc/nginx/sites-enabled/ folder
this property can be placed inside the server {...} , http {...} or, location{...} block of the configuration file

Error building Spring-boot from Master - Tests Failed: Timeout on blocking read for 30000 MILLISECONDS

It's my first time trying to contribute in opensource. I'm trying to build Spring-Boot from Master without any change using the following command:
./mvnw -Pfull -X clean install
And all the test from class JettyReactiveWebServerFactoryTests failed with the following error:
[ERROR] noCompressionForUserAgent(org.springframework.boot.web.embedded.jetty.JettyReactiveWebServerFactoryTests)
Time elapsed: 30.021 s <<< ERROR!
java.lang.IllegalStateException: Timeout on blocking read for 30000 MILLISECONDS
I could build without any problems the 1.5.X branch, but 2.0.X or greater failed with the same error.
I already changed the MAVEN_OPTS in my .bash_profile in order to increase the amount of memory available to Maven.
I'm using macOS High Sierra and JDK 8.0.181-oracle
Do I need to configure something else?
Thanks in advance!

Composer-Rest-Server not connecting

I am testing a a business network I created, I ran the Composer-rest-server and all worked fine, then shut the server as suggested in the developers guide , then I proceeded use the yo hyperledger composer to create the skeleton of the angular app, however, now the angular app is showing in the local browser, however, the composer-rest- server is not.
Expected Behavior:
I should start the composer-rest- server in localhost:3000 and the angular app as well
Actual Behavior:
I get this message;
scovering types from business network definition ...
Connection fails: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
at _checkRuntimeVersions.then.catch (/home/node/.nvm/versions/node/v6.11.2/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:696:34)
Your Environment
composer-cli#0.11.3
generator-hyperledger-composer#0.11.3
composer-rest-server#0.11.3
Docker version 17.06.0-ce, build 02c1d87
docker-compose version 1.13.0, build 1719ceb
The Problem
If you kill your fabric instance using ./stopFabric that you started using the ./startFabric command then all the containers that were apart of the business network were killed as well and therefore you need to reinstall the .bna and start the network again. (the development flow provided is purposely volatile for rapid development)
The Solution
1.) Type docker ps to see all of your running containers. You should see none if you are getting that error because your peer is not responding to pings
2.) Open a separate terminal and navigate to where you have fabric-dev-servers in the terminal and run ./fabricStart. This will start all the containers like your network Certificate Authority, the peer, the orderer, etc.
3.) Return to your project in another terminal. Do Step 1 & 2 found at the developer tutorial (you likely won't need to do step 3 since you likely already imported the network administrator identity going through the tutorial)
4.) Run composer network ping --card admin#tutorial-network. The ping should go through.
5.) Run docker ps. You should see 4 containers running
6.) Run composer-rest-server and follow the steps from the tutorial.
7.) Run cd tutorial-network-app to switch to where your angular application is (or wherever you generated it with the yo command)
8.) Navigate to http://localhost:3000 and everything should work.
Any other questions or problems just reply here and I can help.
The expected behaviour is that the REST server is already running (the the generator uses Loopback to spin up a REST server already (that's why you shut down the previous REST server)). Its described here https://hyperledger.github.io/composer/unstable/tutorials/developer-guide.html under 'Generate your Skeleton Web Application'.
After you created the application - following completion of the yo hyperledger-composer questions (and after providing the answers) you run your application using npm start from within the generated application directory. Your app is accessible at http://localhost:4200.

Resources