Apache Spark: Unable to build: [error] Server access Error..jetty - hadoop

I have downloaded spark-1.4.1.tgz, unzipped it.
Now, when i try to build as follows, it gets stuck:
$ ./sbt/sbt assembly
Invoking 'build/sbt assembly' now
[info] Loading project definition...
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'.
...
[info] Resolving org.eclipse.jetty#jetty-parent;18
[error] Server access Error: Connection reset url=http://download.eclipse.org/jgit/maven/org/eclipse/jetty/jetty-parent/18/jetty-parent-18.jar
[error] Server access Error: Server redirected too many times (20) url=http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/org.eclipse.jetty.orbit/jetty-orbit/1/jars/jetty-orbit.jar
The build gets stuck at this point. Am i missing any configuration/libraries?

You have a network connectivity issue and probably need to retry.

Related

How do you hide Socket.io error messages in C++?

So I get error messages like this printed to the console from Socket.io:
[2023-02-09 17:53:43] [info] asio async_resolve error: asio.system:11001 (No such host is known.)
[2023-02-09 17:53:43] [info] Error getting remote endpoint: asio.system:10009 (The file handle supplied is not valid.)
[2023-02-09 17:53:43] [error] handle_connect error: No such host is known.
[2023-02-09 17:53:43] [info] asio async_shutdown error: asio.ssl:336462100 (uninitialized)
I just need to hide them from the console but cannot figure out how to do it. I've tried using off_error, set logs quiet, and try/catch but none worked.
Does anyone know how to solve this?

503 from server: Service Unavailable: Back-end server is at capacity

I'm trying to build a jib based container with gradle.
I'm getting a 503 error when it tries to GET an xml file from jfrog.org.
+ eval set -- '"-Xmx64m"' '"-Xms64m"' '"-Xdock:name=Gradle"' '"-Xdock:icon=/Users/username/VSCode/globality-karate-testing/media/gradle.icns"' '"-Dorg.gradle.appname=gradlew"' -classpath '"/Users/username/VSCode/globality-karate-testing/gradle/wrapper/gradle-wrapper.jar"' org.gradle.wrapper.GradleWrapperMain ''\''jibDockerBuild'\'' \
'
++ set -- -Xmx64m -Xms64m -Xdock:name=Gradle -Xdock:icon=/Users/username/VSCode/globality-karate-testing/media/gradle.icns -Dorg.gradle.appname=gradlew -classpath /Users/username/VSCode/globality-karate-testing/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain jibDockerBuild
+ exec /Users/username/.sdkman/candidates/java/current/bin/java -Xmx64m -Xms64m -Xdock:name=Gradle -Xdock:icon=/Users/username/VSCode/globality-karate-testing/media/gradle.icns -Dorg.gradle.appname=gradlew -classpath /Users/username/VSCode/globality-karate-testing/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain jibDockerBuild
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'karate-base'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.jfrog.buildinfo:build-info-extractor-gradle:4.+.
Required by:
project :
> Failed to list versions for org.jfrog.buildinfo:build-info-extractor-gradle.
> Unable to load Maven meta-data from https://repo.jfrog.org/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/maven-metadata.xml.
> Could not get resource 'https://repo.jfrog.org/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/maven-metadata.xml'.
> Could not GET 'https://repo.jfrog.org/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/maven-metadata.xml'.
Received status code 503 from server: Service Unavailable: Back-end server is at capacity
This appears to be a problem with the jfrog.org server.
It only seems to happen if this is the first time someone has built the project.
Another engineer was able to replicate my error, who had not built this prior.
An engineer who had built the project earlier does not have problems. Seems to be an initialization file.
Heard back from Jfrog support.
The repo https://repo.jfrog.org/artifactory/ has been deprecated.
Replace it with: https://repo1.maven.org/maven2

mvn deploy to artifactory (large size artifact) gives broken pipe error

I am trying to deploy a large zip file (305 MB) to artifactory using the mvn deploy command, but i am getting broken pipe errors. I tried to upload the same file via the browser's "Deploy" button, and it worked fine.
Is there a setting that i can use to increase the socket timeout, or force maven/artifactory to wait until the package is uploaded?
Any help on how to resolve this is appreciated. Here are the log entries and stack trace:
May 09, 2016 11:16:32 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://mvnrepo.dev.xyz.myorg.net:8080
May 09, 2016 11:17:02 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://mvnrepo.dev.xyz.myorg.net:8080: Broken pipe
May 09, 2016 11:17:02 AM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://mvnrepo.dev.xyz.myorg.net:8080
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.myorg.xyz.myapp:my-app-package:zip:0.1-svc20160509.151532-7 from/to xyz-service-snapshots (http://mvnrepo.dev.xyz.myorg.net:8080/artifactory/xyz-service-local): Broken pipe
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.put(BasicRepositoryConnector.java:274)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:311)
... 26 more
Caused by: org.apache.maven.wagon.TransferFailedException: Broken pipe
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:662)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:557)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:539)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:533)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:513)
at org.eclipse.aether.transport.wagon.WagonTransporter$PutTaskRunner.run(WagonTransporter.java:644)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
at org.eclipse.aether.transport.wagon.WagonTransporter.put(WagonTransporter.java:410)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:510)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 28 more
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:123)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:135)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:164)
at org.apache.maven.wagon.providers.http.httpclient.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:115)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon$RequestEntityImplementation.writeTo(AbstractHttpClientWagon.java:204)
at org.apache.maven.wagon.providers.http.httpclient.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:155)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:149)
at org.apache.maven.wagon.providers.http.httpclient.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:236)
I managed to fix the issue by downgrade maven version from 3.5.2 to 3.0.4
Artifactory - open source 7.12.6
General
A Broken pipe error typically indicates a network issue. Deploying an artifact on Artifactory may fail with this error either if you have network issues (lost packets during deployment) or if your Artifactory repository has ran out of space (physical memory on the repository). Check Case 1 and Case 2 for troubleshooting.
Tip: Run mvn deploy -X. The -X option will log further information related with your error (sets log-level to debug)
Case 1: Network Issue
Solution: Just retry it :)
Issue Details
Maven's source code seems to be using apache's Validate method, (throws an IllegalArgumentException on validation error) to compare and validate the size of the deployed artifact with the artifact that was built locally. Note: On deploy, maven builds the artifact locally, and then uploads it to the configured repository (could be Artifactory, Maven Central etc) which in your case is Artifactory.
The error should look like this:
[DEBUG] Failed to dispatch transfer event 'PUT PROGRESSED [ARTIFACT_SERVER_URL]/artifact.jar <> [LOCAL_PATH]/artifact.jar
java.lang.IllegalArgumentException: progressed file size cannot be greater than size: 117964800 > 116927216
at org.apache.commons.lang3.Validate.isTrue (Validate.java:158)
at org.apache.maven.cli.transfer.AbstractMavenTransferListener$FileSizeFormat.formatProgress (AbstractMavenTransferListener.java:195)
at org.apache.maven.cli.transfer.ConsoleMavenTransferListener.getStatus (ConsoleMavenTransferListener.java:117)
at org.apache.maven.cli.transfer.ConsoleMavenTransferListener.transferProgressed (ConsoleMavenTransferListener.java:90)
...
Case 2: No space left on Artifactory repository
Solution: Free up space on Artifactory repository
Issue Details
For any erros related with deployment to artifactory, you can always check Artifactory's log from Web Application.
Just Navigate (from Sidebar) to Admin/Advanced/System Logs. Check for any error or warning in the log file.
An error related with the available space could be like the following:
2021-08-18 11:20:43,339 [http-nio-8081-exec-19] [WARN ] (o.a.w.s.RepoFilter :252) - Sending HTTP error code 404: No space left on device
2021-08-18 11:20:43,346 [http-nio-8081-exec-16] [WARN ] (o.a.r.s.RepositoryServiceImpl:1739) - Datastore disk is too high: Warning limit: 80%, Used: 94%, Total: 688.01 GB, Used: 652.97 GB, Available: 35.04 GB
2021-08-18 11:20:43,346 [http-nio-8081-exec-16] [INFO ] (o.a.e.UploadServiceImpl:386) - Deploy to 'libs-snapshot-local:artifact.jar' Content-Length: 170019165
2021-08-18 11:20:44,086 [http-nio-8081-exec-16] [ERROR] (o.a.w.s.RepoFilter :251) - Upload request of libs-snapshot-local:artifact.jar failed due to {}
java.io.IOException: No space left on device
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:326)
...
In case you do identify such errors, try to remove some old artifacts to free up space, and retry your deployment later
Tip: It's a good practise to set some purging policies for old artifacts/snapshots on your Artifactory.

Authenticate sonar-runner via basic auth

Our sonarqube server is behind http basic authentication and local runner fails with 401 error. Is it somehow possible to provide credentials to it? AOfficial docs shows how to provide sonarqube's internal user...
UPD #1:
sonarqube: v5.3,
sonar-runner: v2.5
Debug log of runner:
INFO: Scanner configuration file: /Users/user/Documents/Projects/Project1/sonar-scanner-2.5/conf/sonar-runner.properties
INFO: Project configuration file: /Users/user/Documents/Projects/Project1/sonar-project.properties
INFO: SonarQube Scanner 2.5
INFO: Java 1.8.0_45 Oracle Corporation (64-bit)
INFO: Mac OS X 10.11.3 x86_64
INFO: Error stacktraces are turned on.
DEBUG: cache: /Users/user/.sonar/ws_cache/https%3A%2F%2Fexample.com%2Fsonar%2F/global
INFO: User cache: /Users/user/.sonar/cache
DEBUG: Extract sonar-runner-batch in temp...
DEBUG: Get bootstrap index...
DEBUG: Download: https://example.com/sonar/batch_bootstrap/index
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.171s
INFO: Final Memory: 5M/245M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
org.sonar.runner.impl.RunnerException: Unable to execute SonarQube
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:100)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:87)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:87)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:83)
at org.sonar.runner.api.EmbeddedRunner.doStart(EmbeddedRunner.java:249)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:187)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:182)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:66)
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:93)
at org.sonar.runner.impl.Jars.download(Jars.java:70)
at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:40)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:91)
... 9 more
Caused by: java.lang.IllegalStateException: Status returned by url [https://example.com/sonar/batch_bootstrap/index] is not valid: [401]
at org.sonar.runner.impl.ServerConnection.callUrl(ServerConnection.java:186)
at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:121)
at org.sonar.runner.impl.ServerConnection.tryServerFirst(ServerConnection.java:148)
at org.sonar.runner.impl.ServerConnection.download(ServerConnection.java:112)
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:78)
... 12 more
No it doesn't look like sonar-runner supports proxy authentication. SonarQube has built-in access control so I'm not sure why you'd need proxy authentication on top of that. Maybe you could disable proxy authentication for SonarQube's URL.
The sonar-runner, even if configured with credentials, does not use these to make it's first call to the server. The endpoint is /batch/index. You have to allow public access to that endpoint. For all other urls basic auth is fine.
More details about my working setup in my answer here: https://stackoverflow.com/a/60132667/1838233
I've tried that setup with the runner and a sonar-project.properties file containing:
sonar.host.url=https://myserver/sonar/
sonar.login=${env.SONARUSER}
sonar.password=${env.SONARPWD}
and could access Sonar behind Apache basic auth that way.
I have been looking for this too and failed to find any options to allow this. One use case I can think of for needing this is you have the sonar client running on the far end of a GCP IAP away from the sonar server. You'd need to have the client pass through the initial proxy to get to the sonar server. Even if the sonar server supports this auth natively you need some way for the client to pass an auth header.
This is for scenarios where you either don't trust sonar or you don't trust the deployment of sonar by some novice, but you do trust a zero-trust protected proxy by gcp's platform

Sonar - Fail to request server version | HTTP Status 404 /

With each run done by console or by Jenkins throws me the following error:
SonarQube Runner 2.4
Java 1.8.0_51 Oracle Corporation (32-bit)
Linux 2.6.32-504.30.3.el6.i686 i386
INFO: Runner configuration file: /usr/local/sonar-runner/conf/sonar-runner.properties
INFO: Project configuration file: /opt/apps/php-sonar-runner/sonar-project.properties
INFO: Default locale: "es_ES", source code encoding: "UTF-8"
INFO: Work directory: /opt/apps/php-sonar-runner/./.sonar
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.042s
Final Memory: 0M/28M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Fail to request server version
ERROR: Caused by: Status returned by url : 'http://xxx.xxx.xx.xxx:9000/api/server/version' is invalid : 404
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Open the URL 'http://xxx.xxx.xx.xxx:9000/api/server/version' in a browser, see if it gives you a 404 error. If so, you need to find the right path to Sonar root on the remote server, maybe 'http://xxx.xxx.xx.xxx:9000/sonar/'?
When you have the full URL of Sonar, update the sonar.host.url property in your pom accordingly. See full documentation for more details.
Check the value of sonar.web.context = /myPath maybe you have some path and you configure other path in your url at your jenkis, tfs, etc. That is the reason you get an 404 error.
In your example you should not have that value configurated or without a value.
'http://xxx.xxx.xx.xxx:9000/myPath/api/server/version
In your sonar-runner.properties file
define #--- Default SonarQube sever as give below
sonar.host.url=http://localhost:9000/sonar
Also cross check in sonar.properties file i.e
sonar.web.port=9000
sonar.web.host=127.0.0.1
sonar.web.context=/sonar

Resources