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

When deploying SRS with Docker, the service for mapping external configuration files cannot be started. #1594

Closed
keyue0459 opened this issue Feb 7, 2020 · 2 comments
Assignees
Labels
Enhancement Improvement or enhancement. TransByAI Translated by AI/GPT.
Milestone

Comments

@keyue0459
Copy link

keyue0459 commented Feb 7, 2020

After pulling the ossrs/srs:3 image from Docker, you can directly run the container in the following way. The service can be started normally, even if the -d parameter is added.
docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:3
However, if you map your own external configuration file, the service will not start properly, even if the external configuration file is the same as the default configuration file in the image.
docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 -v /path/of/yours.conf:/usr/local/srs/conf/srs.conf ossrs/srs:3

There is no error message in the logs either. Adding -it to run the container interactively, the mapped configuration file is fine. Manually executing ./objs/srs -c conf/srs.conf can also start the service normally. It seems that the container automatically exits after executing the SRS startup command.

After being reminded by a senior in the DingTalk group, I added the following parameters to my external configuration file to disable the daemon mode:
daemon off;
After running the container again, the problem was resolved. I'm recording this for reference for other students who may encounter the same issue!

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Feb 8, 2020

👍 Under docker and k8s, SRS needs to make corresponding changes, such as setting the daemon to default off under docker. I will improve this in SRS4.

TRANS_BY_GPT3

@winlinvip winlinvip added this to the SRS 4.0 release milestone Feb 8, 2020
@winlinvip winlinvip added the Enhancement Improvement or enhancement. label Feb 8, 2020
@winlinvip
Copy link
Member

winlinvip commented Mar 12, 2020

Add configuration, default to on, automatically disable daemon in docker:

# Whether disable daemon for docker.
# If on, it will set daemon to off in docker, even daemon is on.
# default: on
disable_daemon_for_docker on;

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Sep 5, 2021
@winlinvip winlinvip changed the title Docker部署SRS时映射外部配置文件服务无法启动 When deploying SRS with Docker, the service for mapping external configuration files cannot be started. Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement or enhancement. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants