cloudfoundry-community-attic / bosh-cloudfoundry

Create, scale and upgrade your company's own Cloud Foundry
https://github.com/cloudfoundry-community/bosh-cloudfoundry#readme
MIT License
90 stars 30 forks source link

bosh-init fails at Parsing private key file '/home/.../ssh/firstbosh': asn1: structure error: superfluous leading zeros in length #278

Open ghost opened 9 years ago

ghost commented 9 years ago

Hi,

I am trying to deploy cloud foundry on openstack using bosh-init. It fails at

Deployment manifest: '/home/..../my-bosh/bosh-init.yml'
Deployment state: '/home/.../my-bosh/bosh-init-state.json'

Started validating
  Downloading release 'bosh'... Skipped [Found in local cache] (00:00:00)
  Validating release 'bosh'... Finished (00:00:22)
  Downloading release 'bosh-openstack-cpi'... Skipped [Found in local cache] (00:00:00)
  Validating release 'bosh-openstack-cpi'... Finished (00:00:02)
  Validating cpi release... Finished (00:00:00)
  Validating deployment manifest... Finished (00:00:00)
  Validating stemcell... Finished (00:01:04)
Finished validating (00:01:31)

Started installing CPI
  Compiling package 'ruby_openstack_cpi/84c20c88359d95e823178ff973ed1efaa1cec61b'... Finished (00:00:00)
  Compiling package 'bosh_openstack_cpi/fc4bc63ea33af8f753bd7dc0606f976135b69ac3'... Finished (00:00:00)
  Installing packages... Finished (00:00:14)
  Rendering job templates... Finished (00:00:03)
  Installing job 'openstack_cpi'... Finished (00:00:00)
Finished installing CPI (00:00:18)

Starting registry... Finished (00:00:00)
Uploading stemcell 'bosh-openstack-kvm-ubuntu-trusty-go_agent/3143'... Skipped [Stemcell already uploaded] (00:00:00)

Started deploying
  Creating VM for instance 'bosh/0' from stemcell '7a19ac57-bcc5-49ad-bc86-3480e7cfb5d3'... Finished (00:01:27)
  Waiting for the agent on VM '40330128-3f8e-43a1-8ba9-ca79f468260e' to be ready... Failed (00:00:01)
Failed deploying (00:01:29)

Stopping registry... Finished (00:00:00)
Cleaning up rendered CPI jobs... Finished (00:00:00)

Command 'deploy' failed:
  Deploying:
    Creating instance 'bosh/0':
      Waiting until instance is ready:
        Starting SSH tunnel:
          Parsing private key file '/home/.../ssh/firstbosh':
            asn1: structure error: superfluous leading zeros in length```

Does anybody know how to get rid of this error?
Yancey1989 commented 8 years ago

I get the same error, @HifzaK have you solve it?

ghost commented 8 years ago

No, I wasn't able to solve it. You could try deploying cloud foundry using traveling-bosh.

On Wed, Feb 24, 2016 at 1:22 PM, Yancey notifications@github.com wrote:

I get the same error, @HifzaK https://github.com/HifzaK have you solve it?

— Reply to this email directly or view it on GitHub https://github.com/cloudfoundry-community/bosh-cloudfoundry/issues/278#issuecomment-188136240 .

edwardbartholomew commented 8 years ago

@Yancey1989 @HifzaK I have received same error when using keypairs generated by OpenStack console. Generating the private key via UNIX command line ssh-keygen and importing that keypair into OpenStack has solved this asn1 structure error for me when running bush-init.

Not sure if this is related but I happened upon https://groups.google.com/forum/#!topic/packer-tool/Squ0nStU5_8 leading me to https://github.com/openstack/nova/commit/f0082849dfe435af23b85150efd8dea06799e999 which mentions potential change with how OpenStack was writing the private key.

SimyungYang commented 8 years ago

I am having the same error with the pem file which I've got from Openstack horizon dashboard.

dpb587-pivotal commented 8 years ago

Related: https://www.pivotaltracker.com/n/projects/1456570/stories/115858545

rushins commented 8 years ago

i am having the same error in Liberty release and i found this link where it said some bugs https://www.pivotaltracker.com/n/projects/1456570/stories/115858545 but no solution how to convert key from BER encoding to DER encoding.

jeanbza commented 8 years ago

Having the same problem on mitaka. Worked around by creating a keypair locally and uploading, per @edwardbartholomew