OOM when building quarkus native application - docker

Not sure what am I missing? After reading multiple blogs and StackOverflow questions, I tried increasing the memory to Xmx12G but with no success. I keep getting msg to increase memory.
Has anyone faced the issue in the recent past and is it been solved?
This is just the plain application downloaded directly from the quarkus website.
docker run --env LANG=C --rm -v qaurkus-test/target/qaurkus-test-1.0.0-SNAPSHOT-native-image-source-jar:/project:z --name build-native-bkbGA quay.io/quarkus/ubi-quarkus-native-image:21.2-java11 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=US -J-Dfile.encoding=UTF-8 -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar qaurkus-test-1.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -J-Xmx12G -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-UseServiceLoaderFeature -H:+StackTrace -H:-ParseOnce qaurkus-test-1.0.0-SNAPSHOT-runner
[qaurkus-test-1.0.0-SNAPSHOT-runner:25] classlist: 6,968.00 ms, 0.94 GB
[qaurkus-test-1.0.0-SNAPSHOT-runner:25] (cap): 534.58 ms, 0.94 GB
[qaurkus-test-1.0.0-SNAPSHOT-runner:25] setup: 2,329.28 ms, 0.94 GB
The bundle named: messages, has not been found. If the bundle is part of a module, verify the bundle name is a fully qualified class name. Otherwise verify the bundle path is accessible in the classpath.
19:29:29,666 INFO [org.jbo.threads] JBoss Threads version 3.4.2.Final
Error: Image build request failed with exit status 137
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.324 s
[INFO] Finished at: 2021-09-01T00:59:39+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.2.1.Final:build (default) on project qaurkus-test: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:235)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:829)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.lang.RuntimeException: Image generation failed. Exit code was 137 which indicates an out of memory error. Consider increasing the Xmx value for native image generation by setting the "quarkus.native.native-image-xmx" property
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:372)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:205)
[ERROR] ... 11 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Finally, got it working.
check how much memory docker is allocated using docker stats command
Follow the process mentioned in the post and increase it to atleast 8G, in my case max memory consumed was around 7G

Related

sbt compile error: java.nio.file.FileSystemException: /root: Read-only file system

I am working on a scala project that uses sbt 1.7.1
The project has its external dependencies like the database etc. that run in docker.
I'm not sure what started the issue exactly, but now when I try and go into sbt console I get this error:
[info] [launcher] getting org.scala-sbt sbt 1.7.1 (this may take some time)...
[error] [launcher] java.nio.file.FileSystemException: /root: Read-only file system
[error] [launcher] could not retrieve sbt 1.7.1
Earlier I was able to get into sbt console, but during compilation I got this error:
(I deleted the ~/.sbt folder to start over, that is when I can't even get into sbt console now)
sbt compile
[info] welcome to sbt 1.7.1 (Azul Systems, Inc. Java 11.0.10)
[info] loading settings for project app-backend-build from plugins.sbt ...
[info] loading project definition from /Users/username123/dev/git/project123/app-backend/project
[error] java.nio.file.FileSystemException: /root: Read-only file system
[error] at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
[error] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
[error] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
[error] at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:389)
[error] at java.base/java.nio.file.Files.createDirectory(Files.java:690)
[error] at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:797)
[error] at java.base/java.nio.file.Files.createDirectories(Files.java:783)
[error] at lmcoursier.internal.shaded.coursier.paths.Util.createDirectories(Util.java:81)
[error] at lmcoursier.internal.shaded.coursier.paths.CachePath.withStructureLock(CachePath.java:140)
[error] at lmcoursier.internal.shaded.coursier.cache.CacheLocks$.withStructureLock(CacheLocks.scala:20)
[error] at lmcoursier.internal.shaded.coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:37)
[error] at lmcoursier.internal.shaded.coursier.cache.internal.Downloader$Blocking$.remote(Downloader.scala:408)
[error] at lmcoursier.internal.shaded.coursier.cache.internal.Downloader.$anonfun$remote$5(Downloader.scala:510)
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] at scala.util.Success.map(Try.scala:213)
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:834)
[error] (update) java.nio.file.FileSystemException: /root: Read-only file system
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
If I go into a different folder, and try and create a new sbt project I get the same error:
sbt new scala/scala-seed.g8
I am using sdkman for my sbt installation, I deleted the .sbt folder and uninstalled sbt 1.7.1 and then re-installed it...that didn't help.
It seems as though some process has locked something related to sbt or coursier cache?
My project does have multiple modules, i'm not sure what root means in the error message.. the root project or some root folder that coursier might be using?
My sbt project was running fine earlier today, and now I cannot do anything related to scala on my system that uses sbt.
My system is running OSX, 13.0.1 (22A400).
Java home: ~/.jabba/jdk/zulu#1.11.0/Contents/Home
I just tried deleting the coursier cache and no change:
rm -Rf ~/Library/Caches/Coursier
That sbt console would run and compile the project.

JENKINS: Unable to load the mojo 'test'

When I am running build from jenkins. I am getting below error.The command I am running is mvn -P dev clean install
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test (default-test) on project OMS: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test failed: Unable to load the mojo 'test' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1': com.google.inject.ProvisionException: Guice provision errors:
[ERROR]
[ERROR] 1) No implementation for org.codehaus.plexus.languages.java.jpms.LocationManager was bound.
[ERROR] while locating org.apache.maven.plugin.surefire.SurefirePlugin
[ERROR] at ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1, parent: sun.misc.Launcher$AppClassLoader#5c647e05]
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with #com.google.inject.name.Named(value=org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test
But if I run the same command on the build machine manually. The build is getting successful. why I am getting error? I can't make the changes into pom as it is building successful while running mvn command directly.

SonarQube server [https://localhost:9000] can not be reached in Jenkins

I want to build a code coverage from sonarqube in Jenkins. The project is from github. I have configure everything that are necessary but the following errors still arise. Can someone please help me to solve this?
Established TCP socket on 59508
[OData] $ java -cp "D:\Program Files\plugins\maven-plugin\WEB-INF\lib\maven35-agent-1.12-alpha-1.jar;D:\downloads\apache-maven-3.5.4\boot\plexus-classworlds-2.5.2.jar;D:\downloads\apache-maven-3.5.4/conf/logging" jenkins.maven3.agent.Maven35Main D:\downloads\apache-maven-3.5.4 "D:\Program Files\war\WEB-INF\lib\remoting-3.21.1.jar" "D:\Program Files\plugins\maven-plugin\WEB-INF\lib\maven35-interceptor-1.12-alpha-1.jar" "D:\Program Files\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.12-alpha-1.jar" 59508
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f D:\Program Files\workspace\OData\pom.xml clean sonar:sonar
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< OData:OData >-----------------------------
[INFO] Building OData 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # OData ---
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO]
[INFO] ----------------------------< OData:OData >-----------------------------
[INFO] Building OData 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:3.4.1.1168:sonar (default-cli) # OData ---
[INFO] User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
[ERROR] SonarQube server [https://localhost:9000] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.056 s
[INFO] Finished at: 2018-08-27T00:09:08+08:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.1.1168:sonar (default-cli) on project OData: Unable to execute SonarQube: Fail to get bootstrap index from server: Unrecognized SSL message, plaintext connection? -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[JENKINS] Archiving D:\Program Files\workspace\OData\pom.xml to OData/OData/0.0.1-SNAPSHOT/OData-0.0.1-SNAPSHOT.pom
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
channel stopped
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
Skipping sonar analysis due to bad build status FAILURE
Finished: FAILURE
for your OData project, when your way to scan the code is via jenkins, you have to set in the settings of jenkins with the hostname, donĀ“t recommend put "localhost" or "127.0.0.1"
Try with $HOSTNAME:
Go to Settings in Jenkins
Move to "Sonarqube Servers"
SonarQube servers
-- Sonarqube instalations
--- ie: http://myserversonarqube:9000
Regards.
Error below is self explanatory. I have below questions
Is Sonarqube running on localhost with port 9000 as Secured (i.e https) ?
Which version of maven you are using? sometimes some of the Sonar plugin versions does not work with old maven versions.
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-
plugin:3.4.1.1168:sonar (default-cli) on project OData: Unable to execute SonarQube:
Fail to get bootstrap index from server: Unrecognized SSL message, plaintext connection? -> [Help 1]
[ERROR]

apache isis simple-app clean install fails

I am trying apache isis for the first time on my Windows machine (following tutorial: https://www.youtube.com/watch?v=OTNHR5EdAs8&list=PLbRpnAmQ6xsBGB_mRAUob8WRBsSL_IsBO), I executed the command:
mvn archetype:generate "-DarchetypeGroupId=org.apache.isis.archetype" "-D archetypeArtifactId=simpleapp-archetype" "-D archetypeVersion=1.16.2""-D groupId=com.mycompany""-D artifactId=myapp""-D version=1.0-SNAPSHOT" "-B"
Which created the myapp in a folder.
After that I Cd'd in myapp folder and executed mvn clean install which eventually failed with following error message:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SimpleApp Parent 1.0-SNAPSHOT ...................... SUCCESS [ 4.576 s]
[INFO] SimpleApp Simple Module ............................ FAILURE [ 22.055 s]
[INFO] SimpleApp Application .............................. SKIPPED
[INFO] SimpleApp Webapp 1.0-SNAPSHOT ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.747 s
[INFO] Finished at: 2018-03-21T08:19:19+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.datanucleus:datanucleus-maven-plugin:4.0.5:enhance (process-classes) on project myapp-module-simple: Error executing DataNucleus tool org.datanucleus.enhancer.DataNucleusEnhancer: InvocationTargetException: java/sql/Date: java.sql.Date -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :myapp-module-simple
PS E:\Apache isis\test_project\myapp>
Did I miss anything? Any dependencies?
As of this writing Apache Isis only runs on Java 7 and 8. We are aiming to be compatible with Java 11 when it ships in Sept/Oct (as that is the next LTS version of Java).

Sonar-qube 4.5 Timeout issue with big project

I'm using Jenkins to run sonar on all my projects. One of them have over 2 millions line of code and started to produce a timeout error when connecting to sonar (posted bellow is the jenkins build log):
[JENKINS] Archiving /app/users/jenkins/jobs/*****RunSonar/workspace/******/pom.xml to com.****.***.****/****Gui/9.1.0/****Gui-9.1.0.pom
[JENKINS] Archiving /app/users/jenkins/jobs/****_****Gui_RunSonar/workspace/****Gui/target/****Gui.war to com.****.***.****/****Gui/9.1.0/****Gui-9.1.0.war
channel stopped
[workspace] $ /app/tools/apache-maven-3.2.1/bin/mvn -f /app/users/jenkins/jobs/****_****Gui_RunSonar/workspace/****Gui/pom.xml -Dgitbranch=my_development -e -B sonar:sonar -Dsonar.preview.readTimeout=90000 -Dsonar.jdbc.driver=oracle.jdbc.driver.OracleDriver -Dsonar.jdbc.url=jdbc:oracle:thin:#mydb:1521:orcl ******** ******** -Dsonar.host.url=https://********/sonar/ -Dsonar.branch=$gitbranch ******** ********
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.****.***.****:****Gui:war:9.1.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. # line 408, column 23
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ****Gui 9.1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact aspectj:aspectjrt:jar:1.5.4 has been relocated to org.aspectj:aspectjrt:jar:1.5.4
[WARNING] The artifact aspectj:aspectjweaver:jar:1.5.4 has been relocated to org.aspectj:aspectjweaver:jar:1.5.4
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO]
[INFO] --- sonar-maven-plugin:2.5:sonar (default-cli) # ****Gui ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.033 s
[INFO] Finished at: 2015-01-14T10:31:44+00:00
[INFO] Final Memory: 12M/148M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project ****Gui: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar failed: SonarQube server can not be reached at https://********/sonar. Please check the parameter 'sonar.host.url'. connect timed out -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project *******: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar failed: SonarQube server can not be reached at https://********/sonar. Please check the parameter 'sonar.host.url'.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar failed: SonarQube server can not be reached at https://*********/sonar. Please check the parameter 'sonar.host.url'.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:144)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.IllegalStateException: SonarQube server can not be reached at https://********/sonar. Please check the parameter 'sonar.host.url'.
at org.codehaus.mojo.sonar.ServerMetadata.getVersion(ServerMetadata.java:70)
at org.codehaus.mojo.sonar.ServerMetadata.logSettings(ServerMetadata.java:84)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
... 20 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.codehaus.mojo.sonar.ServerMetadata.getConnection(ServerMetadata.java:119)
at org.codehaus.mojo.sonar.ServerMetadata.remoteContent(ServerMetadata.java:91)
at org.codehaus.mojo.sonar.ServerMetadata.getVersion(ServerMetadata.java:66)
... 23 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Sonar analysis completed: FAILURE
I'm pretty sure the sonar.host.url is correct because all of my other jobs in jenkins that run sonar are working. I already tried to use the "sonar.preview.readTimeout" property but with no success. Sonar produces no log.
Does anyone have any idea how to run sonar to avoid this problem?
Best regards
Have you tried with localhost instead and see if its able to connect to localhost at the very least? For localhost you need to have sonar server running locally of course.

Resources