cloudfoundry-attic / bosh-init

bosh-init is a tool used to create and update the Director VM
Apache License 2.0
31 stars 33 forks source link

bosh-init creating stem cell failed #66

Closed mauermbq closed 8 years ago

mauermbq commented 8 years ago

Hi, I initialized AWS according http://bosh.io/docs/init-aws.html

deploy-init ended with: creating stemcell (bosh-aws-xen-hvm-ubuntu-trusty-go_agent 3012): CPI 'create_stemcell' method responded with error: CmdError{"type":"Unknown","message":"Connection refused - connect(2) for \"ec2.us-east-1a.amazonaws.com\" port 443","ok_to_retry":false}

bosh-init -v: version 0.0.81-775439c-2015-12-09T00:36:04Z

Unfortunately I don't see any indication why the connection is refused?

Best Mark

ghost commented 8 years ago

Mark - looks like you might have put an availability zone (us-east-1a) in a place where region (us-east-1) is expected. Double check your manifest for jobs[bosh].properties.aws.region and cloud_provider.properties.aws.region.

On Sun, Feb 7, 2016 at 4:03 PM, mauermbq notifications@github.com wrote:

Hi, I initialized AWS according http://bosh.io/docs/init-aws.html

deploy-init ended with: creating stemcell (bosh-aws-xen-hvm-ubuntu-trusty-go_agent 3012): CPI 'create_stemcell' method responded with error: CmdError{"type":"Unknown","message":"Connection refused - connect(2) for \" ec2.us-east-1a.amazonaws.com\" port 443","ok_to_retry":false}

bosh-init -v: version 0.0.81-775439c-2015-12-09T00:36:04Z

Unfortunately I don't see any indication why the connection is refused?

Best Mark

— Reply to this email directly or view it on GitHub https://github.com/cloudfoundry/bosh-init/issues/66.

Danny Berger

calebamiles commented 8 years ago

Mark,

Are you trying to deploy a "full" AWS stemcell from outside AWS (e.g. your laptop) If you are trying to deploy BOSH from a machine outside of AWS you must use a light stemcell. You can fetch one from bosh.io if you desire an Ubuntu stemcell. Note that light stemcells will have light in the name.

@calebamiles

mauermbq commented 8 years ago

The manifest has two props:

both properties were us-east-1a, as well as my subnet that I've configured in the management console However changing that solves the login issue, but than I get message":"can't use multiple availability zones: subnet in us-east-1a, VM in us-east-1

but, if set both to us-east-1: "message":"getaddrinfo: Name or service not known",

stemcell is: 'ami-5728e73c light

dpb587-pivotal commented 8 years ago

Sounds like you might have set both properties to us-east-1. Instead, region property should be us-east-1 and availability_zone should be us-east-1a. Does that help?

mauermbq commented 8 years ago

unfortunately not - here my result:

_Creating VM for instance 'bosh/0' from stemcell 'ami-5728e73c light'... Finished (00:00:38) Waiting for the agent on VM 'i-5da985d8' to be ready... Failed (00:03:05) Failed deploying (00:03:43)

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: Failed to connect to remote server: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain_

dpb587-pivotal commented 8 years ago

Progress - that's a new error. It was able to talk with AWS and create the instance, but now there's an issue connecting to it. You might want to double check your key path and permissions, and/or enabling logging to investigate the new error further.

mauermbq commented 8 years ago

seems that the instance cannot be reached

[cpiCmdRunner] 2016/02/09 18:38:02 DEBUG - Waiting for the agent on VM 'i-5da985d8'...[timeoutRetryStrategy] 2016/02/09 18:38:02 DEBUG - Making attempt #0 [httpClient] 2016/02/09 18:38:02 DEBUG - Sending POST request with body {"method":"ping","arguments":[],"reply_to":"371cf699-c4f1-424c-4f88-f83fb1745b6c"}, endpoint https://mbus:mbus-password@52.73.55.242/agent .... [instance] 2016/02/09 18:38:12 WARN - Gave up waiting for agent: Agent unreachable: Sending ping to the agent: Performing request to agent endpoint 'https://mbus:mbus-password@52.73.55.242/agent': Performing POST request: Post https://mbus:mbus-password@52.73.55.242/agent: dial tcp 52.73.55.242:443: getsockopt: connection refused

dpb587-pivotal commented 8 years ago

Did you maybe change the port from the sample to port 443? Try switching cloud_provider.mbus to use port 6868 as recommended (i.e. https://mbus:mbus-password@x.x.x.242:6868) and then ensure your security group allows incoming traffic to port 6868.

mauermbq commented 8 years ago

Thanks, this was missing part, but the opposite round is used 6868 as recommended and tried 443 instead. Maybe the sample need to be changed?

dpb587-pivotal commented 8 years ago

I think the sample is correct - I don't see port 443 referenced at all, unless you're referring to something else?

mauermbq commented 8 years ago

no nothing else, I had to change the port than it worked

dpb587-pivotal commented 8 years ago

Closing - original issues appear to be resolved.