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

Using --scale causes the IP of the api container to be used #31

Open
DyLaiT opened this issue May 3, 2022 · 0 comments
Open

Using --scale causes the IP of the api container to be used #31

DyLaiT opened this issue May 3, 2022 · 0 comments

Comments

@DyLaiT
Copy link

DyLaiT commented May 3, 2022

Hi,
Just a small boot sequence issue.

When I execute scalable function, api container will get error "
Address already in use".

~/lisa$ docker-compose up --scale worker=10
Recreating lisa_worker_1  ... done
Recreating lisa_worker_2  ... done
Recreating lisa_worker_3  ... done
Recreating lisa_worker_4  ... done
Recreating lisa_worker_5  ... done
Recreating lisa_worker_6  ... done
Recreating lisa_worker_7  ... done
Recreating lisa_worker_8  ... done
Recreating lisa_worker_9  ... done
Recreating lisa_worker_10 ... done
Starting lisa_mariadb_1   ... done
Starting lisa_rabbitmq_1  ... done
Recreating lisa_api_1     ... error

ERROR: for lisa_api_1  Cannot start service api: Address already in use

ERROR: for api  Cannot start service api: Address already in use
ERROR: Encountered errors while bringing up the project.

Here I think it is because api has set ipv4 and depends_on worker in advance, which causes worker to occupy the IP first after it starts.
So I made worker wait for api to finish booting before starting.

api:
    image: lisa-api
    depends_on:
      - rabbitmq

worker:
    image: lisa-worker
    depends_on:
      - api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant