envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.85k stars 4.78k forks source link

front-end proxy example doesn't run #6363

Closed dbhoot closed 5 years ago

dbhoot commented 5 years ago

Title: front-end proxy example doesn't run because 'Proto constraint validation failed'

Description: I'm new to Envoy and decided to start by following the tutorial here: https://www.learnenvoy.io/articles/on-your-laptop.html

Following the instructions, when I bring up the example proxy using docker-compose, the containers exit. The logs show the following:

2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:206] initializing epoch 0 (hot restart version=10.200.16384.127.options=capacity=16384, num_slots=8209 hash=228984379728933363 size=2654312) [2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:208] statically linked extensions: [2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:210] access_loggers: envoy.file_access_log,envoy.http_grpc_access_log [2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:213] filters.http: envoy.buffer,envoy.cors,envoy.ext_authz,envoy.fault,envoy.filters.http.header_to_metadata,envoy.filters.http.jwt_authn,envoy.filters.http.rbac,envoy.grpc_http1_bridge,envoy.grpc_json_transcoder,envoy.grpc_web,envoy.gzip,envoy.health_check,envoy.http_dynamo_filter,envoy.ip_tagging,envoy.lua,envoy.rate_limit,envoy.router,envoy.squash [2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:216] filters.listener: envoy.listener.original_dst,envoy.listener.proxy_protocol,envoy.listener.tls_inspector [2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:219] filters.network: envoy.client_ssl_auth,envoy.echo,envoy.ext_authz,envoy.filters.network.dubbo_proxy,envoy.filters.network.rbac,envoy.filters.network.sni_cluster,envoy.filters.network.thrift_proxy,envoy.http_connection_manager,envoy.mongo_proxy,envoy.ratelimit,envoy.redis_proxy,envoy.tcp_proxy [2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:221] stat_sinks: envoy.dog_statsd,envoy.metrics_service,envoy.stat_sinks.hystrix,envoy.statsd [2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:223] tracers: envoy.dynamic.ot,envoy.lightstep,envoy.tracers.datadog,envoy.zipkin [2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:226] transport_sockets.downstream: envoy.transport_sockets.alts,envoy.transport_sockets.capture,raw_buffer,tls [2019-03-22 23:04:43.651][000007][info][main] [source/server/server.cc:229] transport_sockets.upstream: envoy.transport_sockets.alts,envoy.transport_sockets.capture,raw_buffer,tls [2019-03-22 23:04:43.655][000007][info][main] [source/server/server.cc:271] admin address: 0.0.0.0:8081 [2019-03-22 23:04:43.656][000007][info][config] [source/server/configuration_impl.cc:50] loading 0 static secret(s) [2019-03-22 23:04:43.656][000007][info][config] [source/server/configuration_impl.cc:56] loading 1 cluster(s) [2019-03-22 23:04:43.657][000007][info][upstream] [source/common/upstream/cluster_manager_impl.cc:136] cm init: all clusters initialized [2019-03-22 23:04:43.657][000007][info][config] [source/server/configuration_impl.cc:67] loading 1 listener(s) [2019-03-22 23:04:43.657][000007][critical][main] [source/server/server.cc:86] error initializing configuration '/etc/service-envoy.yaml': Proto constraint validation failed (HttpConnectionManagerValidationError.StatPrefix: ["value length must be at least " '\x01' " bytes"]):

I'm building off master (1301f1182bbbddf6f20d1b29acb04b54e75a5187). Looking at the service-envoy.yml, it does look like there's a stat_prefix defined.

stat_prefix: ingress_http

I'll continue on the tutorial and see if I can figure out what's wrong.

yifan-gu commented 5 years ago

Same here, I think the current envoyproxy/envoy:latest image is not working. envoyproxy/envoy-dev:latest works so far.

docker inspect envoyproxy/envoy:latest
[
    {
        "Id": "sha256:b02c1418b106eb599d08d96b4450fba5a493fa507c3fc6ce6d5668f42c27239f",
        "RepoTags": [
            "envoyproxy/envoy:latest",
            "envoyproxy/envoy:v1.9.0"
        ],
        "RepoDigests": [
            "envoyproxy/envoy@sha256:36fa7662386ed6db1d3fe7bcfab7cdeb9d2aeceabe0f0e96f5af202e9e3db556"
        ],

...

Ref https://github.com/envoyproxy/go-control-plane/issues/151

mattklein123 commented 5 years ago

Please see https://github.com/envoyproxy/envoy/issues/6361 and https://github.com/envoyproxy/envoy/pull/6357. Sorry for the trouble while we figure out how to support both master and tagged use cases.

goith commented 5 years ago

i found Dockerfile-service doesn't run in this example.

goith commented 5 years ago

resovled, Dockerfile-service image also need change to envoy-alpine-dev.

dbhoot commented 5 years ago

Ah I see. Thanks Matt. I'm running off 1.7-stable now and seems to be good now.