Skip to content

grpc-bridge example fails during docker-compose #324

@drobertduke

Description

@drobertduke

Running from master:

$> pwd
/tmp/lyft/envoy/examples/grpc-bridge
$> docker-compose up --build -d
Building python

[cut]

The following extra packages will be installed:
  libexpat1-dev libpython-dev libpython2.7 libpython2.7-dev python2.7-dev
The following NEW packages will be installed:
  libexpat1-dev libpython-dev libpython2.7 libpython2.7-dev python-dev
  python2.7-dev
0 upgraded, 6 newly installed, 0 to remove and 10 not upgraded.
Need to get 23.4 MB of archives.
After this operation, 38.7 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libexpat1-dev amd64 2.1.0-4ubuntu1.3 [115 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main libpython-dev amd64 2.7.5-5ubuntu3 [7078 B]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main python-dev amd64 2.7.5-5ubuntu3 [1166 B]
Err http://archive.ubuntu.com/ubuntu/ trusty-security/main libpython2.7 amd64 2.7.6-8ubuntu0.2
  404  Not Found [IP: 91.189.88.149 80]
Err http://archive.ubuntu.com/ubuntu/ trusty-security/main libpython2.7-dev amd64 2.7.6-8ubuntu0.2
  404  Not Found [IP: 91.189.88.149 80]
Err http://archive.ubuntu.com/ubuntu/ trusty-security/main python2.7-dev amd64 2.7.6-8ubuntu0.2
  404  Not Found [IP: 91.189.88.149 80]
Fetched 123 kB in 7s (17.5 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7_2.7.6-8ubuntu0.2_amd64.deb  404  Not Found [IP: 91.189.88.149 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python2.7/libpython2.7-dev_2.7.6-8ubuntu0.2_amd64.deb  404  Not Found [IP: 91.189.88.149 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7-dev_2.7.6-8ubuntu0.2_amd64.deb  404  Not Found [IP: 91.189.88.149 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ERROR: Service 'python' failed to build: The command '/bin/sh -c apt-get install -y python-dev' returned a non-zero code: 100

Adding a RUN apt-get update to Dockerfile-python fixes that error. Run it again and you get

Step 3 : COPY ./bin/service /usr/local/bin/srv
ERROR: Service 'grpc' failed to build: lstat bin/service: no such file or directory

This change to Dockerfile-grpc seems to fix the second error:

-COPY ./bin/service /usr/local/bin/srv
+COPY ./service /usr/local/bin/srv

Run it again and the docker-compose up --build -d command completes succesfully, but the grpcbridge_python_1 container has failed:

$> docker-compose ps
       Name                      Command               State     Ports
------------------------------------------------------------------------
grpcbridge_grpc_1     /bin/sh -c /etc/grpc_start       Up       9211/tcp
grpcbridge_python_1   /bin/sh -c /usr/local/bin/ ...   Exit 1
$> docker logs df2aa3102251
[2017-01-05 19:26:30.138][7][notice][main] initializing epoch 0 (hot restart version=3.2490504)
[2017-01-05 19:26:30.152][7][notice][main] admin port: 9901
[2017-01-05 19:26:30.156][7][notice][config] loading 1 listener(s)
[2017-01-05 19:26:30.156][7][notice][config] listener #0:
[2017-01-05 19:26:30.156][7][notice][config]   port=9001
[2017-01-05 19:26:30.156][7][notice][config]   filter #0:
[2017-01-05 19:26:30.156][7][notice][config]     type: read
[2017-01-05 19:26:30.156][7][notice][config]     name: http_connection_manager
[2017-01-05 19:26:30.157][7][emerg][main] error initializing configuration '/etc/s2s-python-envoy.json': Not supported field in RequestInfo: RESPONSE_FLAGS

I removed %RESPONSE_FLAGS% from config/s2s-python-envoy.json to work around that error. Now both containers come up and the docker-compose exec python /client/client.py set foo bar command works, but docker-compose exec python /client/client.py get foo fails with a new error which I will make a separate issue for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions