[英]Mongod not running.. E NETWORK [initandlisten] listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:27017
[英]rtmp nodejs server config on NGINX _ nginx: [emerg] bind() to 0.0.0.0:1935 failed (98: Address already in use)
我在端口 1935 上運行媒體服務器。
我有一個子域: “streaming.foo.com”
我需要配置 Nginx 來訪問rtmp://streaming.foo.com
我用這個博客嘗試了 RTMP Nginx 插件:
https://www.nginx.com/blog/video-streaming-for-remote-learning-with-nginx/
並配置/etc/nginx/nginx.conf文件。
rtmp {
server {
listen 1935;
application live {
live on;
dash on;
dash_path /tmp/dash; // what is this config??
dash_fragment 15s;
}
}
}
但我從 nginx 收到此錯誤:
nginx[176987]: nginx: [emerg] bind() to 0.0.0.0:1935 failed (98: Address already in use)
它是RTMP
,而不是HTTP
。 Nginx是web服務器,只能代理和平衡HTTP
。 它不是一般的代理服務器。
使用通用代理或負載均衡器,例如HA Proxy
。
您不能讓兩個服務在同一個端口上偵聽。
常見的解決方案是在另一個端口(比如說 19350)上配置真實服務(您的媒體服務),而不是在 nginix 上配置反向代理以將請求從暴露端口(在本例中為 1935)轉發到后端服務(19350)在我們的示例中)。
抱歉,我不知道 nginix(我將此配置與 apache 一起使用),所以我無法幫助您了解如何在其上配置反向代理。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.