Open dockter-84 opened 7 years ago
However, the following did work:
docker-compose run -e DEMO_LANG=python client
I remember writing a response here, but now that I'm going around cleaning up open issues, I see I must have never hit the submit button.
The nodejs client example does work for me, but not on the first run. There's a timing issue between the KG server being ready to receive requests and the client making the request. Running the client after the other containers are ready always works.
I don't think docker-compose supports bringing up two out of three containers in the initial up. That would be the simplest fix. Other potential approaches include documenting this behavior, adding a (flaky) sleep to the client, having the client retry the request some number of times.
The node_client_example
is giving me the following error:
Nicolass-MacBook-Pro:node_client_example nicolasscozzaro$ docker-compose up
Creating network "node_client_example_default" with the default driver
Creating node_client_example_kernel_gateway_1 ... error
ERROR: for node_client_example_kernel_gateway_1 Cannot start service kernel_gateway: b'driver failed programming external connectivity on endpoint node_client_example_kernel_gateway_1 (58d04c3cf7a16107cf9a681097d004f96d188120a7688dfed9bccaf35d3de153): Bind for 0.0.0.0:8888 failed: port is already allocated'
ERROR: for kernel_gateway Cannot start service kernel_gateway: b'driver failed programming external connectivity on endpoint node_client_example_kernel_gateway_1 (58d04c3cf7a16107cf9a681097d004f96d188120a7688dfed9bccaf35d3de153): Bind for 0.0.0.0:8888 failed: port is already allocated'
When following the instruction on https://github.com/jupyter/kernel_gateway_demos/blob/master/node_client_example/README.md, the following error is returned: