Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale command is not creating the network #2602

Closed
arun-gupta opened this issue Jan 4, 2016 · 9 comments
Closed

Scale command is not creating the network #2602

arun-gupta opened this issue Jan 4, 2016 · 9 comments

Comments

@arun-gupta
Copy link

Starting a Docker Compose application using the following configuration file:

mycouchbase:
  image: arungupta/couchbase-node

as: docker-compose --x-networking scale mycouchbase=3. Note, this is the direct command given as opposed to docker --x-networking up -d first.

It fails with the following error:

couchbase-node > docker-compose --x-networking scale mycouchbase=3
Creating and starting 1 ... 
Creating and starting 2 ... 
Creating and starting 3 ... 
Pulling mycouchbase (arungupta/couchbase-node:latest)...
swarm-master: Pulling arungupta/couchbase-node:latest...
swarm-node-01: Pulling arungupta/couchbase-node:latest...
swarm-node-02: Pulling arungupta/couchbase-node:latest...
Pulling mycouchbase (arungupta/couchbase-node:latest)...
swarm-node-02: Pulling arungupta/couchbase-node:latest...
swarm-master: Pulling arungupta/couchbase-node:latest...
swarm-node-01: Pulling arungupta/couchbase-node:latest...
Pulling mycouchbase (arungupta/couchbase-node:latest)...
Creating and starting 1 ... error
Creating and starting 2 ... error
Creating and starting 3 ... error

ERROR: for 1  Cannot start container 8b31e0f8fbcf8df6ff90d1a3f26463c93246fbd0309a0fcc22f3becf712b1c56: network couchbasenode not found 
ERROR: for 2  Cannot start container fb08abb750e07b1c5046504363ac7b56d0570f4c2d06d2369da700cea73a0d1e: network couchbasenode not found 
ERROR: for 3  Cannot start container 7859c70ce54ccd3615347fb28a6bf925a75783745705b718944e9c3c17cf292e: network couchbasenode not found 
Removing couchbasenode_mycouchbase_3 ... done
Removing couchbasenode_mycouchbase_1 ... done
Removing couchbasenode_mycouchbase_2 ... done

Scale command should be able to create the network if it does not already exist.

@dnephin
Copy link

dnephin commented Jan 5, 2016

I don't think scale was ever designed to do this. I think this might be another reason to remove it, see #2496.

It's possible we could have scale create the default network if it doesn't already exist.

@arun-gupta
Copy link
Author

+1 on creating default network. Added comments to #2496.

@jpetazzo
Copy link

jpetazzo commented Apr 3, 2016

This seems to reference Compose 1.5.

@arun-gupta do you still experience this issue with Compose 1.6 or 1.7?

Thank you!

@tobilarscheid
Copy link

We experienced the same issue, it's kind of misleading that scale can replace up but then does not create the network.

@hughsw
Copy link

hughsw commented Oct 18, 2016

I experienced the same problem after I upgraded to a version 2 YAML file and dockercloud-haproxy. Using Docker for Mac. docker-compose version 1.8.0, build f3628c7

ERROR: for nginxhhvmdocker_web_2 Cannot create container for service web: network nginxhhvmdocker_default not found

@eromoe
Copy link

eromoe commented May 25, 2017

I met this error by docker-compose scale pyro=1 lda_worker=2 lda_dispatcher=1:

Creating and starting gensimdocker_pyro_1 ... error

ERROR: for gensimdocker_pyro_1  Cannot create container for service pyro: network gensimdocker_default not found
Creating and starting gensimdocker_lda_worker_1 ... error
Creating and starting gensimdocker_lda_worker_2 ... error

ERROR: for gensimdocker_lda_worker_1  Cannot create container for service lda_worker: network gensimdocker_default not found

ERROR: for gensimdocker_lda_worker_2  Cannot create container for service lda_worker: network gensimdocker_default not found
Creating and starting gensimdocker_lda_dispatcher_1 ... error

ERROR: for gensimdocker_lda_dispatcher_1  Cannot create container for service lda_dispatcher: network gensimdocker_default not found

So I tried docker-compose up , without problem.
Then I rerun docker-compose scale pyro=1 lda_worker=2 lda_dispatcher=1, it successed.

This behavious is confused.

@stale
Copy link

stale bot commented Oct 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 10, 2019
@stale
Copy link

stale bot commented Oct 17, 2019

This issue has been automatically closed because it had not recent activity during the stale period.

@stale stale bot closed this as completed Oct 17, 2019
@hariraogotit
Copy link

hariraogotit commented Nov 12, 2021

I met this error by docker-compose scale pyro=1 lda_worker=2 lda_dispatcher=1:

Creating and starting gensimdocker_pyro_1 ... error

ERROR: for gensimdocker_pyro_1  Cannot create container for service pyro: network gensimdocker_default not found
Creating and starting gensimdocker_lda_worker_1 ... error
Creating and starting gensimdocker_lda_worker_2 ... error

ERROR: for gensimdocker_lda_worker_1  Cannot create container for service lda_worker: network gensimdocker_default not found

ERROR: for gensimdocker_lda_worker_2  Cannot create container for service lda_worker: network gensimdocker_default not found
Creating and starting gensimdocker_lda_dispatcher_1 ... error

ERROR: for gensimdocker_lda_dispatcher_1  Cannot create container for service lda_dispatcher: network gensimdocker_default not found

So I tried docker-compose up , without problem. Then I rerun docker-compose scale pyro=1 lda_worker=2 lda_dispatcher=1, it successed.

This behavious is confused.

I too encountered this but solved using the command docker-compose up --scale risk-analysis-service=10 i.e used up and --scale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants