Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In Jenkins project I add command for executiong rm /var/www/ru.liveyurist.ru/tmp/*

But when I build project I get error:

Started by user anonymous
Building in workspace /var/www/ru.myproject.ru
Updating https://subversion.assembla.com/svn/myproject/trunk
At revision 1168
no change for https://subversion.assembla.com/svn/liveexpert/trunk since the previous build
[ru.myproject.ru] $ /bin/sh -xe /tmp/hudson7189633355149866134.sh
FATAL: command execution failed
java.io.IOException: Cannot run program "/bin/sh" (in directory "/var/www/ru.myproject.ru"): java.io.IOException: error=12, Cannot allocate memory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
    at hudson.Proc$LocalProc.<init>(Proc.java:244)
    at hudson.Proc$LocalProc.<init>(Proc.java:216)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:709)
    at hudson.Launcher$ProcStarter.start(Launcher.java:338)
    at hudson.Launcher$ProcStarter.join(Launcher.java:345)
    at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
    at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
    at hudson.model.Build$RunnerImpl.build(Build.java:178)
    at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:473)
    at hudson.model.Run.run(Run.java:1410)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)
Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
    at java.lang.ProcessImpl.start(ProcessImpl.java:81)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
    ... 16 more
Build step 'Execute shell' marked build as failure
Finished: FAILURE

I started Jenkins from root user. Please advise what can be reason of this error?

share|improve this question
    
Looks like either your JVM or the entire system is out of memory. –  Lars Kotthoff Mar 28 '12 at 16:47
    
I see in top Mem: 1048800k total, 782108k used. I think it has another reason –  Dmitro Mar 28 '12 at 20:52
    
Have a look at this question. –  Lars Kotthoff Mar 28 '12 at 20:59
    
I can't execute echo 0 > /proc/sys/vm/overcommit_memory because I have vds hosting. –  Dmitro Mar 29 '12 at 11:06
    
You could try running Jenkins in a different way, i.e. with another servlet container. –  Lars Kotthoff Mar 29 '12 at 16:35
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.