Collabora Installation - Error in client request handler: Host not found

Hello,

I managed to install Collabora online on my server running Ubuntu 16.04.

When I try to open or create a document I get this error:

In my docker log I see these errors:

Signature ok
subject=/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=localhost
Getting CA Private Key
loolwsd version details: 1.9.8 - 1.9.8
loolforkit version details: 1.9.8 - 1.9.8
office version details: { “ProductName”: “Collabora Office”, “ProductVersion”: “5.1”, “ProductExtension”: “.10.12”, “BuildId”: “653cc4c38dd2c05aecbee156aef460f5a361e579” }
wsd-00025-0028 0:00:34.888513 [ client_ws_0001 ] ERR Error in client request handler: Host not found| LOOLWSD.cpp:966
wsd-00025-0028 0:00:42.927643 [ client_ws_0002 ] ERR Error in client request handler: Host not found| LOOLWSD.cpp:966
wsd-00025-0026 0:00:45.218187 [ client_ws_0003 ] ERR Error in client request handler: Host not found| LOOLWSD.cpp:966
wsd-00025-0026 0:01:20.924481 [ client_ws_0004 ] ERR Error in client request handler: Host not found| LOOLWSD.cpp:966

Anybody have a clue how to fix this?

1 Like

I have the same error, please help if somebody resolve this problem.

Signature ok
subject=/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=localhost
Getting CA Private Key
loolwsd version details: 1.9.8 - 1.9.8
loolforkit version details: 1.9.8 - 1.9.8
office version details: { “ProductName”: “Collabora Office”, “ProductVersion”: “5.1”, “ProductExtension”: “.10.12”, “BuildId”: “653cc4c38dd2c05aecbee156aef460f5a361e579” }
wsd-00024-0029 0:10:29.756289 [ client_ws_0003 ] ERR Error in client request handler: Host not found| LOOLWSD.cpp:966
wsd-00024-0029 0:10:30.108224 [ client_ws_0004 ] ERR Error in client request handler: Host not found| LOOLWSD.cpp:966

Do you start the Docker container with the url of the Nextcloud server or with the server where Collabora Online runs on?

Also don’t forget the in the admin settings to enter the url of the Collabora Online server.
(The following screenshot is for Nextcloud 10.0.1)

Hi Sanook, thanks for your advice, in fact I have this configuration:

Both server Collabora and owncloud are in the same host, but with virtual host

docker run -t -d -p 127.0.0.1:9980:9980 -e “username=admin” -e “password=123456” -e “domain=cloudo.uca.edu.sv” --restart always --cap-add MKNOD collabora/code

And in the field Collabora Online Server : https://loffice.uca.edu.sv

In my vhosts

loffice.conf

<VirtualHost *:443>
ServerName loffice.uca.edu.sv:443

SSL configuration, you may want to take the easy route instead and use Lets Encrypt!

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/owncloud.crt
SSLCertificateKeyFile /etc/apache2/ssl/owncloud.key
SSLCertificateChainFile /etc/apache2/ssl/uca.ca-bundle
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
SSLHonorCipherOrder on
#Logs
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log

Encoded slashes need to be allowed

AllowEncodedSlashes On

Container uses a unique non-signed certificate

SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off

keep the host

ProxyPreserveHost On

static html, js, images, etc. served from loolwsd

loleaflet is the client part of LibreOffice Online

ProxyPass /loleaflet https://127.0.0.1:9980/loleaflet retry=0
ProxyPassReverse /loleaflet https://127.0.0.1:9980/loleaflet

WOPI discovery URL

ProxyPass /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery https://127.0.0.1:9980/hosting/discovery

Main websocket

ProxyPassMatch “/lool/(.*)/ws$” wss://127.0.0.1:9980/lool/$1/ws

ProxyPass /lool/ws wss://127.0.0.1/lool/ws

Admin Console websocket

ProxyPass /lool/adminws wss://127.0.0.1:9980/lool/adminws

Download as, Fullscreen presentation and Image upload operations

ProxyPass /lool https://127.0.0.1:9980/lool
ProxyPassReverse /lool https://127.0.0.1:9980/lool

owncloud.conf

SSL Virtual Host Context

<VirtualHost *:443>

    #  General setup for the virtual host
    DocumentRoot "/srv/www/htdocs/owncloud"
    #ServerName www.example.com:443
    ServerName cloudo.uca.edu.sv:443
    #ServerAdmin webmaster@example.com
    ErrorLog /var/log/apache2/error_log
    TransferLog /var/log/apache2/access_log

    #   SSL Engine Switch:
    #   Enable/Disable SSL for this virtual host.
    SSLEngine on

    #   You can use per vhost certificates if SNI is supported.
    SSLCertificateFile /etc/apache2/ssl/owncloud.crt
    SSLCertificateKeyFile /etc/apache2/ssl/owncloud.key
    SSLCertificateChainFile /etc/apache2/ssl/uca.ca-bundle
    #SSLCertificateChainFile /etc/apache2/ssl.crt/vhost-example-chain.crt

    #   Per-Server Logging:
    #   The home of a custom SSL log file. Use this when you want a
    #   compact non-error SSL logfile on a virtual host basis.
    CustomLog /var/log/apache2/ssl_request_log   ssl_combined
    <IfModule mod_headers.c>
        Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"
    </IfModule>

host.conf

<VirtualHost *:80>
ServerName loffice.uca.edu.sv
RedirectPermanent / https://loffice.uca.edu.sv/
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log

<VirtualHost *:80>
ServerName cloudo.uca.edu.sv
DocumentRoot /srv/www/htdocs/owncloud
RedirectPermanent / https://cloudo.uca.edu.sv/
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log

___________________________________________________-

loffice:/ # iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DOCKER all – anywhere anywhere ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DOCKER all – anywhere !loopback/8 ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all – 172.17.0.0/16 anywhere
MASQUERADE tcp – 172.17.0.2 172.17.0.2 tcp dpt:9980

Chain DOCKER (2 references)
target prot opt source destination
RETURN all – anywhere anywhere
DNAT tcp – anywhere localhost tcp dpt:9980 to:172.17.0.2:9980

And finally, the firewall is down, and the owncloud logs:

Error PHP Undefined index: dir at /srv/www/htdocs/owncloud/apps/richdocuments/controller/documentcontroller.php#364

I don’t have any ideas where is the problem.

Did you also check the browser log by pressing <CTRL><SHIFT><J>?

The follow message appeared:

The connection to wss://loffice.uca.edu.sv/lool/https%253A%252F%252Fcloudo.uca.edu.sv%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252F41%3Faccess_token%3DJcPmt4iGWFJf2G2RjRUaxuycjav7q2s8%26permission%3Dedit/ws was interrupted while the page was loading.

I am sorry for not responding, in the end I solved it by following this tutorial:

Installing Collabora without using docker.

Maybe I will give Collabora with docker another try, but for now I’m glad that it’s working

Same problem here, but still using docker. Maybe I’m gonna give a try to this solution, but I’d prefer to stick with docker.

I posted the details in this thread: https://help.nextcloud.com/t/wopi-hosts-found-matching-the-target-host-in-config/7674/3?u=hubearth

Problem solved!

I have Set up NextCloud Server on Ubuntu 16.04 with Apache, MariaDB and PHP7, @hubearth I already have these settings which you mentioned

# Main websocket

ProxyPassMatch “/lool/(.*)/ws$” wss://127.0.0.1:9980/lool/$1/ws nocanon

but still I am getting this error

Well, this is embarrassing, we cannot connect to your document. Please try again.

Wrong WOPISrc, usage: WOPISrc=valid encoded URI, or file_path, usage: file_path=/path/to/doc/

In My Docker Logs I am only getting this following error:

wsd-00026-25124 06:07:05.542798 [ client_ws_003b ] ERR ClientRequestHandler::handleClientRequest: Exception: Invalid URI.| wsd/LOOLWSD.cpp:1245
wsd-00026-0030 06:07:07.603192 [ client_ws_003c ] ERR ClientRequestHandler::handleClientRequest: Exception: Invalid URI.| wsd/LOOLWSD.cpp:1245

can anyone help please ? @yventura @Sanook @silas