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:y@10.11.241.23: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:VmIb7jGEfhfOeHGN@10.11.241.23: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
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:
YAML:
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.
Thx