Cache task in AzDO is timing out - azure

My cache task fails with a timeout exception, wasn't able to find any information on the web
2021-11-19T13:12:49.5440178Z ##[section]Starting: Cache Maven local repo
2021-11-19T13:12:49.5444463Z ==============================================================================
2021-11-19T13:12:49.5444700Z Task : Cache
2021-11-19T13:12:49.5444880Z Description : Cache files between runs
2021-11-19T13:12:49.5445073Z Version : 2.0.1
2021-11-19T13:12:49.5445247Z Author : Microsoft Corporation
2021-11-19T13:12:49.5445454Z Help : https://aka.ms/pipeline-caching-docs
2021-11-19T13:12:49.5445913Z ==============================================================================
2021-11-19T13:12:50.3859003Z Resolving key:
2021-11-19T13:12:50.3867990Z - maven [string]
2021-11-19T13:12:50.3868628Z - "Linux" [string]
2021-11-19T13:12:50.3869252Z - **/pom.xml [file pattern; matches: 1]
2021-11-19T13:12:50.3870147Z - s/pom.xml --> 425BE14263A590554133E4A4AE3B095D0207EE19CADB68111111A8623073C9
2021-11-19T13:12:50.3870747Z Resolved to: maven|"Linux"|6BG0VLzocHR1ABXQNLQ+q7oxXHj2Ln9xNBME=
2021-11-19T13:12:50.3872532Z Resolving restore key:
2021-11-19T13:12:50.3873112Z - maven [string]
2021-11-19T13:12:50.3873653Z - "Linux" [string]
2021-11-19T13:12:50.3874064Z Resolved to: maven|"Linux"|**
2021-11-19T13:12:50.3874469Z Resolving restore key:
2021-11-19T13:12:50.3874998Z - maven [string]
2021-11-19T13:12:50.3875403Z Resolved to: maven|**
2021-11-19T13:12:50.4071086Z ApplicationInsightsTelemetrySender will correlate events with X-TFS-Session 018d9b8b-7e2e-4eb4-9081-60a8aac6ca19
2021-11-19T13:12:50.4271999Z Getting a pipeline cache artifact with one of the following fingerprints:
2021-11-19T13:12:50.4272751Z Fingerprint: `maven|"Linux"|6BG0VLzocHR1ABXQNLQ+CkcxTTgq7oxXHj2Ln9xNBME=`
2021-11-19T13:12:50.4273230Z Fingerprint: `maven|"Linux"|**`
2021-11-19T13:12:50.4273649Z Fingerprint: `maven|**`
2021-11-19T13:12:51.4866539Z There is a cache hit: `maven|"Linux"|6BG0VLzocHR1ABXQNLQ+CkcxTTgq7oxXHj2Ln9xNBME=`
2021-11-19T13:12:51.4878034Z Used scope: 1506;0fc5062f-55dd-476b-baba-8952a15401e7;refs/heads/EOD_STORES;52820a17-3ace-4f9e-ba77-2330a6eccacb
2021-11-19T13:12:51.5808454Z Entry found at fingerprint: `maven|"Linux"|6BG0VLzocHR1ABXQNLQ+CkcxTTgq7oxXHj2Ln9xNBME=`
2021-11-19T13:13:51.9289494Z [https://vb8vsblobprodsu6weus46.blob.core.windows.net/db908636dc538642c896c6b0557076a854/1F68E25AD7A9B91792F6DE976146515E90F7488470FD5DB9D2166AEB7C2451A201?sv=2019-07-07&sr=b&spr=https&se=2021-11-20T14:07:21Z&sp=r&rscl=x-e2eid-7f1caaa0-030b4341-adf321f6-8515e4e2-session-018d9b8b-7e2e4eb4-908160a8-aac6ca19] Try 1/5, Task was requested to be canceled.
2021-11-19T13:45:52.9504822Z ApplicationInsightsTelemetrySender correlated 3 events with X-TFS-Session 018d9b8b-7e2e-4eb4-9081-60a8aac6ca19
2021-11-19T13:45:52.9581543Z ##[error]Attempt timed out after 00:01:00.
2021-11-19T13:45:52.9618987Z ##[section]Finishing: Cache Maven local repo

Related

ERROR: Sonar server 'http://localhost:9000' can not be reached in GitLab Pipeline

I'm trying to integrate SonarQube into my CICD pipeline on GitLab but I am getting an error during the sonarqube stage on Gitlab. I followed the documentation for the GitLab integration so this is how my code looks like:
gitlab-ci.yml file:
sonarqube-check:
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- sonar-scanner -Dsonar.qualitygate.wait=true
allow_failure: true
only:
- sonarqube
In the root folder I have the sonar-project.properties file:
# must be unique in a given SonarQube instance
sonar.projectKey=<name>
# --- optional properties ---
# defaults to project key
sonar.projectName=application with SonarQube
# defaults to 'not provided'
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources=src
sonar.host.url=http://127.0.0.1:9000
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
I originally did localhost:9000 for the sonar.host.url but that still produces the following error:
ERROR: SonarQube server [http://127.0.0.1:9000] can not be reached
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.741s
ERROR: Error during SonarScanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
INFO: Final Memory: 3M/14M
INFO: ------------------------------------------------------------------------
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
... 7 more
Caused by: java.net.ConnectException: Failed to connect to /127.0.0.1:9000
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:265)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:183)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Transmitter.newExchange(Transmitter.java:169)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:81)
at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:115)
at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
... 10 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
at java.base/java.net.Socket.connect(Unknown Source)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.platform.Platform.connectSocket(Platform.java:130)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:263)
... 31 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
I'm not really sure what to do next for this to work. I also created two environmental variables in GitLab like the documentation says: SONAR_HOST_URL and SONAR_TOKEN but I'm not sure if that does anything. I set SONAR_HOST_URL to localhost:9000 too.... Any guidance or help is greatly appreciated!! I just want to have it so there is a sonarqube check during my CI/CD pipeline in GitLab...

WARNING: Uploading artifacts as "archive" to coordinator... failed id=1515 responseStatus=500 Internal Server Error status=500

I'm using Gitlab self server community version ci/cd function, It has been running well, But suddenly one day,All the projects in the gitlab/cicd has failed, it mentions below errors:
Uploading artifacts for successful job
Uploading artifacts...
promotion-api/my-boot-module-system/target/*.jar: found 1 matching files and directories
WARNING: Uploading artifacts as "archive" to coordinator... failed id=1515 responseStatus=500 Internal Server Error status=500 token=xrDFnLeB
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... failed id=1515 responseStatus=500 Internal Server Error status=500 token=xrDFnLeB
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... failed id=1515 responseStatus=500 Internal Server Error status=500 token=xrDFnLeB
FATAL: invalid argument
ERROR: Job failed: exit code 1
Below is the code in .gitlab-ci.yml
deploy-java:
stage: deploy
dependencies:
- build-java
image:
name: docker/compose:latest
before_script:
- docker info
- docker-compose -v
script:
- cd promotion-api
- docker-compose build
- docker images
- docker ps -a
- docker-compose up -d
tags:
- promotion
2021-3-29:
I switched the runner from linux version to docker, seems all fine till now
You ran into a bug in GitLab itself. Instead of a rather obscure HTTP status 500 it should say what the issue is explicitly. It is likely not a problem in your repository or CI settings.
Follow these issues to find out more:
Artifact is stopped in the transfer, possibly because it takes longer than some timeout to upload: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26869
Artifact is larger than 1 GB: https://gitlab.com/gitlab-org/gitlab/-/issues/267111
For me the problem was that gitlab had run out of disk-space.
After having deleted unnecessary artifacts and files everything was working correctly again.
You can check your system status (if you host your own gitlab) here: www.gitlab-url.com/admin/system_info
(Go to: Admin Area > Monitoring > System Info)
Hope it helps!

Remote http archetypeCatalog doesn't work in Linux

I created one Maven archetype and uploaded to Nexus repository. I can generate one project based on that archetype with "mvn archetype:generate -DarchetypeCatalog=http://myhost:8080/nexus/content/repositories/my-snapshots/archetype-catalog.xml " command on Windows. The catalog xml is valid and I can open from browser manually.
Now I followed the same steps on Linux, configured the server part and repository profile in conf/setting.xml as the same content with Windows. The maven reported "No catalog defined. Using internal catalog". It seems the Maven didn't read the "-DarchetypeCatalog=...." part.
The debug log is as below. Maven version is 3.3.9. The issue reproduced on both Redhat and Ubuntu. Hope anyone can suggest a solution. Thanks.
[DEBUG] RuntimeInstance successfully initialized.
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-archetype-plugin:3.0.0:generate' with basic configurator -->
[DEBUG] (f) archetypeCatalog = http://myhost:8080/nexus/content/repositories/my-snapshots/archetype-catalog.xml
[DEBUG] (f) basedir = /opt/testmaven
[DEBUG] (f) interactiveMode = true
[DEBUG] (f) localRepository = id: local
url: file:///root/.m2/repository/
layout: default
snapshots: [enabled => true, update => always]
releases: [enabled => true, update => always]
[DEBUG] (f) remoteArtifactRepositories = [ id: my-snapshots
url: http://myhost:8080/nexus/content/repositories/my-snapshots
layout: default
snapshots: [enabled => true, update => always]
releases: [enabled => false, update => always]
, id: central
url: https://repo.maven.apache.org/maven2
layout: default
snapshots: [enabled => false, update => daily]
releases: [enabled => true, update => daily]
]
[DEBUG] (f) session = org.apache.maven.execution.MavenSession#4943defe
[DEBUG] -- end configuration --
[INFO] Generating project in Interactive mode
[INFO] No catalog defined. Using internal catalog
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: internal -> org.apache.maven.archetypes:maven-archetype-archetype (An archetype which contains a sample archetype.)
.......
In settings.xml, we need to configure a mirror :
<mirrors>
<mirror>
<name>Local Nexus Mirror</name>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://myhost:8080/nexus/content/groups/public</url>
</mirror>
</mirrors>
Once you’ve configured Nexus to be the mirror for all repositories, Maven will now consult the local installation of Nexus instead of going out to the central Maven repository.
If Nexus has the artifact requested, the artifact will be served from the local Nexus installation.
We can try specifying -DarchetypeCatalog=remote or -DarchetypeCatalog=local while generating the maven artifact through mvn archetype:generate.
If the archetype-cataog is available in local, we can directly use -Dcatalog=<url>

Gitlab runner artifacts : 405 Method Not allowed

I try to use artifacts on my Gitlab and when my runner try to put my artifact file on Giltlab, i have this message :
WARNING: Uploading artifacts to coordinator... failed id=504 responseStatus=405 Method Not Allowed status=405 Method Not Allowed token=HebbSqMD
WARNING: Retrying...
WARNING: Uploading artifacts to coordinator... failed id=504 responseStatus=405 Method Not Allowed status=405 Method Not Allowed token=HebbSqMD
WARNING: Retrying...
WARNING: Uploading artifacts to coordinator... failed id=504 responseStatus=405 Method Not Allowed status=405 Method Not Allowed token=HebbSqMD
FATAL: invalid argument
ERROR: Job failed: exit code 1
My job is :
build:
stage: build
script:
- echo "Building the app" > out.txt
artifacts:
paths:
- out.txt
Gitlab 8.16 or 8.17 : same probleme
Gitlab runner on other host (docker executor) : 1.11.0 o 1.10.4 : same probleme
Simply, verified artifacts enabled in /etc/gitlab/gitlab.rb file:
## Build Artifacts
# gitlab_rails['artifacts_enabled'] = true
# gitlab_rails['artifacts_path'] = "/mnt/storage/artifacts"

puppet-acl module on Windows throws transactionstore.yaml corrupt error

Trying out puppet-acl module on Windows Server 2016, Preview5. I'm getting the weirdest error on the second puppet run. If i remove the trnsactionstore.yaml file, and re-run the puppet agent, the behavior is repeatable. Im running puppet4 with latest agent version.
This is my codeblock
acl { "c:/temp":
permissions => [
{ identity => 'Administrator', rights => ['full'] },
{ identity => 'Users', rights => ['read','execute'] }
],
}
This is the output from the puppet-run.
PS C:\ProgramData\PuppetLabs\puppet\cache\state> puppet agent -t
Info: Using configured environment 'local'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for opslowebf02n02.local
Error: Transaction store file C:/ProgramData/PuppetLabs/puppet/cache/state/transactionstore.yaml is corrupt (wrong number of arguments (0 for 1..2)); replacing
Error: Transaction state file C:/ProgramData/PuppetLabs/puppet/cache/state/transactionstore.yaml is valid YAML but not returning a hash. Check the file for corruption, or remove it before continuing.
Info: Applying configuration version '1471436916'
Notice: /Stage[main]/platform_base_system::Role::Windows/Exec[check-powershell-exection-policy]/returns: executed successfully
Notice: /Stage[main]/configs_iis::Profile::Default/Exec[check-iis-global-anonymous-authentication]/returns: executed successfully
Notice: Applied catalog in 7.42 seconds
In the transactionstore.yaml file, this is the error section:
Acl[c:/temp]:
parameters:
permissions:
system_value:
- !ruby/hash:Puppet::Type::Acl::Ace {}
- !ruby/hash:Puppet::Type::Acl::Ace {}
inherit_parent_permissions:
system_value: :true
This has been resolved by dowwngrading the puppet agent to 4.5.3.
Behavior of the 4.6.0 version must have changed.
With 4.5.3 i still see the error in the logfile, but the puppetrun does not fail
I'll try to talk to the people at puppet about this.
Acl[c:/temp]:
parameters:
permissions:
system_value:
- !ruby/hash:Puppet::Type::Acl::Ace {}
- !ruby/hash:Puppet::Type::Acl::Ace {}
inherit_parent_permissions:
system_value: :true
This is being tracked as https://tickets.puppetlabs.com/browse/PUP-6629. It's almost coincidental that you created https://tickets.puppetlabs.com/browse/PUP-6630 right afterwards.

Resources