WWBN / AVideo

Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
https://avideo.tube/AVideo_OpenSource
Other
1.89k stars 972 forks source link

Fresh Install YPT socket will not connect #8987

Closed milehighkaraoke closed 5 months ago

milehighkaraoke commented 5 months ago

i have my port 2053 open and the socket will not connect. I tried several random ports and opened them up in my firewall and regardless the port i use i am returning a 15-Apr-2024 12:06:11 Africa/Abidjan] PHP Fatal error: Uncaught RuntimeException: Failed to listen on "tcp://0.0.0.0:12053": Address already in use (EADDRINUSE) in path/to/my/streamer/site/vendor/react/socket/src/TcpServer.php:184 [15-Apr-2024 08:33:43 America/Denver] PHP Fatal error: Uncaught RuntimeException: Failed to listen on "tcp://0.0.0.0:2053": Address already in use (EADDRINUSE) in path/to/my/streamer/site/vendor/react/socket/src/TcpServer.php:184

what am i missing @DanielnetoDotCom ?

DanielnetoDotCom commented 5 months ago

Maybe it is already running but it is just not connecting due to your firewall.

for testing, I recommend you to completely disable the firewall and test it.

milehighkaraoke commented 5 months ago

ufw is inactive

DanielnetoDotCom commented 5 months ago

but if is already in use, try to find out what is running on it Google to learn how to kill it

but I suspect it is already running, and for some other reason, you are not connecting to it.

milehighkaraoke commented 5 months ago

php is running on whatever port i put in the ypt socket plugin

milehighkaraoke commented 5 months ago

Do I need to add the path to certificates anywhere else besides nginx

DanielnetoDotCom commented 5 months ago

Yes, the certificate must be valid

Try to stop the socket before run again

When you run with the command line you can see if the certificate is valid or not

milehighkaraoke commented 5 months ago

they are valid....... i am asking if i need to enter their path on any other configurations or if it is just the nginx where they need their path to be configured

milehighkaraoke commented 5 months ago

Yes it was running 20240415_092114

milehighkaraoke commented 5 months ago

Restarted and it says same thing 20240415_092451

milehighkaraoke commented 5 months ago

20240415_093007

DanielnetoDotCom commented 5 months ago

I can see this is running,

If you killed it and it still not working, something else is running it.

sorry I am not aware about this error, there is no much I can do and I am pretty sure it is something in your network

milehighkaraoke commented 5 months ago

new install, this server is the only thing running on the network and AVideo is the only php that i am using.

mhk@localhost:~/Desktop$ sudo lsof -i -P -n | grep LISTEN [sudo] password for mhk: systemd-r 424 systemd-resolve 14u IPv4 21695 0t0 TCP 127.0.0.53:53 (LISTEN) cupsd 584 root 6u IPv6 20408 0t0 TCP [::1]:631 (LISTEN) cupsd 584 root 7u IPv4 20409 0t0 TCP 127.0.0.1:631 (LISTEN) apache2 679 root 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 679 root 6u IPv6 24008 0t0 TCP :443 (LISTEN) mysqld 681 mysql 21u IPv4 24180 0t0 TCP 127.0.0.1:33060 (LISTEN) mysqld 681 mysql 24u IPv4 24650 0t0 TCP 127.0.0.1:3306 (LISTEN) apache2 694 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 694 www-data 6u IPv6 24008 0t0 TCP :443 (LISTEN) apache2 696 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 696 www-data 6u IPv6 24008 0t0 TCP :443 (LISTEN) apache2 697 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 697 www-data 6u IPv6 24008 0t0 TCP :443 (LISTEN) apache2 1359 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 1359 www-data 6u IPv6 24008 0t0 TCP :443 (LISTEN) php 2096 mhk 5u IPv4 29441 0t0 TCP :2053 (LISTEN) apache2 2134 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 2134 www-data 6u IPv6 24008 0t0 TCP :443 (LISTEN) apache2 2148 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 2148 www-data 6u IPv6 24008 0t0 TCP :443 (LISTEN) apache2 2150 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 2150 www-data 6u IPv6 24008 0t0 TCP :443 (LISTEN) apache2 2222 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 2222 www-data 6u IPv6 24008 0t0 TCP :443 (LISTEN) apache2 2268 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 2268 www-data 6u IPv6 24008 0t0 TCP :443 (LISTEN) apache2 3166 www-data 4u IPv6 24004 0t0 TCP :80 (LISTEN) apache2 3166 www-data 6u IPv6 24008 0t0 TCP *:443 (LISTEN) mhk@localhost:~/Desktop$

milehighkaraoke commented 5 months ago

20240415_102544

GreenDragonTavern commented 5 months ago

@milehighkaraoke - Is Apache only listening on IP6? YTPSocket with IP4 of 0.0.0.0 will use an unsecured connection on localhost and secured connection on whatever IP address is defined for mhktube.com...using IP4 only. BTW, what does sudo netstat -nap | grep apache come back with?

DanielnetoDotCom commented 5 months ago

whatever is using it, kill it

if you want to avoid the auto start, comment out the scheduler from the crontab

after resolving the ports issue put the scheduler back in the crontab

milehighkaraoke commented 5 months ago

@DanielnetoDotCom So, the only way I can get socket to run is to start it in the terminal and let the terminal open. As soon as I shut the terminal is disconnects.

milehighkaraoke commented 5 months ago

@GreenDragonTavern 20240417_035440

milehighkaraoke commented 5 months ago

@DanielnetoDotCom And now it is randomly connecting without starting it in terminal 20240417_051141 20240417_051141

milehighkaraoke commented 5 months ago

After starting on its own, I did a reboot and it decides it does not want to connect again. What am I missing? 17133534758122948006541475011037

DanielnetoDotCom commented 5 months ago

make sure you add the crontab as root

sudo crontab -eu root

The crontab

This will start the socket

@reboot sleep 60; && nohup php /var/www/html/AVideo/plugin/YPTSocket/server.php &

This will run the watchdog, so if the socket is not started, it will be started check this

* * * * * php /var/www/html/AVideo/plugin/Scheduler/run.php
milehighkaraoke commented 5 months ago

If I use this for install it works everything without fail. Unfortunately this one is laced with bad links and outdated php so I have to change lines as I install. How to install LAMP, FFMPEG and Git on a fresh Ubuntu 18.x for AVideo Platform version 4.x or newer

Now going to this new installation code under Wiki and using the complete installation with all the new links and updated php yields this connection ypt socket and nginx auto start issues How to install LAMP, FFMPEG and Git on a fresh Ubuntu 22.x for AVideo Platform version 11.x or newer

The newest installation code is so much faster so it would really be a blessing if we could figure out what's going on wth this so i do not have to waste a complete day using the old installation method..... Thank you @DanielnetoDotCom

milehighkaraoke commented 5 months ago

20240417_173723 20240417_161737

milehighkaraoke commented 5 months ago

latest image installed and worked!!!!