Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chef http_request errors

Tags:

chef-infra

I'm using Chef Solo to create a Jenkins CI server on an EC2 instance. I carry out a similar process with Chef and Vagrant with no problems, but when I try to run the cookbooks on EC2 I get the following problem:

FATAL: Zlib::BufError: http_request[HEAD http://updates.jenkins-ci.org/latest/git.hpi] (chef-jenkins::default line 70) had an error: Zlib::BufError: buffer error

Essentially Jenkins installs ok, but when it tries to get the plugins listed in:

jenkins[:server][:plugins]

it fails with the above messages for each and every plugin.

I'm using: https://github.com/fnichol/chef-jenkins.

I've tried a simple wget on the EC2 instance on the same plugin url, and I do get the following error:

Connecting to updates.jenkins-ci.org|63.246.20.93|:443... connected.
ERROR: certificate common name `jenkins-ci.org' doesn't match requested host name `updates.jenkins-ci.org'.
To connect to updates.jenkins-ci.org insecurely, use `--no-check-certificate'.

I don't know if this is a temporary issue with Jenkins (i've had some problems before installing Jenkins using Chef due to problems at Jenkins end), or whether there is something wrong with the EC2 setup.

As ever, any help would be much appreciated.

...where is the Stackoverflow 'devops' tag by the way? Am I posting on the wrong Exchange... is it a developer or operations problem?

like image 964
JonB Avatar asked Oct 07 '22 09:10

JonB


2 Answers

This Chef Ticket might be relevant. If you compare to line 70 of the chef-jenkins recipe you can see http_request getting called and you may have to patch the :disable_gzip option mentioned in the ticket.

like image 69
jodell Avatar answered Oct 10 '22 22:10

jodell


Compare the version of Ruby etc. Check the major and minor releases are similar.

gem update --system
like image 43
HGSSO Avatar answered Oct 10 '22 22:10

HGSSO