cloudfoundry-attic / cfdev

A fast and easy local Cloud Foundry experience on native hypervisors, powered by LinuxKit with VPNKit
Apache License 2.0
227 stars 64 forks source link

Binding error: "Service broker error: Could not find an available leader" #130

Closed marcello-dev closed 4 years ago

marcello-dev commented 4 years ago

I have deployed a Spring Boot app and mysql on my PCFDEV instance running on Ubuntu. This is the error I get when I try to bind mysql to the app: Service broker error: Could not find an available leader from [https://10.144.0.8:8443]

The full list of commands from the start is:

cf dev start -f pcfdev-v1.2.0-linux.tgz
cf login -a https://api.dev.cfdev.sh --skip-ssl-validation
cf push
cf dev deploy-service mysql
cf create-service p.mysql db-small  mysql-instance
cf bind-service demo-customer mysql-instance

The issue is on the last command which outputs:

Your CF API version (2.125.0) is no longer supported. Upgrade to a newer version of the API (minimum version 2.128.0). Please refer to https://github.com/cloudfoundry/cli/wiki/Versioning-Policy#cf-cli-minimum-supported-version Binding service mysql-instance to app demo-customer in org cfdev-org / space cfdev-space as admin... Service broker error: Could not find an available leader from [https://10.144.0.8:8443] FAILED

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/172751962

The labels on this github issue will be updated when the story is started.

aemengo commented 4 years ago

Please perform the following instead

cf create-service p-mysql 10mb mysql-instance 

CF Dev ships with p-mysql not p.mysql. Thus the workflow that you've posted above is not supported.

hfcotino commented 4 years ago

Hi, I get the same error when binding or creating a service key. I've tried on Windows as well as on Linux, but get the same error. Is there a solution for this?

marcello-dev commented 4 years ago

Hi, I get the same error when binding or creating a service key. I've tried on Windows as well as on Linux, but get the same error. Is there a solution for this?

Have you tried the solution suggested by @aemengo ? I haven't tried it yet.

hfcotino commented 4 years ago

Hi, I get the same error when binding or creating a service key. I've tried on Windows as well as on Linux, but get the same error. Is there a solution for this?

Have you tried the solution suggested by @aemengo ? I haven't tried it yet.

With PCFDev I only got p.mysql. I did however also tried CFDev which has de p-mysql broker. This works fine, the only problem is it only has 10mb or 20mb plans, which is too small.

aemengo commented 4 years ago

@hfcotino @marcello-dev I think there's some confusion. The plans 10mb and 20mb are effectively just labels to match what a real cf-mysql deployment would give you. However, unlike a real deployment, services are allocated all free space in the VM. And this goes for most of the services.

CF Dev aims to provide you with the same interaction experience that you would get with a full deployment, not the same performance or resource expectations.