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 - Service could not be created - Address in use #1743

Closed
tomy137 opened this issue Apr 11, 2023 · 4 comments · Fixed by #1748
Closed

Docker - Service could not be created - Address in use #1743

tomy137 opened this issue Apr 11, 2023 · 4 comments · Fixed by #1748
Labels
Milestone

Comments

@tomy137
Copy link

tomy137 commented Apr 11, 2023

How Shlink is set up

Just by this command : docker run -e DEFAULT_DOMAIN=s.test shlinkio/shlink:stable

Summary

When I run this command, the Docker can't short my link :

In ServiceManager.php line 627:
Service with name "Swoole\Http\Server" could not be created. Reason: failed to listen server port[0.0.0.0:8080], Error: Address in use[98]
In HttpServerFactory.php line 117:
failed to listen server port[0.0.0.0:8080], Error: Address in use[98]

I've just followed the "Install using a docker image" documentation.

Seems to be OK with the roadrunner version. No error.

So my questions are : why is it not working with openswoole ? Maybe Docker version as to be choose with roadrunner by default ? Do I need to know differences between the two "flavor" ? I can't manage to find anything in the documentation to help me. Is there something I've missed ?

Thanks in advance for your help.

@acelaya acelaya added bug and removed question labels Apr 11, 2023
@acelaya acelaya added this to the 3.5.4 milestone Apr 11, 2023
@acelaya
Copy link
Member

acelaya commented Apr 11, 2023

You are not doing anything wrong. This is actually a bug.

@acelaya
Copy link
Member

acelaya commented Apr 11, 2023

I would recommend sticking with the roadrunner version though, as there have been other reports on low-level issues which happen with openswoole only, and soon roadrunner will become the default runtime.

@tomy137
Copy link
Author

tomy137 commented Apr 11, 2023

Ok great ! Thanks for your reactivity !

@acelaya
Copy link
Member

acelaya commented Apr 11, 2023

I realized this has been happening for some time, so I guess people using openswoole do not usually create short URLs from the command line.

The reason is that creating a short URL triggers an event to notify a real-time update, which requires using roadrunner jobs or openswoole tasks.

The former only works when done inside an openswoole request, so it sadly needs to be disabled and documented.

Using roadrunner everything should work as expected, and updates should be notified no matter what.

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

Successfully merging a pull request may close this issue.

2 participants