Noxalus / Multi-Streaming-Server

A NGINX server with RTMP module to send video streaming to multiple services simultaneously (Youtube, Twitch, Dailymotion, Hitbox, Beam, etc...).
173 stars 41 forks source link

Nginx not starting with "vagrant up" #3

Closed sigvenss closed 8 years ago

sigvenss commented 8 years ago

The setup is working great, and im streaming to 3 different streaming services!

But i just have a quick question:

When ill start streaming do i have to run "vagrant up" and then "vagrant provision" to get the VM up and Nginx starting?

If i only run vagrant up, it does not start Nginx, but if i do "vagrant provision" it starts checking for VM updates, and then it starts Nginx. Do you have any tips on how i should start the VM and Nginx without downloading ALOT of updates everytime i wanna stream?

sigvenss commented 8 years ago

I contacted Noxalu by email and i got this answer:

When you do a "vagrant up" for the first time, it automatically runs a "vagrant provision", so you shouldn't have to run "vagrant provision" yourself.

All you need to do is a "vagrant up" when you want to launch the Nginx RTMP server. If you look at the bootstrap.sh script (here => https://github.com/Noxalus/Multi-Streaming-Server/blob/master/bootstrap.sh#L49), you can see that we set the script to launch Nginx at startup. So when you turn on your VM (via "vagrant up"), it should launch the Nginx RTMP server automatically. If it's not the case, it's a bug.

What you can do is to ssh you on the VM (via "vagrant ssh") and launch the service manually with this command: sudo service nginx start.

Doing vagrant SSH did not work for me since im running it on windows, got error that it could not find an ssh client. But i started VirtualBox and logged in to the VM manually. Then i ran the command you suggested(sudo service nginx start) and now it works great :)

Noxalus commented 8 years ago

I'm on Windows too, but I use Cygwin (with OpenSSH module) so I can run "vagrant ssh".

But it's not the ideal solution, I will try to find out why it doesn't work as expected.

I now it's also possible to execute some shell commands at "vagrant up" updating the Vagrant file, it can be a better temporary solution.

Currently, I'm not on my environment, so I need to install all dependencies, but I will come back to you when I have more information.

Noxalus commented 8 years ago

Ok, I've just tested, and it seems to work as expected for me.

When I run vagrant up, I can directly connect to the RTMP server with OBS. If I run vagrant halt, I'm disconnected, but if I run vagrant up again, OBS will reconnect automatically when the VM is up.

What made you say that the RTMP server was not launched after a vagrant up? You couldn't connect to it with OBS after a vagrant up?

dwbstreet commented 8 years ago

Thanks in advance for all your efforts. I am having difficulties. When I run vagrant up from cmd everything appears to initialize. Then after it forwards ports it tries to ssh into the VM. "This may take a few minutes..." It times out every time. Please advise. I installed Virtual Box and Vagrant on Windows 10 64 and further installed the Mainline nginx. Thanks so much.

Noxalus commented 8 years ago

Hello @dwbstreet, can you give me the versions of VirtualBox and Vagrant that you use (I've just tested it a few minutes ago, and I don't have th problem. I use VirtualBox 5.0.16 and Vagrant 1.8.1).

dwbstreet commented 8 years ago

Greetings,

Thanks so much for the prompt reply. I am using Oracle VM Virtual Box Version 5.1.2 r 108956 Vagrant 1.8.5

dwbstreet commented 8 years ago

Just saw this error on Virtual Box. VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.

Noxalus commented 8 years ago

Indeed, you need to enable virtualization in your BIOS to use VirtualBox properly. A lot of tutorial show you how to do it on the net (this one for example).

dwbstreet commented 8 years ago

thanks so much, I am searching the BIOS

dwbstreet commented 8 years ago

The machine is now launching properly! Thank you. Now, I am not able to configure the nginx.conf properly. Could you specify which lines need to be altered to my inputs, please. I have grown extremely frustrated, although I have learned.