I am trying to integrate kurento in my VPS server,with the help of
http://doc-kurento.readthedocs.org/en/stable/tutorials/java/tutorial-helloworld.html
git clone https://github.com/Kurento/kurento-tutorial-java.git
cd kurento-tutorial-java/kurento-hello-world
git checkout 6.4.0
mvn compile exec:java
My problem is ,the port 8443 is already assigned for parallel plesk.So i am not able to use this port for kurento.Is there any way to change the test port from 8443?
I have updated the port in src/main/resources/application.properties and tried with mvn compile -e exec:java -Dserver.port=8089,but still this is not working
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Kurento Java Tutorial - One2One Call Advanced 6.4.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-java-version) # kurento-one2one-call-recording ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) # kurento-one2one-call-recording ---
[INFO]
[INFO] --- buildnumber-maven-plugin:1.4:create-timestamp (get-build-timestamp) # kurento-one2one-call-recording ---
[INFO]
[INFO] --- buildnumber-maven-plugin:1.4:create (get-scm-revision) # kurento-one2one-call-recording ---
[INFO] Executing: /bin/sh -c cd '/var/www/vhosts/vps72185.vps.ovh.ca/mysite.co.uk/kurento-flabba/kurento-one2one-call-recording' && 'git' 'rev-parse' '--verify' 'HEAD'
[INFO] Working directory: /var/www/vhosts/vps72185.vps.ovh.ca/mysite.co.uk/kurento-flabba/kurento-one2one-call-recording
[INFO] Storing buildNumber: 9fba36e32343bb490384a4e1869e2b40de78fa2e at timestamp: 1460955195622
[WARNING] Cannot get the branch information from the git repository:
Detecting the current branch failed: fatal: ref HEAD is not a symbolic ref
[INFO] Executing: /bin/sh -c cd '/var/www/vhosts/vps123.vps.ovh.ca/mysite.co.uk/kurento-flabba/kurento-one2one-call-recording' && 'git' 'rev-parse' '--verify' 'HEAD'
[INFO] Working directory: /var/www/vhosts/vps123.vps.ovh.ca/mysite.co.uk/kurento-flabba/kurento-one2one-call-recording
[INFO] Storing buildScmBranch: UNKNOWN
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:exec (default) # kurento-one2one-call-recording ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # kurento-one2one-call-recording ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 325 resources
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # kurento-one2one-call-recording ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) # kurento-one2one-call-recording ---
.------------------------------------.
| |
| | |/ / _ _ _ ___ _ _| |_ ___ |
| | ' < || | '_/ -_) ' \ _/ _ \ |
| |_|\_\_,_|_| \___|_||_\__\___/ |
| |
'------------------------------------'
version 6.4.0
00:53:17.662 [OneCallRecApp.main()] INFO - o.k.t.one2onecallrec.One2OneCallRecApp -
Starting One2OneCallRecApp on vps123.vps.ovh.ca with PID 23974 (/var/www/vhosts/vps123.vps.ovh.ca/mysite.co.uk/kurento-flabba/kurento-one2one-call-recording/target/classes started by root in /var/www/vhosts/vps123.vps.ovh.ca/mysite.co.uk/kurento-flabba/kurento-one2one-call-recording)
00:53:17.665 [OneCallRecApp.main()] DEBUG - o.k.t.one2onecallrec.One2OneCallRecApp -
Running with Spring Boot v1.3.0.RELEASE, Spring v4.2.3.RELEASE
00:53:17.665 [OneCallRecApp.main()] INFO - o.k.t.one2onecallrec.One2OneCallRecApp -
No profiles are active
00:53:17.975 [ pool-1-thread-1] INFO - o.h.validator.internal.util.Version -
HV000001: Hibernate Validator 5.2.2.Final
ERRORS
The tutorials are spring-boot applications. You can change the port where the application is served from the command line. Just add the server.port flag when invoking the exec maven plugin
mvn compile exec:java -Dserver.port=<port>
There is an answer to this also here
The application must be started with a KMS running locally. Otherwise, you'll need the flag -Dkms.url=ws://<ip>:8888/kurento. Once it starts, you will be able to access your application in https://localhost:<port>. Please note that the app is served through a secure connection.
EDIT 1
This line from your logs
Caused by: org.kurento.commons.exception.KurentoException:
[KurentoClient] Exception connecting to WebSocket server
ws://127.0.0.1:8888/kurento
indicates that KMS is not running in that machine, or that it's running in a different port. Please do make sure the KMS process is indeed running when you launch the application.
Related
i installed jenkins on docker via command
docker run -p 8080:8080 -p 50000:50000 -d -v jenkins_home:/var/lib/docker/volumes/jenkins_home/_data jenkins/jenkins:lts
I specified the jenkins_home: /var/lib/docker/volumes/jenkins_home/_data
but i did not understand why so jenkins it displays : Home directory /var/jenkins_home
image here
image here
and what is weird is that this directory (/var/jenkins_home) is empty:
/var/jenkins_home# ll total 0
This causes me problems with the docker build step
logs:
Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/jenkins-docker-integration
The recommended git tool is: NONE
using credential git
> git rev-parse --resolve-git-dir /var/jenkins_home/workspace/jenkins-docker-integration/.git # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/************.git # timeout=10
Fetching upstream changes from https://github.com/*************.git
> git --version # timeout=10
> git --version # 'git version 2.20.1'
using GIT_ASKPASS to set credentials git
> git fetch --tags --force --progress -- https://github.com/**************.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision 814e24793ed004b24a703ea5ffd79060129e30a4 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 814e24793ed004b24a703ea5ffd79060129e30a4 # timeout=10
Commit message: "add jenkins file"
> git rev-list --no-walk 814e24793ed004b24a703ea5ffd79060129e30a4 # timeout=10
[jenkins-docker-integration] $ /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven381/bin/mvn clean install -DskipTests
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< fr.startedup:startedup >-----------------------
[INFO] Building startedup 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # startedup ---
[INFO] Deleting /var/jenkins_home/workspace/jenkins-docker-integration/target
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) # startedup ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # startedup ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 29 source files to /var/jenkins_home/workspace/jenkins-docker-integration/target/classes
[INFO] /var/jenkins_home/workspace/jenkins-docker-integration/src/main/java/fr/startedup/config/apidoc/SwaggerConfiguration.java: /var/jenkins_home/workspace/jenkins-docker-integration/src/main/java/fr/startedup/config/apidoc/SwaggerConfiguration.java uses unchecked or unsafe operations.
[INFO] /var/jenkins_home/workspace/jenkins-docker-integration/src/main/java/fr/startedup/config/apidoc/SwaggerConfiguration.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) # startedup ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # startedup ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /var/jenkins_home/workspace/jenkins-docker-integration/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # startedup ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- asciidoctor-maven-plugin:1.5.8:process-asciidoc (generate-docs) # startedup ---
[INFO] sourceDirectory /var/jenkins_home/workspace/jenkins-docker-integration/src/main/asciidoc does not exist. Skip processing
[INFO]
[INFO] --- maven-war-plugin:3.3.1:war (default-war) # startedup ---
[INFO] Packaging webapp
[INFO] Assembling webapp [startedup] in [/var/jenkins_home/workspace/jenkins-docker-integration/target/startedup-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Building war: /var/jenkins_home/workspace/jenkins-docker-integration/target/startedup-0.0.1-SNAPSHOT.war
[INFO]
[INFO] --- spring-boot-maven-plugin:2.4.5:repackage (repackage) # startedup ---
[INFO] Replacing main artifact with repackaged archive
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # startedup ---
[INFO] Installing /var/jenkins_home/workspace/jenkins-docker-integration/target/startedup-0.0.1-SNAPSHOT.war to /var/jenkins_home/.m2/repository/fr/startedup/startedup/0.0.1-SNAPSHOT/startedup-0.0.1-SNAPSHOT.war
[INFO] Installing /var/jenkins_home/workspace/jenkins-docker-integration/pom.xml to /var/jenkins_home/.m2/repository/fr/startedup/startedup/0.0.1-SNAPSHOT/startedup-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.954 s
[INFO] Finished at: 2021-05-24T11:48:27Z
[INFO] ------------------------------------------------------------------------
[jenkins-docker-integration] $ docker build -t startedup01\version88 --pull=true /var/jenkins_home/workspace/jenkins-docker-integration
ERROR: Cannot run program "docker" (in directory "/var/jenkins_home/workspace/jenkins-docker-integration"): error=2, No such file or directory
java.io.IOException: Cannot run program "docker" (in directory "/var/jenkins_home/workspace/jenkins-docker-integration"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:252)
at hudson.Proc$LocalProc.<init>(Proc.java:221)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:996)
at hudson.Launcher$ProcStarter.start(Launcher.java:508)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:487)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:431)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:373)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:311)
at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:291)
at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:262)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
at hudson.model.Build$BuildExecution.build(Build.java:197)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
at hudson.model.Run.execute(Run.java:1907)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 19 more
Build step 'Docker Build and Publish' marked build as failure
Finished: FAILURE
How to print which phase running while maven builds the project ? Let us say I run mvn install , then what I see is :
[INFO] --- jacoco-maven-plugin:0.8.3:prepare-agent (default-prepare-agent) # site-order-parent ---
[INFO] argLine set to -javaagent:/Users/xxx/.m2/repository/org/jacoco/org.jacoco.agent/0.8.3/org.jacoco.agent-0.8.3-runtime.jar=destfile=/Users/xxx/Cdk/site-order/target/jacoco.exec
[INFO]
[INFO] >>> maven-source-plugin:2.4:jar (attach-sources) > generate-sources # site-order-parent >>>
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.3:prepare-agent (default-prepare-agent) # site-order-parent ---
[INFO] argLine set to -javaagent:/Users/xxx/.m2/repository/org/jacoco/org.jacoco.agent/0.8.3/org.jacoco.agent-0.8.3-runtime.jar=destfile=/Users/xxx/Cdk/site-order/target/jacoco.exec
[INFO]
[INFO] <<< maven-source-plugin:2.4:jar (attach-sources) < generate-sources # site-order-parent <<<
[INFO]
[INFO]
[INFO] --- maven-source-plugin:2.4:jar (attach-sources) # site-order-parent ---
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.3:report (default-report) # site-order-parent ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # site-order-parent ---
We see the format <plugin_name> : version : goal (execution Id) # artifact name , but I need to see which phase of the lifecycle was active when this is happening ?
I got an complete answer in the comments. So, I am combining them and posting on their behalf.
As #khmarbaise commented , currently this is not possible in maven 3.
But there is something that can be helpful - buildplan-maven-plugin as commented by #spi.
How will this plugin be useful in our scenario ?
My app was working, it's working in staging, but after pushing that build to production, Heroku is running this command:
java -Dserver.port=12366 -javaagent:target/newrelic-agent.jar -jar target/newrelic-agent.jar
Why is Heroku trying to run newrelic-agent.jar instead of my app's jar?
My build log looks like this:
-----> Java app detected
-----> Installing JDK 1.8... done
-----> Installing Maven 3.3.9... done
-----> Executing: mvn -DskipTests clean dependency:list install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building projectxserver 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact org.hibernate:hibernate-validator:jar:6.0.9.Final has been relocated to org.hibernate.validator:hibernate-validator:jar:6.0.9.Final
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) # projectxserver ---
[INFO]
[INFO] --- maven-dependency-plugin:3.0.2:list (default-cli) # projectxserver ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) # projectxserver ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 11 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) # projectxserver ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 54 source files to /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/classes
[INFO] /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/src/main/java/tech/projectx/server/models/support/JacksonUtil.java: /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/src/main/java/tech/projectx/server/models/support/JacksonUtil.java uses unchecked or unsafe operations.
[INFO] /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/src/main/java/tech/projectx/server/models/support/JacksonUtil.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) # projectxserver ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) # projectxserver ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) # projectxserver ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) # projectxserver ---
[INFO] Building jar: /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/projectxserver-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.0.1.RELEASE:repackage (default) # projectxserver ---
[INFO]
[INFO] --- maven-dependency-plugin:3.0.2:copy (copy-new-relic-jar) # projectxserver ---
[INFO] Configured Artifact: com.newrelic.agent.java:newrelic-agent:?:jar
[INFO] Copying newrelic-agent-4.0.0.jar to /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/newrelic-agent.jar
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # projectxserver ---
[INFO] Installing /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/target/projectxserver-1.0.0-SNAPSHOT.jar to /app/tmp/cache/.m2/repository/tech/projectx/projectxserver/1.0.0-SNAPSHOT/projectxserver-1.0.0-SNAPSHOT.jar
[INFO] Installing /tmp/build_b35db9c210bc86f2ba9870e2cd5d9474/pom.xml to /app/tmp/cache/.m2/repository/tech/projectx/projectxserver/1.0.0-SNAPSHOT/projectxserver-1.0.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.850 s
[INFO] Finished at: 2018-05-08T19:10:25+00:00
[INFO] Final Memory: 61M/410M
[INFO] ------------------------------------------------------------------------
-----> Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
-----> Compressing...
Done: 190.1M
-----> Launching...
Released v46
https://projectxserver-production.herokuapp.com/ deployed to Heroku
After re-deploying a few times, it started using the correct jar. Is Heroku picking up a random one?
Heroku tries to automatically figure out the command to run your app when it detects that you are using Spring Boot. However, since the new-relic JAR is in your target/ directory, it thinks that it is your app.
You can fix this in two ways:
Put the new-relic jar in a different directory (Heroku recommends target/dependency or similar).
Create a Procfile and explicitly tell Heroku the command needed to run your app.
If you create a Procfile it will probably look like this:
web: java -Dserver.port=$PORT -javaagent:target/newrelic-agent.jar -jar target/projectxserver-1.0.0-SNAPSHOT.jar
Then run:
git add Procfile
git commit -m "Procfile"
git push heroku master
You can see the logic for the default command in the Java buildpack's bin/release script.
I'm trying to get Titan with DynamoDB local backend running. I've followed the steps from github closely but can't get Gremlin to connect:
...[truncated previous commands. Identical to those in github link]
gremlin> g = TitanFactory.open(conf)
Could not instantiate implementation: com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager
Display stack trace? [yN] y
java.lang.IllegalArgumentException: Could not instantiate implementation:
com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager at
com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55) at
com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:421)
...[truncated by gph]
Launching dynamodb via maven looks as follows:
[8][dynamodb-titan-storage-backend]>mvn test -Pstart-dynamodb-local
[INFO] Scanning for projects...[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Amazon DynamoDB Storage Backend for Titan 1.0.0
[INFO] ------------------------------------------------------------------------
[WARNING] Could not transfer metadata com.amazonaws:aws-java-sdk-dynamodb/maven-metadata.xml from/to maven-s3-release-repo (s3://dynamodblocal/release): Cannot access s3://dynamodblocal/release with type default using the available connector factories: BasicRepositoryConnectorFactory
[WARNING] Could not transfer metadata com.amazonaws:aws-java-sdk-dynamodb/maven-metadata.xml from/to maven-s3-snapshot-repo (s3://dynamodblocal/snapshot): Cannot access s3://dynamodblocal/snapshot with type default using the available connector factories: BasicRepositoryConnectorFactory
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) # dynamodb-titan054-storage-backend ---
[INFO]
[INFO] --- exec-maven-plugin:1.2:exec (default) # dynamodb-titan054-storage-backend ---
Initializing DynamoDB Local with the following configuration:
Port: 4567
InMemory: true
DbPath: null
SharedDb: false
shouldDelayTransientStatuses: false
CorsParams: *
I'm new to dynamodb and titan so I'm really at a loss to work this out.
I was able to get gremlin running by following the Amazon docs for Installing and Running the DynamoDB Storage Backend for Titan.
You are almost there but mvn test -Pstart-dynamodb-local and mvn test -Pstart-gremlin need to run simultaneously.
So, after you run mvn test -Pstart-dynamodb-local you need to leave that running, open a separate terminal/ssh session, cd to the location of your git clone of dynamodb-titan-storage-backend and then run mvn test -Pstart-gremlin while the first command is still running:
/path/to/dynamodb-titan-storage-backend/# mvn test -Pstart-gremlin
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Amazon DynamoDB Storage Backend for Titan 1.0.0
[INFO] ------------------------------------------------------------------------
[WARNING] Could not transfer metadata com.amazonaws:aws-java-sdk-dynamodb/maven-metadata.xml from/to maven-s3-release-repo (s3://dynamodblocal/release): Cannot access s3://dynamodblocal/release with type default using the available connector factories: BasicRepositoryConnectorFactory
[WARNING] Could not transfer metadata com.amazonaws:aws-java-sdk-dynamodb/maven-metadata.xml from/to maven-s3-snapshot-repo (s3://dynamodblocal/snapshot): Cannot access s3://dynamodblocal/snapshot with type default using the available connector factories: BasicRepositoryConnectorFactory
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) # dynamodb-titan054-storage-backend ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # dynamodb-titan054-storage-backend ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # dynamodb-titan054-storage-backend ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) # dynamodb-titan054-storage-backend ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-dependency-plugin:2.10:copy-dependencies (copy-dependencies) # dynamodb-titan054-storage-backend ---
[INFO] com.google.protobuf:protobuf-java:jar:2.5.0 already exists in destination.
[INFO] com.sun.jersey:jersey-json:jar:1.9 already exists in destination.
[INFO] stax:stax-api:jar:1.0.1 already exists in destination.
... [skipping ahead]
[INFO] org.openrdf.sesame:sesame-queryalgebra-evaluation:jar:2.7.10 already exists in destination.
[INFO] com.sun.jersey:jersey-server:jar:1.9 already exists in destination.
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) # dynamodb-titan054-storage-backend ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # dynamodb-titan054-storage-backend ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- exec-maven-plugin:1.2:exec (default) # dynamodb-titan054-storage-backend ---
\,,,/
(o o)
-----oOOo-(_)-oOOo-----
0 [main] WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
gremlin>
I'm trying to build a Spark 1.5.0 snapshot, on Windows. Firstly I ran make-distribution.sh using Cygwin (which pulled Maven etc). Now I'm running
mvn -DskipTests clean package
and getting this error, suggesting it can't find javac.
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-launcher_2.10 ---
[INFO] Using zinc server for incremental compilation
←[0m[←[0minfo←[0m] ←[0mCompiling 8 Java sources to C:\spark-1.5.0-SNAPSHOT\launcher\target\scala-2.10\classes...←[0m
←[0m[←[31merror←[0m] ←[0mCannot run program "javac": CreateProcess error=2, The system cannot find the file specified←[0m
This questioner How to build Spark 1.2 with Maven (gives java.io.IOException: Cannot run program "javac")? had a similar problem - it was fixed by fixing the environment variables. I think mine are ok:
> where javac
C:\Program Files\Java\jdk1.8.0_45\bin\javac.exe
> javac -help
Usage: javac <options> <source files>
where possible options include:
...
> where mvn
C:\spark-1.5.0-SNAPSHOT\build\apache-maven-3.3.3\bin\mvn
C:\spark-1.5.0-SNAPSHOT\build\apache-maven-3.3.3\bin\mvn.cmd
> echo %JAVA_HOME%
C:\PROGRA~1\Java\jdk1.8.0_45
> mvn -v
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T21:57:37+10:00)
Maven home: C:\spark-1.5.0-SNAPSHOT\build\apache-maven-3.3.3\bin\..
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: C:\PROGRA~1\Java\jdk1.8.0_45\jre
Default locale: en_AU, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
What should I try next?
C:\spark-1.5.0-SNAPSHOT>mvn -DskipTests clean package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Spark Project Parent POM
[INFO] Spark Project Launcher
..
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spark Project Parent POM 1.5.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) # spark-parent_2.10 ---
[INFO] Deleting C:\spark-1.5.0-SNAPSHOT\target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-versions) # spark-parent_2.10 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:add-source (eclipse-add-source) # spark-parent_2.10 ---
[INFO] Add Source directory: C:\spark-1.5.0-SNAPSHOT\src\main\scala
[INFO] Add Test Source directory: C:\spark-1.5.0-SNAPSHOT\src\test\scala
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) # spark-parent_2.10 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-parent_2.10 ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (create-tmp-dir) # spark-parent_2.10 ---
[INFO] Executing tasks
main:
[mkdir] Created dir: C:\spark-1.5.0-SNAPSHOT\target\tmp
[INFO] Executed tasks
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:testCompile (scala-test-compile-first) # spark-parent_2.10 ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-dependency-plugin:2.10:build-classpath (default) # spark-parent_2.10 ---
[INFO]
[INFO] --- scalatest-maven-plugin:1.0:test (test) # spark-parent_2.10 ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.6:test-jar (prepare-test-jar) # spark-parent_2.10 ---
[INFO] Building jar: C:\spark-1.5.0-SNAPSHOT\target\spark-parent_2.10-1.5.0-SNAPSHOT-tests.jar
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) # spark-parent_2.10 ---
[INFO]
[INFO] --- maven-shade-plugin:2.4.1:shade (default) # spark-parent_2.10 ---
[INFO] Including org.spark-project.spark:unused:jar:1.0.0 in the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO]
[INFO] --- maven-source-plugin:2.4:jar-no-fork (create-source-jar) # spark-parent_2.10 ---
[INFO]
[INFO] --- maven-source-plugin:2.4:test-jar-no-fork (create-source-jar) # spark-parent_2.10 ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spark Project Launcher 1.5.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) # spark-launcher_2.10 ---
[INFO] Deleting C:\spark-1.5.0-SNAPSHOT\launcher\target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-versions) # spark-launcher_2.10 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:add-source (eclipse-add-source) # spark-launcher_2.10 ---
[INFO] Add Source directory: C:\spark-1.5.0-SNAPSHOT\launcher\src\main\scala
[INFO] Add Test Source directory: C:\spark-1.5.0-SNAPSHOT\launcher\src\test\scala
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) # spark-launcher_2.10 ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # spark-launcher_2.10 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\spark-1.5.0-SNAPSHOT\launcher\src\main\resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- scala-maven-plugin:3.2.2:compile (scala-compile-first) # spark-launcher_2.10 ---
[INFO] Using zinc server for incremental compilation
←[0m[←[0minfo←[0m] ←[0mCompiling 8 Java sources to C:\spark-1.5.0-SNAPSHOT\launcher\target\scala-2.10\classes...←[0m
←[0m[←[31merror←[0m] ←[0mCannot run program "javac": CreateProcess error=2, The system cannot find the file specified←[0m
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Parent POM ........................... SUCCESS [ 3.158 s]
[INFO] Spark Project Launcher ............................. FAILURE [ 2.930 s]
[INFO] Spark Project Networking ........................... SKIPPED
[INFO] Spark Project Shuffle Streaming Service ............ SKIPPED
..
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (scala-compile-first) on project spark-launcher_2.10: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile failed. CompileFailed -> [Help 1]
Shutting down zinc first should solve your problem. See the documentation here
./build/zinc-<version>/bin/zinc -shutdown
Another way is to change the pom.xml of spark and comment the line
<!--<useZincServer>true</useZincServer>-->