Question / Help Failed to connect to server (my own RTMP server)

stackers

New Member
EDIT: I have resolved this. Had to reset my router and re-setup the port forwarding.

I am trying to stream to an RTMP server from OBS. I am running the server myself with nginx on windows.

When I enter my loopback IP address as the server (eg rtmp://127.0.0.1/live), it works fine. Same with using my local ip address.

But if I enter my public IP address (or if someone from an external network enters it), I get the failed to connect to server error message.


If I test the port with an online tool with my public IP and port 1935 (same as defined for my server in nginx), it says the port is open.

Here is what the log file from OBS looks like: (replaced my ip with 000.000.000.000)
21:56:54.224: [rtmp stream: 'simple_stream'] Connecting to RTMP URL rtmp://000.000.000.000:1935/live...
21:56:54.224: [rtmp stream: 'simple_stream'] Interface: Hyper-V Virtual Ethernet Adapter #4 (ethernet, 1000 mbps)
21:56:56.230: 000.000.000.000:1935/live is offline. Try a different server (ECONNREFUSED).
21:56:56.230: [rtmp stream: 'simple_stream'] Connection to rtmp://000.000.000.000:1935/live failed: -2
21:56:56.230: ==== Streaming Stop ================================================
 
Last edited:

Narcogen

Active Member
Did you configure your router to port forward 1935 to the computer running NGINX? Because I don't see you mentioning that, and that is a necessary step.

It's also possible you configured NGINX to only work on the LAN (binding to local IP only) instead of all available interfaces.
 
Top