Gradle and Sonar - connection refused error - build

I have configured gradle and sonar plugin:
apply plugin: 'sonar'
// sonar settings - gradle-1.0-milestone-3 2 - check new sonar plugin for milestone 5 release
sonar {
server {
Url = "http://myserver:9000"
}
database {
url="jdbc:mysql://myserver:3306/sonar?useUnicode=true&characterEncoding=utf8"
driverClassName="com.mysql.jdbc.Driver"
username="usrname"
password="pwd"
}
}
I can connect to sonar using web browser.
I can connect to mySQL database using simple java test program.
I have copied mysqlconnector.jar file into GRADLE_HOME/lib
when I run
gradle -debug sonarAnalyze
I am getting:
09:42:25.074 [ERROR] [org.gradle.BuildExceptionReporter] ... 53 more
09:42:25.074 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.net.ConnectException: **Connection refused: connect**
09:42:25.074 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrapper.Bootstrapper.remoteContent(Bootstrapper.java:123)
09:42:25.075 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrapper.Bootstrapper.downloadBatchFiles(Bootstrapper.java:156)
09:42:25.075 [ERROR] [org.gradle.BuildExceptionReporter] ... 65 more
09:42:25.075 [ERROR] [org.gradle.BuildExceptionReporter]
09:42:25.075 [LIFECYCLE] [org.gradle.BuildResultLogger]
09:42:25.076 [LIFECYCLE] [org.gradle.BuildResultLogger] **BUILD FAILED**
09:42:25.076 [LIFECYCLE] [org.gradle.BuildResultLogger]
09:42:25.076 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 5.59 secs
What could be the problem?
Thanks

server.url in your code snippet is misspelt; it needs to be a lower case u. Other than that, it could be a wrong URL or wrong network configuration. Or maybe you are using a version of the Sonar server that isn't compatible with the Sonar client library that ships with Gradle 1.0-milestone-3.
By the way, Gradle 1.0-milestone-3 is really old (18 months or so), and a lot has changed since then. I recommend to try with 1.0.

Related

Vaadin with using Jetty Server -> ERROR: Jetty server existing

I recently started studying Vaadin. At the beginning I am using Vaadin 8 and have started a small Vaadin project in eclipse for practice purposes. I always started and opened this project via Jetty on my localhost:8080. That worked great for the first few days, but since yesterday
my localhost:8080 wants username and password at once and the application is no longer opening there.
The only difference is that the day before yesterday I installed an Oracle database (OracleXE 11 g) - could that have something to do with it?
Here is a snipppet if the error-message that I am getting:
Sep. 12, 2021 10:51:20 VORM. org.atmosphere.cpr.AtmosphereFramework addInterceptorToAllWrappers
INFORMATION: Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority BEFORE_DEFAULT
[INFO] Started o.e.j.m.p.JettyWebAppContext#60b616c8{/,file:///C:/Repositories/ProgrammingCourses/Vaadin-and-Maven_Crash-Course/VaadinFirstSteps/src/main/webapp/,AVAILABLE}{file:///C:/Repositories/ProgrammingCourses/Vaadin-and-Maven_Crash-Course/VaadinFirstSteps/src/main/webapp/}
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.520 s
[INFO] Finished at: 2021-09-12T10:51:20+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.3.9.v20160517:run (default-cli) on project VaadinFirstSteps: Failure: Address already in use: bind -> [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
Anyone know how to get Vaadin up and running again? I am grateful fur any help,
Zrebna :)
"Failure: Address already in use: bind" means that you are trying to start web application server on localhost port 8080 while there is already web application server running and owning that port. Hence new one cannot be started.
You need to check you processes already running and kill the old one.

Build zeppelin-0.7.0 master branch with spark 2.0 failed with 'yarn install --no-lockfile' failed

i tried to build the zeppelin-0.7.0 master branch downloaded from github, but failed .
the build command:
mvn package -Pyarn -Pbuild-distr -Pspark-2.0 -Dspark.version=2.0.1 -Phadoop-2.6 -Dhadoop.version=2.6.0 -Pscala-2.11 -Ppyspark -DskipTests -X
the output stacktrace is:
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.397 s
[INFO] Finished at: 2017-01-14T11:39:00+08:00
[INFO] Final Memory: 19M/228M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (yarn install) on project zeppelin-web: Failed to run task: 'yarn install --no-lockfile' failed. (error code 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (yarn install) on project zeppelin-web: Failed to run task
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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.MojoFailureException: Failed to run task
at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:95)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'yarn install --no-lockfile' failed. (error code 1)
at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute(YarnTaskExecutor.java:61)
at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute(YarnMojo.java:65)
at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:89)
... 22 more
[ERROR]
[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/MojoFailureException
I found a lot but no info about this error. Thanks in advance for helping me figure out the reason.
Try to downgrade your node version to node 6 and compile again.
After compilation, upgrade your node version.
I hit the same issue-- I ended up installing all the various npm bits that kept failing by running:
$ sudo npm install -g bower grunt grunt-cli npm-run-all rimraf webpack
Also the build attempt didn't like that I ran it initially as sudo/root (on a test machine), so I recursively changed ownership of /opt/zeppelin (where I extracted the zeppelin tarball) to a regular user 'zeppelin', then ran the maven build command as user zeppelin at /opt/zeppelin. This was able to get me unblocked, hopefully this may help you too.

hue installation error on AWS EC2

Hello I am trying to install Hue on AWS EC2 instance.
Following below link.
https://github.com/cloudera/hue
While doing step make apps I am getting below error.
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.6.0-30 is not in the allowed range [1.7.0,1.7.1000].
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.717s
[INFO] Finished at: Sun Mar 09 13:18:59 EDT 2014
[INFO] Final Memory: 5M/25M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce (default) on project hue-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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
I have java version
java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (rhel-2.3.10.4.el6_4-x86_64)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
Additional information can be provided. Thanks for your help.
You can also remove the JDK 7 check by editing:
vim maven/pom.xml
And replacing the '7' by '6':
<javaVersion>1.7</javaVersion>
<sourceJavaVersion>1.7</sourceJavaVersion>
<targetJavaVersion>1.7</targetJavaVersion>
(obviously you should it might be better to make sure Java 7 is the default if you plan to use 7)
It looks like you have another Java version in your system too. Based on what your installation says:
Detected JDK Version: 1.6.0-30
Make sure your JAVA_HOME variable points to the home of your Java 1.7 installation.

Running WSF-CPP samples

I'm trying to run the Echo sample that comes with WSO2 WSF-CPP, and I get the following errors:
[Tue Dec 18 14:26:51 2012] [error] dep_engine.c(1008) Axis2
Configuration file name not found [Tue Dec 18 14:26:51 2012] [error]
dep_engine.c(872) axis2.xml is not available in client repo . [Tue
Dec 18 14:26:51 2012] [error] conf_init.c(201) Loading deployment
engine failed for client repository . [Tue Dec 18 14:26:51 2012]
[critical] ServiceClient.cpp(223) Cannot create service client
I follow the installation steps in 1 and I don't have any problem, but I'm thinking that there is something missed.
Thanks in advance,
U.
1[http://wso2.org/library/tutorials/dummys-guide-writing-web-service-clients-wso2-wsf-c#Running_Your_First_Web_Service_Client_with_WSO2_WSF_CPP]
Set the environemnt variable WSFCPP_HOME to your WSO2 CPP installation path.
Seems your path is not set correctly thats why you are seeing this error.
(I can run the samples in linux)

Gradle - Execution failed for task 'sonarAnalyze' - java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String

I have this error when running sonar with my gradle build script.
gradle sonarAnalyze
15:41:02.931 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:41:02.931 [ERROR] [org.gradle.BuildExceptionReporter]
15:41:02.931 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:41:02.931 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':sonarAnalyze'.
15:41:02.934 [ERROR] [org.gradle.BuildExceptionReporter] > java.util.ArrayList cannot be cast to java.lang.String
My sonar
sonar {
server {
url = "http://server.com:9000"
}
database {
url="jdbc:mysql://server:3306/sonar?useUnicode=true&characterEncoding=utf8"
driverClassName="com.mysql.jdbc.Driver"
username="sonar"
password="sonar"
}
project {
coberturaReportPath=file("$buildDir/reports/cobertura/coverage.xml")
language = "java"
}
}
What could be the problem?
What version of Sonar are you running? I was having this problem when running Sonar 4.1.1 because I was using the same Gradle Sonar plugin that you are. I switched to the Gradle Sonar Runner plugin, and the problem was resolved.