2017-07-04 14 views
0

Webhooks経由でGitHubに接続されたサーバーでJenkinsを実行しています。残念なことに私のビルドは常時失敗しており、理由を理解できません。場合によってはJenkins(sudo service jenkins restart)を再起動すると問題が解決されることもあります。サーバは、Ubuntu 16.04のNginxをプロキシとして実行しています。この問題の原因は何ですか?どのように解決できますか?Jenkins "リモートリポジトリの複製元のエラー"と "メモリを割り当てることができません"

Started by GitHub push by gaboratorium 
Building in workspace /var/lib/jenkins/workspace/kudos.gaboratorium.com 
[WS-CLEANUP] Deleting project workspace... 
[WS-CLEANUP] Done 
Cloning the remote Git repository 
Cloning repository https://github.com/gaboratorium/kudos.git 
> git init /var/lib/jenkins/workspace/kudos.gaboratorium.com # timeout=10 
Fetching upstream changes from https://github.com/gaboratorium/kudos.git 
> git --version # timeout=10 
> git fetch --tags --progress https://github.com/gaboratorium/kudos.git 
+refs/heads/*:refs/remotes/origin/* 
ERROR: Error cloning remote repo 'origin' 
hudson.plugins.git.GitException: Command "git fetch --tags --progress 
https://github.com/gaboratorium/kudos.git 
+refs/heads/*:refs/remotes/origin/*" returned status code 128: 
stdout: 
stderr: error: cannot fork() for fetch-pack: Cannot allocate memory 

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903) 
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622) 
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71) 
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348) 
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:545) 
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1070) 
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1110) 
at hudson.scm.SCM.checkout(SCM.java:495) 
at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) 
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560) 
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485) 
at hudson.model.Run.execute(Run.java:1735) 
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
at hudson.model.ResourceController.execute(ResourceController.java:97) 
at hudson.model.Executor.run(Executor.java:405) 
ERROR: Error cloning remote repo 'origin' 
Finished: FAILURE 
+0

このエラーについて:stderr:エラー:フェッチパックのためにforkできません:メモリを割り当てられません。 – Edwin

答えて

2

ジェンキンスが割り当てするための十分なメモリがあるかどうかを確認するためにdf -hまたはdu -sh $JENKINS_HOMEを使用してください。

+0

あなたの答えをありがとう!私はそれらを走らせましたが、私は何を求めているのかよく分かりません。私のためにはそれはいいようです。 Screenshot:http://prntscr.com/frv2he –

+0

ディスクに十分なスペースがあるようです。私はRAMが足りないと思う。 'ps --sort -rss -eo rss、pid、command |ここで試してみてください。頭部。ここからhttps://askubuntu.com/questions/253466/why-am-i-frequently-getting-this-cannot-allocate-memory-errorから盗まれました。 – arifCee

+0

これも良いようです:http://prntscr.com/frvus7 –

関連する問題