Closed psegovias closed 6 years ago
Did you allow your IP address from the Nginx configuration?
Make sure you replaced {{ my_ip_address }}
here by the one specified in the error log:
*256 access forbidden by rule, client: MY-IP, server: 0.0.0.0:1935
This way?
allow publish X.X.X.X;
OR ?
allow publish {{ X.X.X.X }};
This way:
allow publish X.X.X.X;
I should post a real Nginx config file example in the Wiki, it would be clearer.
Stream working perfect on Twitch, but not /LIVE on dedicated server site here's my log:
2018/03/14 22:07:00 [info] 10190#0: *3 relay: create push name='' app='' playpath='' url='localhost/youtube/${name}', client: MY-IP, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *3 relay: create push name='' app='' playpath='' url='localhost/youtube/${name}', client: MY-IP, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *3 relay: create push name='' app='' playpath='' url='localhost/dailymotion/${name}', client: MY-IP, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *3 relay: create push name='' app='' playpath='' url='localhost/dailymotion/${name}', client: MY-IP, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *3 relay: create push name='' app='' playpath='' url='localhost/hitbox/${name}', client: MY-IP, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *3 relay: create push name='' app='' playpath='' url='localhost/hitbox/${name}', client: MY-IP, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *468 client connected '127.0.0.1'
2018/03/14 22:07:00 [info] 10190#0: *468 client connected '127.0.0.1'
2018/03/14 22:07:00 [info] 10190#0: *469 client connected '127.0.0.1'
2018/03/14 22:07:00 [info] 10190#0: *469 client connected '127.0.0.1'
2018/03/14 22:07:00 [info] 10190#0: *470 client connected '127.0.0.1'
2018/03/14 22:07:00 [info] 10190#0: *470 client connected '127.0.0.1'
2018/03/14 22:07:00 [info] 10190#0: *470 connect: app='hitbox' args='' flashver='LNX.11,1,102,55' swf_url='' tc_url='rtmp://localhost/hitbox' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *470 connect: app='hitbox' args='' flashver='LNX.11,1,102,55' swf_url='' tc_url='rtmp://localhost/hitbox' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *470 connect: application not found: 'hitbox', client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *470 connect: application not found: 'hitbox', client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *469 connect: app='dailymotion' args='' flashver='LNX.11,1,102,55' swf_url='' tc_url='rtmp://localhost/dailymotion' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *469 connect: app='dailymotion' args='' flashver='LNX.11,1,102,55' swf_url='' tc_url='rtmp://localhost/dailymotion' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *469 connect: application not found: 'dailymotion', client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *469 connect: application not found: 'dailymotion', client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *468 connect: app='youtube' args='' flashver='LNX.11,1,102,55' swf_url='' tc_url='rtmp://localhost/youtube' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *468 connect: app='youtube' args='' flashver='LNX.11,1,102,55' swf_url='' tc_url='rtmp://localhost/youtube' page_url='' acodecs=3575 vcodecs=252 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *468 connect: application not found: 'youtube', client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *468 connect: application not found: 'youtube', client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *470 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *470 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *470 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *470 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *469 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *469 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *469 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *469 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *468 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *468 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *468 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *468 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935
2018/03/14 22:07:00 [info] 10190#0: *467 disconnect, client: localhost/hitbox/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *467 disconnect, client: localhost/hitbox/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *467 deleteStream, client: localhost/hitbox/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *467 deleteStream, client: localhost/hitbox/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *466 disconnect, client: localhost/dailymotion/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *466 disconnect, client: localhost/dailymotion/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *466 deleteStream, client: localhost/dailymotion/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *466 deleteStream, client: localhost/dailymotion/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *465 disconnect, client: localhost/youtube/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *465 disconnect, client: localhost/youtube/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *465 deleteStream, client: localhost/youtube/${name}, server: ngx-relay
2018/03/14 22:07:00 [info] 10190#0: *465 deleteStream, client: localhost/youtube/${name}, server: ngx-relay
What do you mean by /LIVE
?
The live
application in the Nginx configuration file is just here to transmit your stream to other services.
Can you show me you nginx.conf
file (without your stream keys or your ip address), it seems you removed application blocks for Hitbox, Youtube and Dailymotion but you still push the RTMP stream to them in the live
application.
Sorry I misunderstood the /live link on readme.
Here's my config file:
#user nobody;
worker_processes 1;
error_log logs/error.log debug;
error_log logs/error.log notice;
error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
# rtmp stat
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
# you can move stat.xsl to a different location
root html;
}
# rtmp control
location /control {
rtmp_control all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
rtmp {
server {
listen 1935;
chunk_size 8192;
application live {
live on;
record off;
allow publish X.X.X.X;
deny publish all;
push rtmp://localhost/facebook/${name};
exec ffmpeg -i rtmp://localhost/$app/$name -c:v libx264 -preset veryfast -c:a copy
-threads 2
-c:v libx264
-profile:v main
-preset:v veryfast
-level 4.2
-b:v 2000k
-bufsize 2000k
-maxrate 2000k
-s 1280x720 -r 30
-g 120 -keyint_min 60 -x264opts "keyint=120:min-keyint=120:no-scenecut"
-tune zerolatency
-c:a copy
-f flv
rtmp://localhost/twitch/${name};
}
application twitch {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://live-cdg.twitch.tv/app/XXXXt;
}
application facebook {
live on;
record off;
allow publish 127.0.0.1;
deny publish all;
push rtmp://live-api.facebook.com:80/rtmp/XXXXX;
}
}
}
Nothing wrong in your nginx.conf
, are you sure that is this one that Nginx uses? (I don't see any references to Hitbox, Youtube and Dailymotion as mentionned by the log file)
So, when you say Twitch stream is working well, it's using its RTMP URL directly into OBS?
Make sure that the RTMP URL contains the IP of your dedicated server: rtmp://X.X.X.X:1935/live
You can also try to restart Nginx to make sure the configuration file are reloaded: /etc/init.d/nginx start
Config works fine, last night i test twitch and facebook at the same time, no problem at all, is weird the references to hitbox or youtube, im using the nginx.conf from nginx/conf on the projects folder.
So you don't have any problem anymore? What did you change?
Can I close this issue?
i only restart the server and works.... Thanks for your time @Noxalus now i go for https://github.com/Noxalus/Live-Stream-Chat-Retriever 👍
Fresh install i got the server running, but obs go into restart loop.
Here my log files