nextcloud-spreedme icon indicating copy to clipboard operation
nextcloud-spreedme copied to clipboard

spreed-webrtc fails to start with nextcloud 10.0.1 autogenerated config

Open chaos-prevails opened this issue 9 years ago • 4 comments

Hello, I have ubuntu 16.04 amd64 with nextcloud 10.0.1 and installed the stable spreed-webrtc (0.28.1) (unstable 0.29 didn't work either).

What I did is:

  1. install spreed from repository: [https://github.com/strukturag/spreed-webrtc/wiki/Ubuntu-Repository]
  2. enabled modules and configured virtualhost for spreed (added the config to my nextcloud virtualhost configuration, see below) [https://github.com/strukturag/nextcloud-spreedme/blob/master/doc/example-config-apache.md]
  3. enable spreed app in nextcloud
  4. copy the autogenerated configuration to /etc/spreed/webrtc.conf
  5. restart spreed-webrtc -> fails, result in /var/log/syslog:
...
Stopped Spreed WebRTC server.
Nov 29 14:58:37 snowden systemd[1]: Started Spreed WebRTC server.
Nov 29 14:58:37 snowden systemd[1]: spreed-webrtc.service: Main process exited, code=exited, status=255/n/a
Nov 29 14:58:37 snowden systemd[1]: spreed-webrtc.service: Unit entered
failed state.
Nov 29 14:58:37 snowden systemd[1]: spreed-webrtc.service: Failed with
result 'exit-code'.
Nov 29 14:58:37 snowden systemd[1]: spreed-webrtc.service: Service
hold-off time over, scheduling restart.
Nov 29 14:58:37 snowden systemd[1]: Stopped Spreed WebRTC server.
Nov 29 14:58:37 snowden systemd[1]: Started Spreed WebRTC server.
Nov 29 14:58:37 snowden systemd[1]: spreed-webrtc.service: Main process
exited, code=exited, status=255/n/a
Nov 29 14:58:37 snowden systemd[1]: spreed-webrtc.service: Unit entered
failed state.
Nov 29 14:58:37 snowden systemd[1]: spreed-webrtc.service: Failed with
result 'exit-code'.
Nov 29 14:58:37 snowden systemd[1]: spreed-webrtc.service: Service
hold-off time over, scheduling restart.
...

As soon as I copy back the initial webrtc.conf (from the apt install), the spreedserver starts fine (nmap shows a service running on 8080)

So there is something wrong in the autogenerated config.

https://MYNEXTCLOUD.org/index.php/apps/spreedme/admin/debug:

 Spreed.ME Version 0.3.4

Ran test #1 (testOwncloudPhpConfigFile):
   Passed without an error

Ran test #2 (testOwncloudJavascriptConfigFile):
   Passed without an error

Ran test #3 (testSpreedWebRTCAPI):
   Error: Unable to connect to WebRTC at https://MYNEXTCLOUD.org/webrtc/. Did you set a correct SPREED_WEBRTC_ORIGIN and SPREED_WEBRTC_BASEPATH in config/config.php?

Some tests failed. :(


My settings (in the nextcloud DB, as I didn't rename the apps/spreed/config/config.php.in file SPREED_WEBRTC_ORIGIN is set to empty (setting it to :8080 doesn't change a thing) SPREED_WEBRTC_BASEPATH is set to /webrtc/

My /etc/spreed/webrtc.conf:

; Minimal Spreed WebRTC configuration for Nextcloud

[http]
listen = 127.0.0.1:8080
basePath = /webrtc/

[app]
sessionSecret = somesecret
encryptionSecret = somesecret
authorizeRoomJoin = true
serverToken = sometoken
serverRealm = local
extra = /var/www/nextcloud/apps/spreedme/extra
plugin = extra/static/owncloud.js

[users]
enabled = true
mode = sharedsecret
sharedsecret_secret = somesecret

my apache 2.4.18 virtualhost config is:

<VirtualHost *:80>
   ServerName MYNEXTCLOUD.org
   DocumentRoot /var/www/nextcloud
   RedirectPermanent / https://MYNEXTCLOUD.org
#       ErrorLog logs/nextcloud/error_log
#       TransferLog logs/nextcloud/access_log
</VirtualHost>

<VirtualHost *:443>
 DocumentRoot "/var/www/nextcloud"

 SSLEngine on
 SSLCertificateFile /etc/apache2/ssl/wildcard.XXXX.org.pem
 SSLCertificateKeyFile /etc/apache2/ssl/wildcard.XXXX.key
 SSLCACertificateFile /etc/apache2/ssl/alphassl-intermediate-sha256.crt
 ServerName MYNEXTCLOUD.org
 Header always add Strict-Transport-Security "max-age=15768000;
includeSubdomains; preload"

 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /var/www/nextcloud/>
 Options +FollowSymlinks
 AllowOverride All

 <IfModule mod_dav.c>
 Dav off
 </IfModule>

 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud
 Satisfy Any

</Directory>

#spreed.me webRTC config
<Location /webrtc>
        ProxyPass http://127.0.0.1:8080/webrtc
        ProxyPassReverse /webrtc
</Location>

<Location /webrtc/ws>
        ProxyPass ws://127.0.0.1:8080/webrtc/ws
</Location>

    ProxyVia On
    ProxyPreserveHost On
    RequestHeader set X-Forwarded-Proto 'https' env=HTTPS

</VirtualHost>

chaos-prevails avatar Nov 29 '16 14:11 chaos-prevails

Please try if adding this block to your Spreed WebRTC server.conf helps:

[http]
root = /usr/local/share/spreed-webrtc-server/www

This is only required if the Spreed WebRTC server is installed via the Ubuntu package.

leonklingele avatar Nov 30 '16 10:11 leonklingele

Actually, it's

root = /usr/share/spreed-webrtc-server/www

Ecphrasis avatar Dec 14 '16 21:12 Ecphrasis

Any news on this @chaos-prevails?

leonklingele avatar Feb 19 '17 22:02 leonklingele

Dear Leon,

I haven't had the opportunity to test anything furter. First, I switched to NC 11 and second I (temporarily) disabled the spreed-webrtc. It is still on my agenda but not in the next weeks, probably more in the next months.

Tim

chaos-prevails avatar Feb 20 '17 09:02 chaos-prevails