简体   繁体   中英

host -unknown by using docker-compose and jitsi-meet

My goal is to run jitsi-meet and another docker container on my CentOS. For this purpose, i created a docker-compose.yml file:

version: '2'

services:

    jitsi-meet:
        image: robertoandrade/jitsi-meet
        container_name: jitsi-meet
        hostname: 192.168.5.169
        restart: always
        ports:
          - "443:443

When i run it with docker-compose up i get the following error message:

JVB 2017-10-23 12:20:33.925 INFO: [10] org.jitsi.videobridge.octo.OctoRelay.start().106 Octo relay not configured.
JVB 2017-10-23 12:20:33.964 SEVERE: [27] org.jitsi.meet.ComponentMain.call().278 host-unknown, host:localhost, port:5347
org.xmpp.component.ComponentException: host-unknown
         at org.jivesoftware.whack.ExternalComponent.connect(ExternalComponent.java:219)
         at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:221)
         at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentManager.java:201)
         at org.jitsi.meet.ComponentMain$3.call(ComponentMain.java:270)
         at org.jitsi.meet.ComponentMain$3.call(ComponentMain.java:255)
         at org.jitsi.retry.RetryStrategy$TaskRunner.run(RetryStrategy.java:193)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
         at java.lang.Thread.run(Thread.java:748)
 JVB 2017-10-23 12:20:34.042 INFO: [14] org.ice4j.ice.harvest.MappingCandidateHarvesters.initialize() Initialized mapping harvesters (delay=652ms).  stunDiscoveryFailed=false

When I run the image with docker run -it --name jitsi-meet -p 443:443 robertoandrade/jitsi-meet I get an input prompt for the hostname and it started flawlessly.

Attempt with "stdin_open: true" and "tty: true" as mentioned by Matt.

Note: I operate per PuTTY ssh.

Result:

unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
c.d: policy-rc.d denied execution of stop.
ing jitsi-videobridge
-----------------------------

The jisti-videobridge package needs the DNS hostname of your instance.

How can I make it work with docker-compose?

I would prefer a solution without the manual input.

It looks like that docker image requires user input to start, which is why -i and -t are used in the docker run command.

-i keeps standard input open. -t assigns a pseudo tty to the process so it thinks there is a console

The stdin_open and tty options can be set in a compose file too.

version: '2'

services:

    jitsi-meet:
        image: robertoandrade/jitsi-meet
        container_name: jitsi-meet
        restart: always
        stdin_open: true
        tty: true
        ports:
          - "443:443

Normally services don't require input so they can be run in the background. Most container images would set up an environment variable or config file to set configuration options like hostnames.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM