Cannot run program "git" ... error=12, Cannot allocate memory

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot run program "git" ... error=12, Cannot allocate memory

Philipp Beau
Hi,

I want to automatically build from my own git repository, but when I start the build it keeps throwing this error message: 

Started by user philipp
Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
Using strategy: Default
Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
Workspace has a .git repository, but it appears to be corrupt.
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Error performing command: git --version
Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memory
ERROR: Cause: Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memory
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:977)
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:908)
	at hudson.FilePath.act(FilePath.java:758)
	at hudson.FilePath.act(FilePath.java:740)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:908)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1182)
	at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537)
	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425)
	at hudson.model.Run.run(Run.java:1376)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:146)


As I have just started using jenkins I have absolutely no clue why this error is shown, also google is very short with answers.

I would be very happy if you have any suggestions, because this problems keeps me upset since a couple of hours!

Best regards :-)

Philipp

Reply | Threaded
Open this post in threaded view
|

Re: Cannot run program "git" ... error=12, Cannot allocate memory

Richard Bywater
(Assuming you have Git installed on that machine :) ), is it in the path of the user which is being used to run Jenkins?

Richard.

On Tue, Jun 28, 2011 at 3:45 AM, Philipp Beau <[hidden email]> wrote:
Hi,

I want to automatically build from my own git repository, but when I start the build it keeps throwing this error message: 

Started by user philipp
Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
Using strategy: Default
Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
Workspace has a .git repository, but it appears to be corrupt.
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Error performing command: git --version
Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memory
ERROR: Cause: Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memory
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:977)
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:908)
	at hudson.FilePath.act(FilePath.java:758)
	at hudson.FilePath.act(FilePath.java:740)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:908)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1182)
	at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537)
	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425)
	at hudson.model.Run.run(Run.java:1376)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:146)


As I have just started using jenkins I have absolutely no clue why this error is shown, also google is very short with answers.

I would be very happy if you have any suggestions, because this problems keeps me upset since a couple of hours!

Best regards :-)

Philipp


Reply | Threaded
Open this post in threaded view
|

Re: Cannot run program "git" ... error=12, Cannot allocate memory

Philipp Beau
Hey,

yes git is installed :-) and when I login with user jenkins

jenkins@nlink:/home/philipp$ git --version
git version 1.5.6.5

On Jun 27, 10:19 pm, Richard Bywater <[hidden email]> wrote:

> (Assuming you have Git installed on that machine :) ), is it in the path of
> the user which is being used to run Jenkins?
>
> Richard.
>
> On Tue, Jun 28, 2011 at 3:45 AM, Philipp Beau <[hidden email]>wrote:
>
> > **
>
> > Hi,
>
> > I want to automatically build from my own git repository, but when I start the build it keeps throwing this error message:
>
> > Started by user philipp
> > Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
> > Using strategy: Default
> > Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
> > Workspace has a .git repository, but it appears to be corrupt.
> > Cloning the remote Git repository
> > Cloning repository origin
> > ERROR: Error cloning remote repo 'origin' : Error performing command: git --version
> > Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memoryERROR <http://stacktrace.jenkins-ci.org/search?query=ERROR>: Cause: Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memory
> > Trying next repository
> > ERROR: Could not clone repositoryFATAL <http://stacktrace.jenkins-ci.org/search?query=FATAL>: Could not clonehudson.plugins.git.GitException <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitE...>: Could not clone
> >    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:977) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> >    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:908) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> >    at hudson.FilePath.act(FilePath.java:758) <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&en...>
> >    at hudson.FilePath.act(FilePath.java:740) <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&en...>
> >    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:908) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> >    at hudson.model.AbstractProject.checkout(AbstractProject.java:1182) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractP...>
> >    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractB...>
> >    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractB...>
> >    at hudson.model.Run.run(Run.java:1376) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.run&e...>
> >    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyle...>
> >    at hudson.model.ResourceController.execute(ResourceController.java:88) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceC...>
> >    at hudson.model.Executor.run(Executor.java:146) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor....>
>
> > As I have just started using jenkins I have absolutely no clue why this error is shown, also google is very short with answers.
>
> > I would be very happy if you have any suggestions, because this problems keeps me upset since a couple of hours!
>
> > Best regards :-)
>
> > Philipp
Reply | Threaded
Open this post in threaded view
|

Re: Cannot run program "git" ... error=12, Cannot allocate memory

Philipp Beau
In reply to this post by Richard Bywater
Hey,

yes git is installed :-) and when I login with user jenkins

jenkins@nlink:/home/philipp$ git --version
git version 1.5.6.5

On Jun 27, 10:19 pm, Richard Bywater <[hidden email]> wrote:

> (Assuming you have Git installed on that machine :) ), is it in the path of
> the user which is being used to run Jenkins?
>
> Richard.
>
> On Tue, Jun 28, 2011 at 3:45 AM, Philipp Beau <[hidden email]>wrote:
>
> > **
>
> > Hi,
>
> > I want to automatically build from my own git repository, but when I start the build it keeps throwing this error message:
>
> > Started by user philipp
> > Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
> > Using strategy: Default
> > Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
> > Workspace has a .git repository, but it appears to be corrupt.
> > Cloning the remote Git repository
> > Cloning repository origin
> > ERROR: Error cloning remote repo 'origin' : Error performing command: git --version
> > Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memoryERROR <http://stacktrace.jenkins-ci.org/search?query=ERROR>: Cause: Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memory
> > Trying next repository
> > ERROR: Could not clone repositoryFATAL <http://stacktrace.jenkins-ci.org/search?query=FATAL>: Could not clonehudson.plugins.git.GitException <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitE...>: Could not clone
> >    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:977) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> >    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:908) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> >    at hudson.FilePath.act(FilePath.java:758) <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&en...>
> >    at hudson.FilePath.act(FilePath.java:740) <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&en...>
> >    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:908) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> >    at hudson.model.AbstractProject.checkout(AbstractProject.java:1182) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractP...>
> >    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractB...>
> >    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractB...>
> >    at hudson.model.Run.run(Run.java:1376) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.run&e...>
> >    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyle...>
> >    at hudson.model.ResourceController.execute(ResourceController.java:88) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceC...>
> >    at hudson.model.Executor.run(Executor.java:146) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor....>
>
> > As I have just started using jenkins I have absolutely no clue why this error is shown, also google is very short with answers.
>
> > I would be very happy if you have any suggestions, because this problems keeps me upset since a couple of hours!
>
> > Best regards :-)
>
> > Philipp
Reply | Threaded
Open this post in threaded view
|

Re: Cannot run program "git" ... error=12, Cannot allocate memory

Michael Pisula
Hey Philipp,

"java.io.IOException: error=12, Cannot allocate memory" is a problem
with too little swap space IIRC. You could try to google that, there
should be some information regarding that. Basically when Jenkins
calls git, the Jenkins process is forked, which for a short amount of
time takes up twice the memory you set up for your Jenkins, if your
machine does not have sufficient memory (physical and swap) you will
get the error.
As to the problem with the corrupt repository I have no clue and no
experience with git.

Best regards,
Michael

On 28 Jun., 01:40, Philipp Beau <[hidden email]> wrote:

> Hey,
>
> yes git is installed :-) and when I login with user jenkins
>
> jenkins@nlink:/home/philipp$ git --version
> git version 1.5.6.5
>
> On Jun 27, 10:19 pm, Richard Bywater <[hidden email]> wrote:
>
>
>
> > (Assuming you have Git installed on that machine :) ), is it in the path of
> > the user which is being used to run Jenkins?
>
> > Richard.
>
> > On Tue, Jun 28, 2011 at 3:45 AM, Philipp Beau <[hidden email]>wrote:
>
> > > **
>
> > > Hi,
>
> > > I want to automatically build from my own git repository, but when I start the build it keeps throwing this error message:
>
> > > Started by user philipp
> > > Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
> > > Using strategy: Default
> > > Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
> > > Workspace has a .git repository, but it appears to be corrupt.
> > > Cloning the remote Git repository
> > > Cloning repository origin
> > > ERROR: Error cloning remote repo 'origin' : Error performing command: git --version
> > > Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memoryERROR <http://stacktrace.jenkins-ci.org/search?query=ERROR>: Cause: Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memory
> > > Trying next repository
> > > ERROR: Could not clone repositoryFATAL <http://stacktrace.jenkins-ci.org/search?query=FATAL>: Could not clonehudson.plugins.git.GitException <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitE...>: Could not clone
> > >    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:977) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> > >    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:908) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> > >    at hudson.FilePath.act(FilePath.java:758) <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&en...>
> > >    at hudson.FilePath.act(FilePath.java:740) <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&en...>
> > >    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:908) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> > >    at hudson.model.AbstractProject.checkout(AbstractProject.java:1182) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractP...>
> > >    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractB...>
> > >    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractB...>
> > >    at hudson.model.Run.run(Run.java:1376) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.run&e...>
> > >    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyle...>
> > >    at hudson.model.ResourceController.execute(ResourceController.java:88) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceC...>
> > >    at hudson.model.Executor.run(Executor.java:146) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor....>
>
> > > As I have just started using jenkins I have absolutely no clue why this error is shown, also google is very short with answers.
>
> > > I would be very happy if you have any suggestions, because this problems keeps me upset since a couple of hours!
>
> > > Best regards :-)
>
> > > Philipp
Reply | Threaded
Open this post in threaded view
|

Re: Cannot run program "git" ... error=12, Cannot allocate memory

Philipp Beau
Yes, this was the Problem.
I switched to a server with more memory and now it works :-)

On 28 Jun., 09:56, Michael Pisula <[hidden email]>
wrote:

> Hey Philipp,
>
> "java.io.IOException: error=12, Cannot allocate memory" is a problem
> with too little swap space IIRC. You could try to google that, there
> should be some information regarding that. Basically when Jenkins
> calls git, the Jenkins process is forked, which for a short amount of
> time takes up twice the memory you set up for your Jenkins, if your
> machine does not have sufficient memory (physical and swap) you will
> get the error.
> As to the problem with the corrupt repository I have no clue and no
> experience with git.
>
> Best regards,
> Michael
>
> On 28 Jun., 01:40, Philipp Beau <[hidden email]> wrote:
>
> > Hey,
>
> > yes git is installed :-) and when I login with user jenkins
>
> > jenkins@nlink:/home/philipp$ git --version
> > git version 1.5.6.5
>
> > On Jun 27, 10:19 pm, Richard Bywater <[hidden email]> wrote:
>
> > > (Assuming you have Git installed on that machine :) ), is it in the path of
> > > the user which is being used to run Jenkins?
>
> > > Richard.
>
> > > On Tue, Jun 28, 2011 at 3:45 AM, Philipp Beau <[hidden email]>wrote:
>
> > > > **
>
> > > > Hi,
>
> > > > I want to automatically build from my own git repository, but when I start the build it keeps throwing this error message:
>
> > > > Started by user philipp
> > > > Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
> > > > Using strategy: Default
> > > > Checkout:workspace / /var/lib/jenkins/jobs/Poker/workspace - hudson.remoting.LocalChannel@68e26d2e
> > > > Workspace has a .git repository, but it appears to be corrupt.
> > > > Cloning the remote Git repository
> > > > Cloning repository origin
> > > > ERROR: Error cloning remote repo 'origin' : Error performing command: git --version
> > > > Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memoryERROR <http://stacktrace.jenkins-ci.org/search?query=ERROR>: Cause: Cannot run program "git" (in directory "/var/lib/jenkins/jobs/Poker/workspace"): java.io.IOException: error=12, Cannot allocate memory
> > > > Trying next repository
> > > > ERROR: Could not clone repositoryFATAL <http://stacktrace.jenkins-ci.org/search?query=FATAL>: Could not clonehudson.plugins.git.GitException <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitE...>: Could not clone
> > > >    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:977) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> > > >    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:908) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> > > >    at hudson.FilePath.act(FilePath.java:758) <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&en...>
> > > >    at hudson.FilePath.act(FilePath.java:740) <http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&en...>
> > > >    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:908) <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.Git...>
> > > >    at hudson.model.AbstractProject.checkout(AbstractProject.java:1182) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractP...>
> > > >    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractB...>
> > > >    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractB...>
> > > >    at hudson.model.Run.run(Run.java:1376) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.run&e...>
> > > >    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyle...>
> > > >    at hudson.model.ResourceController.execute(ResourceController.java:88) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceC...>
> > > >    at hudson.model.Executor.run(Executor.java:146) <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor....>
>
> > > > As I have just started using jenkins I have absolutely no clue why this error is shown, also google is very short with answers.
>
> > > > I would be very happy if you have any suggestions, because this problems keeps me upset since a couple of hours!
>
> > > > Best regards :-)
>
> > > > Philipp
>
>