Bootstrapping error - empty client.pem?


#1

Hi all -

I’m struggling a bit here…

I have all the debugging turned up and I’m trying to bootstrap a new node
and I keep getting this error:

[2012-07-20T11:39:43-07:00] INFO: *** Chef 10.12.0 ***
[2012-07-20T11:39:43-07:00] INFO: Client key /etc/chef/client.pem is not
present - registering
[2012-07-20T11:39:43-07:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2012-07-20T11:39:43-07:00] FATAL: Chef::Exceptions::InvalidPrivateKey: The
file /etc/chef/validation.pem does not contain a correctly formatted
private key.
The key file should begin with ‘-----BEGIN RSA PRIVATE KEY-----’ and end
with ‘-----END RSA PRIVATE KEY-----’

Looking at the validation.pem file on this particular machine AND one that
bootstraps properly there’s no difference. The client.pem file simply
isn’t getting generated on the one complaining about the validation.pem
file.

Any suggesitons?


#2

What bootstrap method are you using?

On Fri, Jul 20, 2012 at 1:45 PM, Maven User maven.2.user@gmail.com wrote:

Hi all -

I’m struggling a bit here…

I have all the debugging turned up and I’m trying to bootstrap a new node
and I keep getting this error:

[2012-07-20T11:39:43-07:00] INFO: *** Chef 10.12.0 ***
[2012-07-20T11:39:43-07:00] INFO: Client key /etc/chef/client.pem is not
present - registering
[2012-07-20T11:39:43-07:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2012-07-20T11:39:43-07:00] FATAL: Chef::Exceptions::InvalidPrivateKey:
The file /etc/chef/validation.pem does not contain a correctly formatted
private key.
The key file should begin with ‘-----BEGIN RSA PRIVATE KEY-----’ and end
with ‘-----END RSA PRIVATE KEY-----’

Looking at the validation.pem file on this particular machine AND one that
bootstraps properly there’s no difference. The client.pem file simply
isn’t getting generated on the one complaining about the validation.pem
file.

Any suggesitons?


Charles Sullivan
charlie.sullivan@gmail.com


#3

knife bootstrap -d ubuntu12.04-gems -r ‘role[jenkins]’ -x
-P --sudo -V

On Fri, Jul 20, 2012 at 2:56 PM, Charles Sullivan <
charlie.sullivan@gmail.com> wrote:

What bootstrap method are you using?

On Fri, Jul 20, 2012 at 1:45 PM, Maven User maven.2.user@gmail.comwrote:

Hi all -

I’m struggling a bit here…

I have all the debugging turned up and I’m trying to bootstrap a new node
and I keep getting this error:

[2012-07-20T11:39:43-07:00] INFO: *** Chef 10.12.0 ***
[2012-07-20T11:39:43-07:00] INFO: Client key /etc/chef/client.pem is not
present - registering
[2012-07-20T11:39:43-07:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2012-07-20T11:39:43-07:00] FATAL: Chef::Exceptions::InvalidPrivateKey:
The file /etc/chef/validation.pem does not contain a correctly formatted
private key.
The key file should begin with ‘-----BEGIN RSA PRIVATE KEY-----’ and end
with ‘-----END RSA PRIVATE KEY-----’

Looking at the validation.pem file on this particular machine AND one
that bootstraps properly there’s no difference. The client.pem file simply
isn’t getting generated on the one complaining about the validation.pem
file.

Any suggesitons?


Charles Sullivan
charlie.sullivan@gmail.com


#4

Oh - and I’ve rm -rf’d the /etc/chef directory several times to no avail.

On Fri, Jul 20, 2012 at 2:56 PM, Charles Sullivan <
charlie.sullivan@gmail.com> wrote:

What bootstrap method are you using?

On Fri, Jul 20, 2012 at 1:45 PM, Maven User maven.2.user@gmail.comwrote:

Hi all -

I’m struggling a bit here…

I have all the debugging turned up and I’m trying to bootstrap a new node
and I keep getting this error:

[2012-07-20T11:39:43-07:00] INFO: *** Chef 10.12.0 ***
[2012-07-20T11:39:43-07:00] INFO: Client key /etc/chef/client.pem is not
present - registering
[2012-07-20T11:39:43-07:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2012-07-20T11:39:43-07:00] FATAL: Chef::Exceptions::InvalidPrivateKey:
The file /etc/chef/validation.pem does not contain a correctly formatted
private key.
The key file should begin with ‘-----BEGIN RSA PRIVATE KEY-----’ and end
with ‘-----END RSA PRIVATE KEY-----’

Looking at the validation.pem file on this particular machine AND one
that bootstraps properly there’s no difference. The client.pem file simply
isn’t getting generated on the one complaining about the validation.pem
file.

Any suggesitons?


Charles Sullivan
charlie.sullivan@gmail.com


#5

Is your client.rb on the machine you’re executing the knife bootstrap command on pointing at the correct file?

On Friday, July 20, 2012 at 1:11 PM, Maven User wrote:

knife bootstrap -d ubuntu12.04-gems -r ‘role[jenkins]’ -x -P --sudo -V

On Fri, Jul 20, 2012 at 2:56 PM, Charles Sullivan <charlie.sullivan@gmail.com (mailto:charlie.sullivan@gmail.com)> wrote:

What bootstrap method are you using?

On Fri, Jul 20, 2012 at 1:45 PM, Maven User <maven.2.user@gmail.com (mailto:maven.2.user@gmail.com)> wrote:

Hi all -

I’m struggling a bit here…

I have all the debugging turned up and I’m trying to bootstrap a new node and I keep getting this error:

[2012-07-20T11:39:43-07:00] INFO: *** Chef 10.12.0 ***
[2012-07-20T11:39:43-07:00] INFO: Client key /etc/chef/client.pem is not present - registering
[2012-07-20T11:39:43-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2012-07-20T11:39:43-07:00] FATAL: Chef::Exceptions::InvalidPrivateKey: The file /etc/chef/validation.pem does not contain a correctly formatted private key.
The key file should begin with ‘-----BEGIN RSA PRIVATE KEY-----’ and end with ‘-----END RSA PRIVATE KEY-----’

Looking at the validation.pem file on this particular machine AND one that bootstraps properly there’s no difference. The client.pem file simply isn’t getting generated on the one complaining about the validation.pem file.

Any suggesitons?


Charles Sullivan
charlie.sullivan@gmail.com (mailto:charlie.sullivan@gmail.com)


#6

On Fri, Jul 20, 2012 at 2:45 PM, Maven User maven.2.user@gmail.com wrote:

The key file should begin with ‘-----BEGIN RSA PRIVATE KEY-----’ and end
with ‘-----END RSA PRIVATE KEY-----’

Looking at the validation.pem file on this particular machine AND one that
bootstraps properly there’s no difference. The client.pem file simply isn’t
getting generated on the one complaining about the validation.pem file.

Does the file on the node you’re trying to bootstrap being and end
with the lines in the error message?

Being the same doesn’t mean that it’s correct :slight_smile:

Bryan


#7

It’s my validation.pem file - it was (correctly) mailed to me encrypted and
I screwed up the decryption.

I’ll try and fix that and give it another shot…

On Fri, Jul 20, 2012 at 4:59 PM, Bryan McLellan btm@loftninjas.org wrote:

On Fri, Jul 20, 2012 at 2:45 PM, Maven User maven.2.user@gmail.com
wrote:

The key file should begin with ‘-----BEGIN RSA PRIVATE KEY-----’ and end
with ‘-----END RSA PRIVATE KEY-----’

Looking at the validation.pem file on this particular machine AND one
that
bootstraps properly there’s no difference. The client.pem file simply
isn’t
getting generated on the one complaining about the validation.pem file.

Does the file on the node you’re trying to bootstrap being and end
with the lines in the error message?

Being the same doesn’t mean that it’s correct :slight_smile:

Bryan


#8

Yep - that was it.

I properly decrypted the file and all is well.

Sorry for the noise folks!

On Mon, Jul 23, 2012 at 9:49 AM, Maven User maven.2.user@gmail.com wrote:

It’s my validation.pem file - it was (correctly) mailed to me encrypted
and I screwed up the decryption.

I’ll try and fix that and give it another shot…

On Fri, Jul 20, 2012 at 4:59 PM, Bryan McLellan btm@loftninjas.orgwrote:

On Fri, Jul 20, 2012 at 2:45 PM, Maven User maven.2.user@gmail.com
wrote:

The key file should begin with ‘-----BEGIN RSA PRIVATE KEY-----’ and end
with ‘-----END RSA PRIVATE KEY-----’

Looking at the validation.pem file on this particular machine AND one
that
bootstraps properly there’s no difference. The client.pem file simply
isn’t
getting generated on the one complaining about the validation.pem file.

Does the file on the node you’re trying to bootstrap being and end
with the lines in the error message?

Being the same doesn’t mean that it’s correct :slight_smile:

Bryan