question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OBS - Failed to connect to server when running in docker

See original GitHub issue

Hello,

I’ve been trying for a couple of hours to set up nodetube on my local machine (just to test it out) via docker-compose. I’ve added an extra port for the nodetube container “1935:1935” because I care more about the live streaming aspect of this project, Unfortunately, I couldn’t connect to the live-stream via OBS. Every time I try to start the stream I get the message “Failed to connect to server”.

I went to settings and made sure that I have the right link:

Server:  rtmp://127.0.0.1:1935/live
Stream Key:  /test?key=<my key>

I’ve also looked in the OBS logs and saw this:

14:33:55.946: ------------------------------------------------
14:33:58.007: [rtmp stream: 'simple_stream'] Connecting to RTMP URL rtmp://127.0.0.1:1935/live...
14:33:58.008: [rtmp stream: 'simple_stream'] Interface: Software Loopback Interface 1 (type 24, 1073 mbps)
14:33:58.013: RTMPSockBuf_Fill, remote host closed connection
14:33:58.013: RTMP_Connect1, handshake failed.
14:33:58.013: [rtmp stream: 'simple_stream'] Connection to rtmp://127.0.0.1:1935/live failed: -2
14:33:58.022: ==== Streaming Stop ================================================

I couldn’t see anything in the nodetube container logs (nothing showed up other than the “normal” logs, no errors or warnings).

Could you point out what I’m doing wrong? Thank you very much!

Details about my system: Windows 10 Pro Server: Docker Engine - Community Engine: Version: 20.10.2

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:21

github_iconTop GitHub Comments

2reactions
l1ghtswordcommented, Feb 2, 2021

I plan on it, its a little more complicated then adding a ngnix-rtmp docker container because nodetube expects the stream to be a readable file being created in uploads… Ill see what i can do to remedy that design.

EDIT: very incorrect. the content from HLS is forwarded to the nodetube service directly and authenticated there. recordings is its own directory and separate from uploads entirely.

1reaction
l1ghtswordcommented, Feb 4, 2021

You would need to run it once to have it copy them to the local directory for you. a word of caution, i would advise against changing the env.sample files and instead simply copy and paste them into the root directory and remove the “.sample” at the end.

That way you have a clean reffernce in the event something breaks due to a setting change. Also, env.sample files are subject to change (and get overwritten) as they are template files observed by git. .gitignore only ignores non sample files with the expectation api keys or private settings are in there…

Glad to hear this issue is resolved though, thanks for confirming.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Ways to Fix OBS Studio's "Failed to Connect to Server" Error ...
1. Try Performing Basic Repairs · Right-click on the OBS Studio executable file and choose Properties. · Switch to the Compatibility tab and...
Read more >
Question / Help - Problem with running inside docker
I wrote small app on C to play with and detect and solve error. When I tried to run builded obs inside docker...
Read more >
[SOLVED] OBS Failed to Connect to Server - Appuals.com
Solution 5: Edit the Bind IP Option in the Advanced Network Settings. The OBS application may fail to connect to a server if...
Read more >
GitHub - aler9/rtsp-simple-server
rtsp-simple-server is a ready-to-use and zero-dependency server and proxy that allows users to publish, read and proxy live video and audio streams. Live ......
Read more >
Allow docker container to connect to a local/host postgres ...
PGDATA=/usr/local/var/postgres pg_ctl reload $ docker run -e ... 5: Please use host.docker.internal hostname to connect database from Server ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found