Open ampledata opened 10 years ago
Please describe more about your configuration. I will try to reproduce this if it is possible.
$HOME
on the master/slavei. JNLP ii. $HOME on slave should be '/home/jenkins-node'.
I've been using rbenv plugin with ssh slaves, but there's no problem on my environment. I will try the JNLP slaves to reproduce the issue.
Thanks, I appreciate it. I'm not sure if you saw my other note but this bug applies to the pyenv-plugin as well (probably same code path).
On Tue, Apr 29, 2014 at 7:26 PM, Yamashita, Yuu notifications@github.comwrote:
I've been using rbenv plugin with ssh slaves, but there's no problem on my environment. I will try the JNLP slaves to reproduce the issue.
— Reply to this email directly or view it on GitHubhttps://github.com/jenkinsci/rbenv-plugin/issues/26#issuecomment-41754588 .
Greg Albrecht gba@onbeep.com 310-621-9598 Cofounder & CTO, OnBeep, Inc. http://get.onbeep.com
Any updates on this? I get the same error even with SSH.
I have tried to reproduce with both JNLP and SSH slaves, but could not see any problems. It seems that the environment variables like $HOME
are properly expanded on remote hosts.
I suspect that the cause of the error is just a build problem of ruby in ruby-build
, possibly missing build dependencies.
Any progress here? I'm having the same issue here. still
I kind of experience the same. My setup is rather simple. jenkins and a github repo with a rails project. No remote node.
Excuse if this is obvious but in the failing line of code the backslashes are duplicated.
Building in workspace /Users/timeoforigin-tsmacminiserver/.jenkins/jobs/backend-tryout/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git@github.com:silvio/BACKEND.git # timeout=10
Fetching upstream changes from git@github.com:silvio/BACKEND.git
> git --version # timeout=10
using GIT_SSH to set credentials
> git -c core.askpass=true fetch --tags --progress git@github.com:silvio/BACKEND.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 45762e95b5d3b3234abe7c80faa9fe666 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 45762e95b5d3b34abe7c80faa9fe666
> git rev-list 45762e95b5d3b34abe7c80faa9fe666 # timeout=10
$ bash -c "[ -d \$HOME/.rbenv ]"
$ bash -c "[ -d \$HOME/.rbenv/plugins/ruby-build ]"
Just ignoring local Ruby version.
$ bash -c "mkdir \$HOME/.rbenv.lock"
$ bash -c "env RBENV_ROOT\=\$HOME/.rbenv RBENV_VERSION\=2.1.6 \$HOME/.rbenv/bin/rbenv versions --bare"
$ bash -c "rm -rf \$HOME/.rbenv.lock"
FATAL: (CommandError) failed: "env RBENV_ROOT\\=\\$HOME/.rbenv RBENV_VERSION\\=2.1.6 \\$HOME/.rbenv/bin/rbenv versions --bare"
org.jruby.exceptions.RaiseException: (CommandError) failed: "env RBENV_ROOT\\=\\$HOME/.rbenv RBENV_VERSION\\=2.1.6 \\$HOME/.rbenv/bin/rbenv versions --bare"
at RUBY.run(/Users/timeoforigin-tsmacminiserver/.jenkins/plugins/rbenv/WEB-INF/classes/lib/rbenv/invoke.rb:18)
at RUBY.capture(/Users/timeoforigin-tsmacminiserver/.jenkins/plugins/rbenv/WEB-INF/classes/lib/rbenv/invoke.rb:11)
at RUBY.setup!(/Users/timeoforigin-tsmacminiserver/.jenkins/plugins/rbenv/WEB-INF/classes/lib/rbenv.rb:25)
at RUBY.synchronize(/Users/timeoforigin-tsmacminiserver/.jenkins/plugins/rbenv/WEB-INF/classes/lib/rbenv/semaphore.rb:15)
at RUBY.setup!(/Users/timeoforigin-tsmacminiserver/.jenkins/plugins/rbenv/WEB-INF/classes/lib/rbenv.rb:24)
at RUBY.setup(/Users/timeoforigin-tsmacminiserver/.jenkins/plugins/rbenv/WEB-INF/classes/models/rbenv_wrapper.rb:61)
at RUBY.setUp(/Users/timeoforigin-tsmacminiserver/.jenkins/plugins/rbenv/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/model/environment_proxy.rb:8)
Finished: FAILURE
Had a similar issue. Removed $HOME/.rbenv
from the agent and suddenly it worked again for the next builds of the same Job. Don't ask my why…
$HOME
doesn't seem to be set when I run my jobs. My CI is running on OSX. I tried setting it to the path (set by Jenkins) stored in $JENKINS_HOME
And the effect can be seen in Build / Execute Shell. But it doesn't seem to have an effect on on the rbenv-plugin. I'm still getting this:
Building in workspace /var/root/.jenkins/jobs/ruby test/workspace
$ bash -c "[ -d \$HOME/.rbenv ]"
$ bash -c "[ -d \$HOME/.rbenv/plugins/ruby-build ]"
$ bash -c "cd /var/root/.jenkins/jobs/ruby\ test/workspace && env RBENV_ROOT\=\$HOME/.rbenv RBENV_VERSION\=2.2.2 \$HOME/.rbenv/bin/rbenv local 2>/dev/null || true"
$ bash -c "mkdir \$HOME/.rbenv.lock"
$ bash -c "env RBENV_ROOT\=\$HOME/.rbenv RBENV_VERSION\=2.2.2 \$HOME/.rbenv/bin/rbenv versions --bare"
Updating rbenv...
$ bash -c "cd \$HOME/.rbenv && git checkout master && git pull"
Already on 'master'
Your branch is up-to-date with 'origin/master'.
Already up-to-date.
Updated rbenv.
Updating ruby-build...
$ bash -c "cd \$HOME/.rbenv/plugins/ruby-build && git checkout master && git pull"
Already on 'master'
Your branch is up-to-date with 'origin/master'.
Already up-to-date.
Updated ruby-build.
Installing 2.2.2...
$ bash -c "env RBENV_ROOT\=\$HOME/.rbenv RBENV_VERSION\=2.2.2 \$HOME/.rbenv/bin/rbenv install 2.2.2"
Downloading openssl-1.0.1p.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/bd5ee6803165c0fb60bbecbacacf244f1f90d2aa0d71353af610c29121e9b2f1
Installing openssl-1.0.1p...
$HOME/.rbenv/plugins/ruby-build/bin/ruby-build: line 923: //$HOME/.rbenv/versions/2.2.2/openssl/ssl/cert.pem: No such file or directory
BUILD FAILED (OS X 10.10.4 using ruby-build 20150818-4-g8d6ff29)
And this plugin created a "/$HOME" directory:
$ ls -la /\$HOME
drwxr-xr-x 3 root wheel 102 Sep 6 13:43 .
drwxr-xr-x 34 root wheel 1224 Sep 6 13:13 ..
drwxr-xr-x 14 root wheel 476 Sep 6 13:12 .rbenv
Any reason why this plugin is using $HOME
instead of $JENKINS_HOME
?
Solved my problem by running Jenkins as a regular user instead of root (which was unintentional in the first place).
I also realized I might have been able to solve it by changing this setting (hidden in the advanced settings):
I encountered with same error when trying to set rbenv from Jenkins. I tried the build removing RBENV_ROOT parameter as well. It gets set again to same. So no difference. Its still failing. Can someone help ?
$ bash -c "git clone https://github.com/sstephenson/rbenv.git \$HOME/.rbenv && cd \$HOME/.rbenv && git checkout master" Cloning into '/var/lib/jenkins/.rbenv'... fatal: unable to access 'https://github.com/sstephenson/rbenv.git/': Failed connect to github.com:443; Operation now in progress FATAL: (CommandError) failed: "git clone https://github.com/sstephenson/rbenv.git \$HOME/.rbenv && cd \$HOME/.rbenv && git checkout master" org.jruby.exceptions.RaiseException: (CommandError) failed: "git clone https://github.com/sstephenson/rbenv.git \$HOME/.rbenv && cd \$HOME/.rbenv && git checkout master"
From the build's console log: