arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.45k stars 3.51k forks source link

Windows Server 2016 blocks RTMP packets after 30s killing connection #1309

Open reedog117 opened 6 years ago

reedog117 commented 6 years ago

I am attempting to stream RTMP data to an nginx-rtmp server running on Windows, but the built-in, unable to be disabled Port Scanning Prevention Filter (part of Windows Advanced Firewall) blocks my stream after ~30s killing the connection. This is when a 7500kbps stream is being published. I noticed that this happens even faster with higher bitrate streams, but with lower bitrate streams it takes longer, or sometimes doesn't cut off at all. I have explicit rules both to allow 1935 TCP as well as the nginx.exe app specifically, yet this still happens. This is a Windows Server 2016 server running in a virtualized environment.

Windows Security Event Viewer entry:

The Windows Filtering Platform has blocked a packet.

Application Information:
    Process ID:     0
    Application Name:   -

Network Information:
    Direction:      Inbound
    Source Address:     x.x.x.x
    Source Port:        50881
    Destination Address:    10.64.65.133
    Destination Port:       1935
    Protocol:       6

Filter Information:
    Filter Run-Time ID: 70322
    Layer Name:     Transport
    Layer Run-Time ID:  13
cptrodgers commented 6 years ago

What specs (cpu, ram) you approve for your virtual machine ?

reedog117 commented 6 years ago

Xeon E5-2630 v3 2.4Ghz x 6 cores, 16GB RAM

cptrodgers commented 6 years ago

Can you give me your conf nginx-rtmp file. Because i push 5000kbps with 2vcores and 4gb ram without stuck.

reedog117 commented 6 years ago

It's a pretty simple one

worker_processes  1;

error_log  logs/error.log debug;

events {
    worker_connections  1024;
}

rtmp {
    server {
        listen 1935;

        application live {
            live on;
            publish_notify on;
            play_restart on;
            idle_streams on;
            drop_idle_publisher 10s;
        }       
    }
}

http {
    server {
        listen      8080;

        location / {
            root html;
        }

        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }

        location /stat.xsl {
            root html;
        }       
    }
}