Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Fail to marshall local.yml services with 'credentials' as objects #32

Open
marksjwhite opened this issue Feb 4, 2019 · 1 comment
Open

Comments

@marksjwhite
Copy link

When attempting to run a previously created droplet using local.yml we see the error;

Error: json: unsupported type: map[interface {}]interface {}

This happens only when "services:" contains a "credentials" object with data other than name/value pairs. Our CF environment and service bindings regularly writes extra information into "credentials", inside additional objects.

For example a rabbitmq service binding writes additional port information into "credentials";

JSON:

... 8<...
                "rabbitmq": [
                        {
                                "label": "rabbitmq",
.. 8<...
                                "credentials": {
                                        "hostname": "10.11.241.23",
                                        "ports": {
                                                "15672/tcp": "60661",
                                                "15674/tcp": "35351",
                                                "5672/tcp": "49519",
                                                "61613/tcp": "56945"
                                        },
                                        "port": "49519",
                                        "username": "x",
                                        "password": "y",
                                        "uri": "amqp://x:[email protected]:49519"
                                },
.. 8<...

YAML:

  rabbitmq:
     -
       label: "rabbitmq"
.. 8<...
       credentials:
         hostname: "10.11.241.23"
         ports:
           15672/tcp: "60661"
           15674/tcp: "35351"
           5672/tcp: "49519"
           61613/tcp: "56945"
         port: "49519"
         username: "esZ6TT-2OEE51BDz"
         password: "VmIb7jGEfhfOeHGN"
         uri: "amqp://esZ6TT-2OEE51BDz:[email protected]:49519"
.. 8<...

Removing the "ports" in bold allows a 'cf local run' to work, but our applications rely on data passed in the credentials in this format and so subsequently fail to start.

$ cf local version
CF Local version 0.19.0

Thx

@Manish-Mj
Copy link

Hello @marksjwhite Were you able to get past this error..? Looks like @sclevine & team are busy, so lets try helping each other.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants