openmeetings / openmeetings-docker

Docker image for OM
Apache License 2.0
110 stars 56 forks source link

"Multimedia server is inaccessible" #26

Open Zocker1999NET opened 4 years ago

Zocker1999NET commented 4 years ago

I tried to launch the container to test OpenMeetings following the instructions "to run (full) OM". I can join into a room but connecting with voice does not work. In the browser (Firefox and Chrome) the error message "Multimedia server is inaccessible" does pop up several times. Also the log of the Docker container does show that it failed to create the "KurentoClient". These error messages are showing up every 10 seconds:

INFO  04-27 18:00:22.732 o.k.j.c.JsonRpcClientNettyWebSocket:191 [pool-1-thread-1] - [KurentoClient]  Connecting native client
INFO  04-27 18:00:22.733 o.k.j.c.JsonRpcClientNettyWebSocket:220 [pool-1-thread-1] - [KurentoClient]  Creating new NioEventLoopGroup
INFO  04-27 18:00:22.734 o.k.j.c.JsonRpcClientNettyWebSocket:234 [tLoopGroup-95-1] - [KurentoClient]  Initiating new Netty channel. Will create new handler too!
WARN  04-27 18:00:22.735 o.k.j.c.JsonRpcClientNettyWebSocket:308 [pool-1-thread-1] - [KurentoClient]  Trying to close a JsonRpcClientNettyWebSocket with channel == null
WARN  04-27 18:00:22.738 o.a.o.c.r.KurentoHandler:125 [pool-1-thread-1] - Fail to create Kurento client, will re-try in 10000 ms
WARN  04-27 18:00:22.738 o.k.j.c.JsonRpcClient:270 [eatExec-e278-t0] - [KurentoClient]  Error sending heartbeat to server. Exception: InterruptedException while trying to acquire lock
WARN  04-27 18:00:22.738 o.k.j.c.JsonRpcClient:287 [eatExec-e278-t0] - [KurentoClient]  Stopping heartbeat and closing client: failure during heartbeat mechanism

I really do not know what could cause this issue.

knedlyk commented 4 years ago

Which OS do you use? It depends, in Archlinux kurento media server doesn't work in OM docker and you need some workaround to fix it.

On Mon, Apr 27, 2020 at 8:01 PM Felix Stupp notifications@github.com wrote:

I tried to launch the container to test OpenMeetings following the instructions "to run (full) OM". I can join into a room but connecting with voice does not work. In the browser (Firefox and Chrome) the error message "Multimedia server is inaccessible" does pop up several times. Also the log of the Docker container does show that it failed to create the "KurentoClient". These error messages are showing up every 10 seconds:

INFO 04-27 18:00:22.732 o.k.j.c.JsonRpcClientNettyWebSocket:191 [pool-1-thread-1] - [KurentoClient] Connecting native client INFO 04-27 18:00:22.733 o.k.j.c.JsonRpcClientNettyWebSocket:220 [pool-1-thread-1] - [KurentoClient] Creating new NioEventLoopGroup INFO 04-27 18:00:22.734 o.k.j.c.JsonRpcClientNettyWebSocket:234 [tLoopGroup-95-1] - [KurentoClient] Initiating new Netty channel. Will create new handler too! WARN 04-27 18:00:22.735 o.k.j.c.JsonRpcClientNettyWebSocket:308 [pool-1-thread-1] - [KurentoClient] Trying to close a JsonRpcClientNettyWebSocket with channel == null WARN 04-27 18:00:22.738 o.a.o.c.r.KurentoHandler:125 [pool-1-thread-1] - Fail to create Kurento client, will re-try in 10000 ms WARN 04-27 18:00:22.738 o.k.j.c.JsonRpcClient:270 [eatExec-e278-t0] - [KurentoClient] Error sending heartbeat to server. Exception: InterruptedException while trying to acquire lock WARN 04-27 18:00:22.738 o.k.j.c.JsonRpcClient:287 [eatExec-e278-t0] - [KurentoClient] Stopping heartbeat and closing client: failure during heartbeat mechanism

I really do not know what could cause this issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openmeetings/openmeetings-docker/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7PGOEJZEKL2YAL4I5GRGLROXB7XANCNFSM4MSELDZA .

Zocker1999NET commented 4 years ago

The host running Docker is a Debian GNU/Linux Testing/Unstable system.

solomax commented 4 years ago

It seems KMS failed to start :( Can you check the process list in running container?

knedlyk commented 4 years ago

docker container ls docker exec -it container_id bash

Check whether kurento is running: ps xuaw | grep kurento or alternatively /etc/init.d/kurento-media-server status If not, try to start: /etc/init.d/kurento-media-server start and check again.

ps xuaw | grep kurento

On Tue, May 5, 2020 at 5:15 AM Maxim Solodovnik notifications@github.com wrote:

It seems KMS failed to start :( Can you check the process list in running container?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openmeetings/openmeetings-docker/issues/26#issuecomment-623810814, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7PGOG3J2S37IZO4JFDNTLRP6ADVANCNFSM4MSELDZA .

Zocker1999NET commented 4 years ago
root@3ca541bfdc8e:/opt# ps xuaw | grep kurento
root         749  0.0  0.0  11388   572 pts/0    R+   07:32   0:00 grep --color=auto kurento
root@3ca541bfdc8e:/opt# /etc/init.d/kurento-media-server status
 * Checking Kurento Media Server...
/etc/init.d/kurento-media-server: 156: [: Illegal number:
/etc/init.d/kurento-media-server: 159: [: Illegal number:
/etc/init.d/kurento-media-server: 161: [: Illegal number:
 * Unable to determine /usr/bin/kurento-media-server status...
/etc/init.d/kurento-media-server: 167: return: Illegal number:
root@3ca541bfdc8e:/opt# /etc/init.d/kurento-media-server start
 * Start Kurento Media Server
* Configure Kernel resource limits for Kurento Media Server
/etc/init.d/kurento-media-server: 122: /etc/init.d/kurento-media-serveUntitled-1r: Pipe call failed
root@3ca541bfdc8e:/opt# /etc/init.d/kurento-media-server status
 * Checking Kurento Media Server...
/etc/init.d/kurento-media-server: 156: [: Illegal number:
/etc/init.d/kurento-media-server: 159: [: Illegal number:
/etc/init.d/kurento-media-server: 161: [: Illegal number:
 * Unable to determine /usr/bin/kurento-media-server status...
/etc/init.d/kurento-media-server: 167: return: Illegal number:
root@3ca541bfdc8e:/opt# ps xuaw | grep kurento
root         885  0.0  0.0  11460  1056 pts/0    S+   07:33   0:00 grep --color=auto kurento
root@3ca541bfdc8e:/opt# /etc/init.d/kurento-media-server start; ps xuaw | grep kurento
 * Start Kurento Media Server
* Configure Kernel resource limits for Kurento Media Server
/etc/init.d/kurento-media-server: 122: /etc/init.d/kurento-media-server: Pipe call failed
root        1134  0.0  0.0  11460  1112 pts/0    S+   07:34   0:00 grep --color=auto kurento
root@3ca541bfdc8e:/opt#

The init script of kurento-media-server seems to be broken.

Tracing the issues of the status command, it seems that pidofproc is not installed on the system, even is not available on Ubuntu (installed in the container), and that the line 155 makes no sense to me:

rc="$(pidofproc -p "$PID_FILE" "$DAEMON_BIN" >/dev/null 2>&1)"

Even if pidofproc would be installed, $rc will ever be empty because the stdout of the command will be redirected to /dev/null. The four error outputs of the status-call show that $rc=="".

To me it seems I have an outdated version of the container, but docker pull apache/openmeetings:5.0.0-M4 reports the image is up to date (EDIT here).

I try to start the container using following command (which I got from here, permalink):

docker run -i --rm --expose=5443 --expose=8888 -p 5443:5443 -p 8888:8888 apache/openmeetings:5.0.0-M4
knedlyk commented 4 years ago

I had the same under Archlinux. The script is not broken, the problem is in the docker side. You have two options. The first one to fix the kurento init script. The second is to run kurento in a separate container. The first option is easy. Install nano apt-get update && apt-get install nano Open /etc/init.d/kurento-media-server: nano /etc/init.d/kurento-media-server delete lines in function start_kurento() beginning with

If set and not null, configure per-process max open file descriptors

to the line (but not this line!!!) /sbin/start-stop-daemon Then you can start kurento from init.d script /etc/init.d/kurento-media-server start

Stopping is tricky, but you can modify function stop_kurento() adding at the end of function line kill -9 pidof /usr/bin/kurento-media-server It will kill kurento on restart.

If you choose second choice you should modify docker-compose.yml script accordingly. The simplest way to use this one https://github.com/vimagick/dockerfiles/blob/master/openmeetings/docker-compose.yml , change only OM version to minimal and database accordingly...

On Tue, May 5, 2020 at 10:05 AM Felix Stupp notifications@github.com wrote:

root@3ca541bfdc8e:/opt# ps xuaw | grep kurento root 749 0.0 0.0 11388 572 pts/0 R+ 07:32 0:00 grep --color=auto kurento root@3ca541bfdc8e:/opt# /etc/init.d/kurento-media-server status

  • Checking Kurento Media Server... /etc/init.d/kurento-media-server: 156: [: Illegal number: /etc/init.d/kurento-media-server: 159: [: Illegal number: /etc/init.d/kurento-media-server: 161: [: Illegal number:
  • Unable to determine /usr/bin/kurento-media-server status... /etc/init.d/kurento-media-server: 167: return: Illegal number: root@3ca541bfdc8e:/opt# /etc/init.d/kurento-media-server start
  • Start Kurento Media Server
    • Configure Kernel resource limits for Kurento Media Server /etc/init.d/kurento-media-server: 122: /etc/init.d/kurento-media-serveUntitled-1r: Pipe call failed root@3ca541bfdc8e:/opt# /etc/init.d/kurento-media-server status
  • Checking Kurento Media Server... /etc/init.d/kurento-media-server: 156: [: Illegal number: /etc/init.d/kurento-media-server: 159: [: Illegal number: /etc/init.d/kurento-media-server: 161: [: Illegal number:
  • Unable to determine /usr/bin/kurento-media-server status... /etc/init.d/kurento-media-server: 167: return: Illegal number: root@3ca541bfdc8e:/opt# ps xuaw | grep kurento root 885 0.0 0.0 11460 1056 pts/0 S+ 07:33 0:00 grep --color=auto kurento root@3ca541bfdc8e:/opt# /etc/init.d/kurento-media-server start; ps xuaw | grep kurento
  • Start Kurento Media Server
    • Configure Kernel resource limits for Kurento Media Server /etc/init.d/kurento-media-server: 122: /etc/init.d/kurento-media-server: Pipe call failed root 1134 0.0 0.0 11460 1112 pts/0 S+ 07:34 0:00 grep --color=auto kurento root@3ca541bfdc8e:/opt#

The init script of kurento-media-server seems to be broken.

Tracing the issues of the status command, it seems that pidofproc is not installed on the system, even is not available on Ubuntu https://stackoverflow.com/a/3017413/4015028 (installed in the container), and that the line 155 makes no sense to me:

rc="$(pidofproc -p "$PID_FILE" "$DAEMON_BIN" >/dev/null 2>&1)"

Even if pidofproc would be installed, $rc will ever be empty because the stdout of the command will be redirected to /dev/null. The four error outputs of the status-call show that $rc=="".

To me it seems I have an outdated version of the container, but

I try to start the container using following command (which I got from here https://github.com/openmeetings/openmeetings-docker#to-run-full-om, permalink https://github.com/openmeetings/openmeetings-docker/tree/90a527d6d55eb99349fc18d458e69194c69056a2#to-run-full-om ):

docker run -i --rm --expose=5443 --expose=8888 -p 5443:5443 -p 8888:8888 apache/openmeetings:5.0.0-M4

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openmeetings/openmeetings-docker/issues/26#issuecomment-623915795, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7PGOGDHZY4IICRAAW65ATRP7CD3ANCNFSM4MSELDZA .

Zocker1999NET commented 4 years ago

Okay, thanks for the hotfix, but why is this an issue on the docker side? Is there a proper explanation I missed out?

knedlyk commented 4 years ago

I don't know exactly what is the reason, probably ubuntu environments are not fully emulated under docker and this causes issues when docker runs in non ubuntu host machine, like debian or archlinux. I discovered it experimentally but didn't have time to dig into it deeply.

On Tue, May 5, 2020 at 11:58 AM Felix Stupp notifications@github.com wrote:

Okay, thanks for the hotfix, but why is this an issue on the docker side? Is there a proper explanation I missed out?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

solomax commented 4 years ago

I built and test OM-docker at Ubuntu works for me Was sure docker should work on any host :(

yourfa-3270 commented 3 years ago

I solve it depend this method. I run "docker exec -it container_id /bin/bash", then "/etc/init.d/kurento-media-server start". the terminal show a error, "* Cannot set limit: 1048576 max open file descriptors" , then I run this to set up file descriptors: "docker run -it --ulimit nofile=1048576 :1048576 --expose=5443 --expose=8888 -p 5443:5443 -p 8888:8888 apache/openmeetings:6.0.0". then the service is ok, and the error about "Multimedia server is inaccessible" is missed.

docker container ls docker exec -it container_id bash Check whether kurento is running: ps xuaw | grep kurento or alternatively /etc/init.d/kurento-media-server status If not, try to start: /etc/init.d/kurento-media-server start and check again. ps xuaw | grep kurento

solomax commented 3 years ago

max file set here https://github.com/openmeetings/openmeetings-docker/blob/master/scripts/om_euser.sh#L35 I can make it configurable, would it help?