Fenrirthviti / stream-site

Rachni - nginx RTMP streaming front end
Other
197 stars 71 forks source link

Connection refused when configured with SSL (self-signed) #40

Open super23n opened 4 years ago

super23n commented 4 years ago

Hello, I have first tried this without SSL/HTTPS and it works good. It seems it should be able to support SSL too, so I am using a self-signed certificate/key files. But now every time I connect with RTMP to publish a stream, I get this in error.log:

[error] 19813#19813: recv() failed (111: Connection refused)

I am not able to connect. I have tried both OBS and ffmpeg to publish. The ffmpeg publish command that I use is:

ffmpeg -re -i "file.mp4" -c copy -f flv "rtmp://192.168.56.53/live/user1?key=KEY-VALUE"

the ffmpeg response is:

Input/output error

Nginx is listening on port 443 and all SSL settings are present. It is strange that connection is being refused by RTMP (port 1935), while SSL is configured for HTTP (port 443).. Do you know what is wrong? Also, I had to add some extra code to the config.php file, namely:

$_SERVER['HTTPS'] = 'off'; or 'on'. Otherwise it was undefined.

Fenrirthviti commented 4 years ago

Are you talking about RTMPS? The RTMP portion and the HTTP portion are effectively two different services.