Unable to parse JSON as proto (INVALID_ARGUMENT:cluster_manager:

2,182 views
Skip to first unread message

Om Prakash Ganesan

unread,
Jun 4, 2018, 2:39:14 PM6/4/18
to envoy-users

Hello,

 I am trying to implement SDS with Envoy V1 API. 

When I try to bring up envoy, with the SDS configs, I am getting this error.  I have made sure the config file is created as per the documentation. 

Any guidance here is much appreciated. 

Error
2018-06-04T17:14:00.400344000Z [2018-06-04 17:14:00.397][5][debug][main] source/server/server.cc:166] Unable to initialize config as v2, will retry as v1: Unable to parse JSON as proto (INVALID_ARGUMENT:cluster_manager: Cannot find field.): {
2018-06-04T17:14:00.400742000Z   "listeners": [
2018-06-04T17:14:00.401100000Z     {
2018-06-04T17:14:00.401507000Z       "address": "tcp://0.0.0.0:8005",
2018-06-04T17:14:00.402021000Z       "filters": [
2018-06-04T17:14:00.402533000Z         {
2018-06-04T17:14:00.402827000Z           "type": "read",
2018-06-04T17:14:00.403063000Z           "name": "http_connection_manager",
2018-06-04T17:14:00.403279000Z           "config": {
2018-06-04T17:14:00.403551000Z             "codec_type": "auto",
2018-06-04T17:14:00.403785000Z             "stat_prefix": "ingress_http",
2018-06-04T17:14:00.404023000Z             "route_config": {
2018-06-04T17:14:00.404276000Z               "virtual_hosts": [
2018-06-04T17:14:00.404518000Z                 {
2018-06-04T17:14:00.404953000Z                   "name": "backend",
2018-06-04T17:14:00.405400000Z                   "domains": ["*"],
2018-06-04T17:14:00.405687000Z                   "routes": [
2018-06-04T17:14:00.405941000Z                     {
2018-06-04T17:14:00.406175000Z                       "timeout_ms": 0,
2018-06-04T17:14:00.406513000Z                       "prefix": "/greetings",
2018-06-04T17:14:00.406770000Z                       "cluster": "gcag"
2018-06-04T17:14:00.407025000Z                     }
2018-06-04T17:14:00.407275000Z                   ]
2018-06-04T17:14:00.408532000Z                 }
2018-06-04T17:14:00.408802000Z               ]
2018-06-04T17:14:00.409063000Z             },
2018-06-04T17:14:00.409311000Z             "filters": [
2018-06-04T17:14:00.409583000Z               {
2018-06-04T17:14:00.409811000Z                 "type": "decoder",
2018-06-04T17:14:00.410059000Z                 "name": "router",
2018-06-04T17:14:00.410291000Z                 "config": {}
2018-06-04T17:14:00.410545000Z               }
2018-06-04T17:14:00.410810000Z             ]
2018-06-04T17:14:00.411049000Z           }
2018-06-04T17:14:00.411265000Z         }
2018-06-04T17:14:00.411523000Z       ]
2018-06-04T17:14:00.411813000Z     }
2018-06-04T17:14:00.412081000Z   ],
2018-06-04T17:14:00.412328000Z   "admin": {
2018-06-04T17:14:00.412586000Z     "access_log_path": "/dev/null",
2018-06-04T17:14:00.412802000Z     "address": "tcp://127.0.0.1:15001"
2018-06-04T17:14:00.413006000Z   },
2018-06-04T17:14:00.413230000Z   "cluster_manager": {
2018-06-04T17:14:00.413500000Z     "sds": {
2018-06-04T17:14:00.413733000Z       "cluster": {
2018-06-04T17:14:00.413969000Z         "name": "gcag-sds",
2018-06-04T17:14:00.414188000Z         "connect_timeout_ms": 250,
2018-06-04T17:14:00.414429000Z         "type": "strict_dns",
2018-06-04T17:14:00.414674000Z         "lb_type": "round_robin",
2018-06-04T17:14:00.414917000Z         "hosts": [
2018-06-04T17:14:00.415154000Z           {
2018-06-04T17:14:00.415426000Z             "url": "tcp://java-sds:2235"
2018-06-04T17:14:00.415684000Z           }
2018-06-04T17:14:00.415938000Z         ]
2018-06-04T17:14:00.416249000Z       },
2018-06-04T17:14:00.416503000Z       "refresh_delay_ms": 15000
2018-06-04T17:14:00.416758000Z     },
2018-06-04T17:14:00.416993000Z     "clusters": [
2018-06-04T17:14:00.417267000Z       {
2018-06-04T17:14:00.417543000Z         "name": "gcag",
2018-06-04T17:14:00.417777000Z         "connect_timeout_ms": 250,
2018-06-04T17:14:00.417989000Z         "type": "sds",
2018-06-04T17:14:00.418236000Z         "service_name": "hello-service",
2018-06-04T17:14:00.418974000Z "lb_type": "round_robin"
2018-06-04T17:14:00.419283000Z       }
2018-06-04T17:14:00.419534000Z     ]
2018-06-04T17:14:00.419777000Z   }
2018-06-04T17:14:00.420014000Z }
2018-06-04T17:14:00.420255000Z
2018-06-04T17:14:00.420521000Z
2018-06-04T17:14:00.420764000Z [2018-06-04 17:14:00.413][5][debug][main] source/server/server.cc:231] admin address: 127.0.0.1:15001
2018-06-04T17:14:00.421051000Z [2018-06-04 17:14:00.418][5][debug][grpc] source/common/grpc/google_async_client_impl.cc:27] Joining completionThread
2018-06-04T17:14:00.421286000Z [2018-06-04 17:14:00.418][8][debug][grpc] source/common/grpc/google_async_client_impl.cc:37] completionThread running
2018-06-04T17:14:00.421529000Z [2018-06-04 17:14:00.418][8][debug][grpc] source/common/grpc/google_async_client_impl.cc:60] completionThread exiting
2018-06-04T17:14:00.421896000Z [2018-06-04 17:14:00.418][5][debug][grpc] source/common/grpc/google_async_client_impl.cc:29] Joined completionThread
2018-06-04T17:14:00.422138000Z [2018-06-04 17:14:00.418][5][critical][main] source/server/server.cc:77] error initializing configuration '/etc/envoy.json': eds: setting --service-cluster and --service-node is required
2018-06-04T17:14:00.422403000Z [2018-06-04 17:14:00.418][5][info][main] source/server/server.cc:435] exiting

Om Prakash Ganesan

unread,
Jun 4, 2018, 11:16:49 PM6/4/18
to envoy-users
Ok here is what I found out.
I downgraded the envoy image to a couple of versions older , and things started to work with the very same envoy config json file.

I am not sure if its a backward compatibility issue .



--
You received this message because you are subscribed to the Google Groups "envoy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users+unsubscribe@googlegroups.com.
To post to this group, send email to envoy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-users/424c6c05-ecb5-40ef-ad43-5082b045aa20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jki...@gmail.com

unread,
Jul 26, 2018, 9:21:35 PM7/26/18
to envoy-users
I too got a similar error message

" Unable to initialize config as v2, will retry as v1: Unable to parse JSON as proto (INVALID_ARGUMENT:static_resources.listeners[0].filter_chains[0].tls_context: Cannot find field.):"

I have feeling that it is a version mismatch. How do you change the version setting?


Om Prakash Ganesan

unread,
Jul 26, 2018, 10:01:08 PM7/26/18
to envoy-users
Hi It was actually due to version mis match exactly.

Here is a sample V2 config and docker run command. Let me know if that helps

envoy.yaml

node:
id: somevalue
cluster: somevalue
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 0.0.0.0, port_value: 8001 }

static_resources:
listeners:
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 8005 }
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
stat_prefix: ingress_http
codec_type: AUTO
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match: { prefix: "/greetings" }
route: { cluster: hello-service }
http_filters:
- name: envoy.router
clusters:
- name: hello-service
connect_timeout: 0.25s
lb_policy: ROUND_ROBIN
type: EDS
eds_cluster_config:
eds_config:
api_config_source:
api_type: REST_LEGACY
cluster_names: [eds_cluster]
refresh_delay: 0.25s
- name: eds_cluster
connect_timeout: 0.25s
type: LOGICAL_DNS
lb_policy: ROUND_ROBIN
hosts: [{ socket_address: { address: java-sds, port_value: 2235 }}]


Note: Java-sds is my own service catalog bridge, to give you some context. 



Here is how you have to invoke enovy proxy.
docker run -it -d --name envoy --link java-sds -v /envoy/envoy.yaml:/etc/envoy.yaml -v /var/tmp/:/var/tmp/ -p 8005:8005  -p 8001:8001 envoyproxy/envoy envoy --v2-config-only -c /etc/envoy.yaml

Thanks,
Om.

Mark Jaffe

unread,
Jul 28, 2018, 5:09:39 PM7/28/18
to envoy...@googlegroups.com

Om,

In your docker command, you include '--link java-sds' which I am assuming is another docker container? Or some service running locally?

Jaff

--
You received this message because you are subscribed to the Google Groups "envoy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users...@googlegroups.com.

To post to this group, send email to envoy...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages