I have file bitbucket-pipelines.yml like this:
image:
name: aws
aws:
access-key: $AWS_KEY
secret-key: $AWS_SECRET
definitions:
services:
postgres:
image: postgres
environment:
POSTGRES_DB: "xxx"
POSTGRES_USER: "xxx"
POSTGRES_PASSWORD: "xxx"
docker:
memory: 3072
caches:
yarncustom: /usr/local/share/.cache/yarn/v1
steps:
- step: &build-step
name: SonarQube analysis
script:
- pipe: sonarsource/sonarqube-scan:1.2.0
variables:
SONAR_HOST_URL: $SONAR_HOST_URL
SONAR_TOKEN: $SONAR_TOKEN
pipelines:
# default:
# - step:
# name: Run Unit Tests
# caches:
# - yarncustom
# script:
# - env=test bash run_unit_tests.sh
# services:
# - postgres
# - step:
# name: Run Linting
# caches:
# - yarncustom
# script:
# - bash run_linting.sh
branches:
xxx-xxx:
- step:
name: Run Unit Tests
caches:
- yarncustom
script:
- env=test bash run_unit_tests.sh
services:
- postgres
- step: *build-step
and this is my error, I have try for 3 days and read a lot of thread in community but I do not resolve my problem, pls help me
INFO: CPD Executor Calculating CPD for 5003 files
INFO: CPD Executor CPD calculation finished (done) | time=6672ms
INFO: Analysis report generated in 1367ms, dir size=71.7 MB
INFO: Analysis report compressed in 15274ms, zip size=38.4 MB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 14:27.471s
INFO: Final Memory: 58M/200M
ERROR: Error during SonarScanner execution
INFO: ------------------------------------------------------------------------
java.lang.IllegalStateException: Failed to upload report: Fail to request url: http://sonarqube.xxx.vn/api/ce/submit?projectKey=xxx
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:227)
at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:155)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:376)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.lang.IllegalStateException: Fail to request url: http://sonarqube.xxx.vn/api/ce/submit?projectKey=xxx
at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:211)
at org.sonarqube.ws.client.HttpConnector.executeRequest(HttpConnector.java:161)
at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:116)
at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:87)
at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:225)
... 21 more
Caused by: java.net.SocketException: Broken pipe (Write failed)
at java.base/java.net.SocketOutputStream.socketWrite0(Native Method)
at java.base/java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110)
at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:150)
at okio.OutputStreamSink.write(JvmOkio.kt:57)
at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:99)
at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:255)
at okio.RealBufferedSink.write(RealBufferedSink.kt:146)
at okhttp3.internal.http1.Http1ExchangeCodec$KnownLengthSink.write(Http1ExchangeCodec.kt:271)
at okio.ForwardingSink.write(ForwardingSink.kt:29)
at okhttp3.internal.connection.Exchange$RequestBodySink.write(Exchange.kt:218)
at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:255)
at okio.RealBufferedSink.writeAll(RealBufferedSink.kt:194)
at okhttp3.RequestBody$Companion$asRequestBody$1.writeTo(RequestBody.kt:167)
at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.kt:157)
at okhttp3.MultipartBody.writeTo(MultipartBody.kt:93)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:59)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at org.sonarqube.ws.client.OkHttpClientBuilder.addHeaders(OkHttpClientBuilder.java:222)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:209)
... 25 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
my version is * Community Edition
- Version 10.0 (build 68432)
Thanks in advance