Spreed.ME docker container wont start

When i try to start the Spreed.Me Docker Image with

docker run --rm --name my-spreed-webrtc -p 8080:8080 -p 8443:8443
-v pwd:/srv/extra -i -t spreed/webrtc
-c /srv/extra/server.conf

i got the error :

Staring Spreed WebRTC server …
server 2016/08/12 22:22:21 open /srv/extra/server.conf: no such file or directory

Of course i created the file and configured it like the guide showed.

ls -lha
insgesamt 12K
drwxr-xr-x 1 root root 22 Aug 12 23:16 .
drwxr-xr-x 1 root root 10 Aug 12 23:16 …
-rw-r–r-- 1 root root 11K Aug 12 23:28 server.conf

I am running the container as root and the current ownership is also root.

Do you have any idea why the container might not be able to reach the directory, or have any other idea about it?

Thank you.

PS : Some System Information

uname -r
3.16.0-4-amd64

docker -v
Docker version 1.12.0, build 8eab29e

docker images --all
REPOSITORY TAG IMAGE ID CREATED SIZE
spreed/webrtc latest ae3981f9edc9 2 days ago 46.3 MB

nginx -v
nginx version: nginx/1.11.3

Do you actually run that with pwd? This forum strips the backticks from this command. Maybe it does not pick up the correct directory - try to use the absolute path instead.

This Docker image is still new, but i just have tried from scratch and it seems to work just fine for me.

Hello,

I have the same issue.

I typed in:
docker run --rm --name my-spreed-webrtc -p 8080:8080 -p 8443:8443 -vpwd:/srv/spreed -i -t spreed/webrtc -c /srv/spreed/server.conf

with the backquotes at pwd and got:

server 2016/09/17 11:27:51 open /srv/spreed/server.conf: no such file or directory

however if I start it from the dir /srv/spreed/ I get:
server 2016/09/17 11:34:16 Using '/webrtc/' base base path. server 2016/09/17 11:34:16.508864 Enabled modules: [contacts screensharing youtube presentation] server 2016/09/17 11:34:16 Configured extra '/var/www/owncloud/apps/spreedme/extra/' is not a directory.

ls /var/www/owncloud/apps/spreedme/ appinfo changelog config COPYING debug errors helper js security templates user AUTHORS.md CHANGELOG.md controller css doc extra img README.md settings TODO.txt

I am using nextcloud, migrated from oc, but don’t want do rename the directory and mountpoints.

I am using Kernel 4.4.0-36-generic

I tried to attach strace and gdb to it, but I was not able to get any data of it.

It seems it its somehow locked in too tight, i tried another debug method:
docker exec -it my-spreed-webrtc /bin/bash

and I got:

rpc error: code = 2 desc = oci runtime error: exec failed: exec: "/bin/bash": stat /bin/bash: no such file or directory

By the way the collabora Dockerimage works fine.

I got to a step further, now it starts, but somehow it won’t bind the port correctly and I get a connection reset.

I read a bit in the docker documentation and came to the conclusion that you need to mount some nextcloud-directories into the dockerimage.

So I started it with:

docker run --rm --name my-spreed-webrtc -p 8080:8080 -p 8443:8443 -v /srv/extra:/srv/extra -v /var/log/spreed:/var/log/spreed -v /var/www/nextcloud/apps/spreedme/extra:/var/www/nextcloud/apps/spreedme/extra -i -t spreed/webrtc -c /srv/extra/server.conf

in my case I write the log files to my host, so I need to import the logdirectory too.

Now it start, but I get a connection closed message if I connect to it, even with telnet to that port.

Additionally I found out that the spreedme-root-directory in the ubuntu repos are having more files than this dockerimage, so I copied them over to /srv/extra/spreed/ and declared that in the config file, but it didn’t help.

Is there any additional suggestion to get that running?

@Fred @dev0 @lukas are you guys using Docker on Mac / Windows?

If you are using Docker Machine on Mac or Windows, your
Docker Engine daemon has only limited access to your OS X
or Windows filesystem. Docker Machine tries to auto-share
your /Users (OS X) or C:\Users (Windows) directory. 

https://docs.docker.com/engine/tutorials/dockervolumes/#/mount-a-host-directory-as-a-data-volume

This effectively means you can only share folders which reside in your system’s default users folder (/Users or C:\Users).

@leon no on linux. In my case, it can now access to the specific files I declared to it, but it hangs in another step.

but it hangs in another step.

In which one?

@leon the server starts now but in the netstats the port 8080 is only listening on ip6 even i set it to 127.0.0.1:8080 as told me. If i try to connect to it is just closes the connection.

I have this issue aswell… any progress?

the server starts now

What was the problem?

@dev0 @offerlam
Please try listen = 0.0.0.0:8080.

1 Like

Hi Leon

i assume you are refering to the server.conf filer where the guide tells you to outcomment the listen entries? and that i should disregard this and create a listen entry for 0.0.0.0:8080?

@leon

now it works YAY!!! thank you :heart_eyes:
In that case, I have to limit the connection via iptables, if it should only be able to connect via 127.0.0.1?

workaround:
iptables -A INPUT -i eth0 -p tcp --destination-port 8080 -j DROP

Additional, how can we update the spreedme manpage on the frontpage? The dockerpart is obiuusly not working.

I investigated why it wont work with 127.0.0.1 in the conf file, thats because docker uses a own interface per image which the connection gets natted to the image-interface, so 127.0.0.1 whould be inside the image, and you can’t connect from the dockerhost to it. Thats interesting :smiley:

ok forget that with the root package, it works in that case without a rootpath

I tuned the dockercommand so you shoud not require iptables and it runs now in the background:

docker run -t -d --name my-spreed-webrtc -p 127.0.0.1:8080:8080 -p 127.0.0.1:8443:8443 -v /srv/extra:/srv/extra -v /var/log/spreed:/var/log/spreed -v /var/www/nextcloud/apps/spreedme/extra:/var/www/nextcloud/apps/spreedme/extra -i -t spreed/webrtc -c /srv/extra/server.conf

if you want to stop it you just stop it with docker stop <id> and to remove/unmount it: docker rm <id>
if you look for stopped instances use: docker ps -a

if you are using a vm, then increase the entropy with: rngd -f -r /dev/urandom

This helps, thanks.

My setup is a bit different:

  1. nextcloud is in a container
  2. spreed webrtc will be in a container
  3. nginx as webserver is of course its own container
  4. a reverse proxy for ssl sits in front of it all - using letsencrypt

owncloud installs its apps not in a docker volume, but on a folder on the host (because earlier on docker volumes were buggy and now, you know, it just works) - this folder is mounted where needed during docker run.

I thus have no real clue on how to start a spreed webrtc container accessing the spreed app in the nextcloud cointainer.

there is a possibility to access the filesystem from another docker container via a docker container, but thats pretty advanced, perhaps you can share the spreeddirectory on the host via -v to both container, or make a own shared volume.

perhaps this:


and this

helps with you config.
With them I learned how -v worked and could work out the configs for nc.
I didn’t went that far myself, but that looks funny.

A shared volume for the spreed for both nextcloud and spreed webrtc?

Doesn’t the nextcloud app need just access to one folder of the spreed install whereas spreed only needs adjustment of the config file?

Actually the spreed instance needs access to the directory: <your-next-cloud-dir>/apps/spreedme/extra/
How its get there, lies in your imagination :smiley:

Where do you put the server.conf? at the host, or in a container too?
Additional to that, its a good question if the nextcloud itself needs a tcp connection to the spreed-server too, or everything is handled via the client. But I assume the 2nd. If first is the case, you have to link the containers via docker-network too.