Kurento / bugtracker

[ARCHIVED] Contents migrated to monorepo: https://github.com/Kurento/kurento
46 stars 10 forks source link

RecorderEndpoint http error after upgrade to 6.10.0 #368

Closed johnstonpythian closed 4 years ago

johnstonpythian commented 5 years ago

KMS Version:

Kurento Media Server version: 6.10.0 Found modules: 'core' version 6.10.0 'elements' version 6.10.0 'filters' version 6.10.0

Ubuntu Version

DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"

Client libraries

System description:

I am running your docker image for Kurento 6.10.0

What steps will reproduce the problem?

I create the RecorderEndpoint with options:

{
    type: "RecorderEndpoint",
    params: {
        uri: "http://my-ip:my-port/my-path",
        mediaProfile: "WEBM_VIDEO_ONLY"
    }
},

Where my-ip is a valid IP address and my-port is a 4 digit port number.

I get these error messages in Kurento:

0:02:54.916420014     1 0x7f8608009b80 ERROR                   glib GLib-GObject:0:: g_object_set: assertion 'G_IS_OBJECT (object)' failed
0:02:54.916569771     1 0x7f8608009b80 ERROR         basemediamuxer kmsbasemediamuxer.c:224:kms_base_media_muxer_get_sink:<KmsAVMuxer@0x7f8608007340> No URI handler implemented for "http".
0:02:54.916581820     1 0x7f8608009b80 ERROR         basemediamuxer kmsbasemediamuxer.c:248:kms_base_media_muxer_create_sink_impl:<KmsAVMuxer@0x7f8608007340> No available sink for uri http://my-ip:my-port/my-path
0:02:54.920914238     1 0x7f8608009b80 INFO    KurentoRecorderEndpointImpl RecorderEndpointImpl.cpp:99:RecorderEndpointImpl: Set WEBM VIDEO ONLY profile

It appears to be a regression in 6.10.0 because I can substitute the 6.9.0 container into my stack and I do not get this error and recording works as expected.

j1elo commented 5 years ago

This is a regression introduced during the port to Ubuntu 18.04 (Bionic). Support for CURL (libcurl) was temporarily removed from gst-plugins-bad in this commit due to incompatibility issues, but those never got resolved and the curl support didn't get introduced back.

j1elo commented 5 years ago

Notes extracted from the porting work:

Dependency 'libcurl4-openssl-dev' rejects OpenSSL 1.0... Conflicts: libssl-dev (< 1.1), libssl1.0-dev

... but KMS (and its dependencies) is written against OpenSSL 1.0 API and won't build with 1.1 unless specific upgrade work is done.

Issue severity: BLOCKING.

Possible solution: use this line in debian/control/Build-Depends: libcurl-openssl1.0-dev | libcurl4-openssl-dev

Ideally this will install the Bionic version if building on Bionic, and the Xenial version otherwise. But, in Bionic, 'curl' and 'cmake' tools must be installed in the system to build this project. The problem is that both of these depend on 'libcurl4', and 'libcurl-openssl1.0-dev' depends on 'libcurl3'. 'libcurl4' and 'libcurl3' conflict, they cannot be installed at the same time... so we either get to install the project dependencies, or the tools needed to build the project. Nice (not).

Possible solution: Uninstall curl, cmake and libcurl4. But then resulting gstreamer packages will be incompatible with curl4...

Accepted solution: Temporarily remove 'libcurl4-openssl-dev' from from debian/control/Build-Depends, dropping support for 'curl' plugin. Continue with port to Ubuntu 18.04 and later fix this issue.

So I think the solution to this issue would be to open a new porting project, this time to move Kurento to support both OpenSSL 1.0 and 1.1 at the same time. I've read about this before and is totally doable, but the issue will come not from Kurento code but from the external forks, which instead of modification should actually be upgraded.

Upgrading GStreamer fork is the biggest challenge right now, good news is that it's an ongoing work right now by some awesome contributors to the project.

If there are any other easier solutions for this issue please let us know... workaround ideas are welcomed.

Other reports:

toccacieli commented 5 years ago

Has this bug been addressed with release 6.11?

samhumeau commented 4 years ago

Any updates on that? This problem forbids anyone to use the RecorderEndpoint (except for local storage, which is really not ideal in a prod environment).

KodeZ commented 4 years ago

Has this been addressed? I cannot upgrade as I need to store recordings. My current version has glitchy 720p, whereas the newest versions have 720p working smoothly. Caught between a rock and a hard place here, looking for alternative solutions at the moment, but still hoping this will be sorted soon.

micaelgallego commented 4 years ago

You can store recordings locally and then move them whatever you want.

Un saludo.

Micael Gallego Carrillo Co-director del laboratorio de software CodeURJC Director del Máster Cloud Apps - Coordinador del Grado en Ingeniería Informática Escuela Técnica Superior de Ingeniería Informática (ETSII) Universidad Rey Juan Carlos Madrid (España)

micael.gallego@urjc.esmailto:micael.gallego@urjc.es | Twitter @micael_gallegohttps://twitter.com/micael_gallego | Web: https://gestion2.urjc.es/pdi/ver/micael.gallego

On Fri, Oct 18, 2019 at 8:38 AM Morgan Tørvolt notifications@github.com<mailto:notifications@github.com> wrote:

Has this been addressed? I cannot upgrade as I need to store recordings. My current version has glitchy 720p, whereas the newest versions have 720p working smoothly. Caught between a rock and a hard place here, looking for alternative solutions at the moment, but still hoping this will be sorted soon.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Kurento/bugtracker/issues/368?email_source=notifications&email_token=AAIF2KD75YUTLJA3MQYFKXTQPFKXDA5CNFSM4HHYCRGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBS5GSY#issuecomment-543544139, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIF2KFHTCZQV46S5DZ7DNDQPFKXDANCNFSM4HHYCRGA.

BrianG13 commented 4 years ago

any updates??

micaelgallego commented 4 years ago

We are sorry, but http protocol is broken in RecordingEndpoint.

We plan to upgrade to a newer GStreamer version in Q12020

BrianG13 commented 4 years ago

Hi guys, Please take a look here: Handle Kurento HTTP messages from RecorderEndpoint

Appreciate your help

samhumeau commented 4 years ago

Hi guys, the following repository contains a Dockerfile that builds a KMS server 6.11.0 with a RecorderEndpoint that has http capabilities. https://github.com/samhumeau/kurento-curl-builder

This is done by:

  1. Reverting to Ubuntu 16.0
  2. including curl into gst-plugin-bad again
  3. recompiling gst-plugin-bad
  4. recompiling kms-omni-build using the modified gst-plugin-bad The docker image produced should work just like the official builds. Nothing guaranteed since I have built this for my own needs.

@micaelgallego and @j1elo thank you so much for maintaining such a great documentation. The indication on how to build this projects were extremely clear for such a complex system. I seem to understand that your priority is to use the latest versions of ubuntu in order to beneficiate from latest SSL capabilities and I think that's the right call, but I really needed this capability, hence this alternative. Lemme know if there are some licensing issues or some disclaimers that I should put in the repo, I am not familiar with those things.

micaelgallego commented 4 years ago

Thank you for your effort adding again http support to RecorderEndpoint and PlayerEndpoint.

We will try to add it to master in the following versions.

I don't find any license issues.

shaman79 commented 4 years ago

Hello, is there any estimate when this fix will become part of the master?

samhumeau commented 4 years ago

This is not a fix, rather an alternative version. I had to revert back to ubuntu 16.04 to easily include libcurl. The Kurento teams moved to ubuntu 18.04

shaman79 commented 4 years ago

Well, if the recording over http worked and is not working now, then it is a bug that should be fixed. This is especially true when you want to use Kurento together with Kurento Repository - two products from the same family are not working together due to this bug.

j1elo commented 4 years ago

Our current "1000 foot view" roadmap is:

The situation is unfortunate because we started porting to 18.04, which required temporarily breaking support for libcurl (which provides http), but then other critical issues arose and other priorities have kept the "temporary" break happening during much longer than expected.

It was required to break that support because libcurl in 18.04 requires OpenSSL 1.1. And OpenSSL 1.1 is a breaking, backwards-incompatible API change (yay to the OpenSSL team for their magnificent use of semantic versioning) from 1.0, which is on what Kurento is based. So we first need to move to OpenSSL 1.1, verify that everything works and there are no regressions, and then try and recover support for the newer libcurl.

vee-pool commented 4 years ago

Is there any update regarding when this can be closed ?

j1elo commented 4 years ago

This can be closed now. Kurento itself was made compatible with both OpenSSL 1.0 and 1.1 by means of removing the websocketpp library in commit https://github.com/Kurento/kurento-media-server/commit/f39f530c6812889b40689c104aced37060261dac

Afterwards a careful manipulation of the CI Docker images and scripts allowed to build all fork libraries and KMS itself with the support for OpenSSL 1.0 in both Ubuntu 16.04 and 18.04.

See the announcement here: PSA: All Kurento modules and filters are now available again https://groups.google.com/d/topic/kurento/1VOK0c2O4b4/discussion

samhumeau commented 4 years ago

Thanks a lot @j1elo for this great work and this great news (not yet tested, will test ASAP).

j1elo commented 4 years ago

Thanks a lot @j1elo https://github.com/j1elo for this great work and this great news (not yet tested, will test ASAP).

You're welcome! Let us know if it works fine when you are able to test it.

Also note there seem to be some issues, although it's still not clear exactly what. We've been talking about it in this forum thread:

https://groups.google.com/d/msg/kurento/vQgkT3PEbeM/2p1sp9yeAgAJ

but if we can confirm there is some kind of actual bug, I'd rather have it as a new issue report. But for now it's not clear if there is a bug or a misconfiguration in play there.