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

[Docker][ShopBundle] Error: listen EADDRINUSE: address already in use :::35729 #361

Closed
FabienSalles opened this issue Jul 16, 2019 · 6 comments
Labels
Docker Docker-related issues and PRs.

Comments

@FabienSalles
Copy link

Hello,

When we retrieve this project and we launch docker-compose up we can see this error :

vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js) 
Error: listen EADDRINUSE: address already in use :::35729
    at Server.setupListenHandle [as _listen2] (net.js:1279:14)
    at listenInCluster (net.js:1327:12)
    at Server.listen (net.js:1414:7)
    at Server.listen (/srv/sylius/node_modules/tiny-lr/src/server.js:264:19)
    at Function.exports.listen (/srv/sylius/node_modules/gulp-livereload/index.js:95:18)
    at watchShop (/srv/sylius/vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js:238:14)
    at bound (domain.js:402:14)
    at runBound (domain.js:415:12)
    at asyncRunner (/srv/sylius/node_modules/async-done/index.js:55:18)
    at process._tickCallback (internal/process/next_tick.js:61:11)

This is due to the fact that nodejs container use the command yarn watch in the Dockerfile.

This task launch 2 sub-tasks that used livereload.listen() without specified any ports (
in vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/gulpfile.babel.js and vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/gulpfile.babel.js ).

In order to fix this we have to specify one different port in one of these sub-tasks or change the command executed by the Dockerfile.

@roelvanhoof
Copy link

@FabienSalles did you manage to find a solution for this problem? I just started with Sylius and am running into the same problem

@lchrusciel lchrusciel added the Docker Docker-related issues and PRs. label May 22, 2020
@mjainta
Copy link

mjainta commented Jun 23, 2020

Can confirm, looks the same for me on a fresh installation.

@ithrasil
Copy link

Anyone found solution?

@FabienSalles
Copy link
Author

@roelvanhoof sorry for my late response and no, I didn't find a solution because I installed Sylius distribution just for testing it.

At the time I had to develop an ecommerce website without the front end and the sylius administration so I didn't waste much time on it.

I saw the same problem when I recently dockerized the plugin skeleton using the docker configuration of the distribution but this does not prevent the application from working

@olimination
Copy link

We faced the same issue with v1.9.

We used the workaround to simply comment out the nodejs service in the docker-compose.yml file. We don't need the nodejs container with the yarn watch command, so therefore it is enough for us to execute yarn install && yarn build directly in the project root folder before we start the docker-compose services.

@Ferror
Copy link
Contributor

Ferror commented May 31, 2022

It has changed - production compose command is yarn build and development is yarn watch

@Ferror Ferror closed this as completed May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Docker-related issues and PRs.
Projects
None yet
Development

No branches or pull requests

7 participants