Question

I'm trying to run a hudson job with the sbt plugin. I get this error:

Started by user anonymous
Checkout:workspace / /home/hudson/jobs/MyProject/workspace - hudson.remoting.LocalChannel@2d7bc967
Using strategy: Default
Last Built Revision: Revision 584f76d5dbd46e1fa0e32eb7e575aa53e724b1e5 (origin/master)
Checkout:workspace / /home/hudson/jobs/MyProject/workspace - hudson.remoting.LocalChannel@2d7bc967
Fetching changes from the remote Git repository
Fetching upstream changes from ssh://git@myhost.org/MyProject.git
Commencing build of Revision 584f76d5dbd46e1fa0e32eb7e575aa53e724b1e5 (origin/master)
Checking out Revision 584f76d5dbd46e1fa0e32eb7e575aa53e724b1e5 (origin/master)
[workspace] $ /usr/lib/jvm/java-7-oracle/bin/java -Xmx512M -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=128m -Dsbt.log.noformat=true -jar /opt/hudson/plugin/sbt/bin/sbt-launch.jar clean compile test
java.io.IOException: No such file or directory
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:1006)
    at xsbt.boot.Locks$.apply0(Locks.scala:35)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at xsbt.boot.Launch.locked(Launch.scala:240)
    at xsbt.boot.Launch.app(Launch.scala:149)
    at xsbt.boot.Launch.app(Launch.scala:147)
    at xsbt.boot.Launch$.run(Launch.scala:102)
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
    at xsbt.boot.Launch$.launch(Launch.scala:117)
    at xsbt.boot.Launch$.apply(Launch.scala:19)
    at xsbt.boot.Boot$.runImpl(Boot.scala:44)
    at xsbt.boot.Boot$.main(Boot.scala:20)
    at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.io.IOException: No such file or directory
Finished: FAILURE

I followed this.

I can execute the same command java -Xmx512M -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=128m -Dsbt.log.noformat=true -jar /opt/hudson/plugin/sbt/bin/sbt-launch.jar clean compile test locally in my project directory and it works fine. Any idea?

Était-ce utile?

La solution

Found the problem: the home directory of executing process (tomcat) was under the root as the owner. So, just a permission problem (as always)..

Autres conseils

For me I found that under Ubuntu 14.x and 15.10 was that the jenkins user account's home directory had not been created when Jenkins CI was installed using the deb package sources. I could see in the "/etc/passwd" file that the jenkins account did have a home path set, but it did not actually exist.

All I ended up doing was creating the missing folder and assigning the user and group ownership to "jenkins".

sudo mkdir /home/jenkins
sudo chown jenkins:jenkins /home/jenkins

Re-ran the jobs and all is good again. I can now see that ".ivy" and ".sbt" folders have now been created.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top