Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

little bug on YouPHPTube-Encoder-Network #8

Open
maxlinux2000 opened this issue Sep 28, 2019 · 9 comments
Open

little bug on YouPHPTube-Encoder-Network #8

maxlinux2000 opened this issue Sep 28, 2019 · 9 comments

Comments

@maxlinux2000
Copy link

When the network server and an encoder reside on the same server, the network believes that the encoder is offline, even if it is working.
I guess the ping is too low, and this is why the network declares the encoder offline.
Have a look to the picture below at the ping values

Captura de pantalla de 2019-09-28 14-25-55

@maxlinux2000 maxlinux2000 changed the title little mistake on YouPHPTube-Encoder-Network little bug on YouPHPTube-Encoder-Network Sep 28, 2019
@akhilleusuggo
Copy link

Well , that's not true . I have the encoder and network-encoder on the same server with 0.0018ms and still showing online

@DanielnetoDotCom
Copy link
Member

@maxlinux2000 maybe there is something blocking the network to ping itself

@maxlinux2000
Copy link
Author

I don `t believe it.
I have added another server from another network (digitalocean in a germany vps) and it does the same. It is offline, even if it works perfectly.
By the way the server "en3" runs on ubuntu 16.04 while the other two on ubuntu 18.04.
I know it has nothing to do, but it's weird.
Nor is it important ... it really works and ffmpeg does its job. It is just a curiosity.

But what does the network aggregator consider important to mark a server, such as "online"?

Captura de pantalla de 2019-09-30 21-15-01

@DanielnetoDotCom
Copy link
Member

Ido not have it on the top of my mind, but I am pretty sure is the serverStatus request

image

@maxlinux2000
Copy link
Author

here the pictures of inpector (chrome this time) while en2 is encoding

Captura de pantalla de 2019-10-01 14-37-34

@DanielnetoDotCom
Copy link
Member

you have to look into the server status response of the offline encoder, if is possible open the request in a new tab (right click)

@maxlinux2000
Copy link
Author

Hi, here the answer of server:

Access to XMLHttpRequest at 'https://en2.iesus.win/serverStatus' from origin 'https://network.iesus.win' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed.

Captura de pantalla de 2019-11-14 19-25-05

How to fix it?

@maxlinux2000
Copy link
Author

maxlinux2000 commented Nov 14, 2019

OK Daniel

I think that we can fix this bug commenting one line in the Encoder-server at view/status.php.
Just comment the header line

<?php
//header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
require_once dirname(__FILE__) . '/../videos/configuration.php';

Captura de pantalla de 2019-11-16 16-04-12

@DanielnetoDotCom
Copy link
Member

Thanks for sharing this.

I am just afraid that will break something else.

some times I am in circles with the Cors and Access-Control-Allow-Origin issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants