Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Issues during installation, usage and configuring
Post Reply
Chillstice
Posts: 1
Joined: Thu Nov 07, 2019 12:41 am

Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by Chillstice » Thu Nov 07, 2019 1:04 am

I've been trying to get the OnlyOffice document server working in tandem with my current Nextcloud install on Linux Mint 19.1 (ubuntu) on and off for the last month or so. It's been such a painful process. I'm really close to getting it working though, I'm just stuck at the very last part.

I followed this guide which involves using ProxyPass in Apache to get both OnlyOffice and Nextcloud working on the same machine: https://help.nextcloud.com/t/howto-what ... host/33192
I've been active in the thread because I've been struggling to get it working. I also looked at the quick little proxy guide in the OnlyOffice docs as well.

Currently I have a working Nextcloud install that has been hardened and optimized. It's running on port 443. I installed the official OnlyOffice document server docker image and I'm trying to run it on port 8443. I have a subdomain that correctly points to the Nextcloud install with ssl. I made another subdomain that should tunnel through to port 8443 on the same machine with the use of ProxyPass in Apache. Both subdomains work properly with ssl (Nextcloud operates and OnlyOffice healthcheck returns true); however, when I try connecting the document server to Nextcloud using the official app I get the following error:

Code: Select all

Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.)
And here's the error from the documentserver/converter error log:

Code: Select all

[ERROR] nodeJS - error downloadFile:url=https://cloud.chillstice.com/apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.BLPBc29J3oq0MICcR6RM-YxI2etbEEE4487PTqAXew4;attempt=3;code:null;connect:null;(id=conv_check_133266315_docx)
Error: Error response: statusCode:404 ;body:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /apps/onlyoffice/empty</pre>
</body>
</html>

    at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:257:18)
    at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
I think for whatever reason the OnlyOffice app installed in Nextcloud isn't serving the 'empty' document to the document server or something, maybe the other way around?

I'm just going to dump all my configs in this post for reference (and so you don't have to ask for them)

Apache 2.4.29 config:

Code: Select all

<VirtualHost *:80>
	ServerName office.chillstice.com
	ServerAlias www.office.chillstice.com
	DocumentRoot /var/www/office/public_html

	RewriteEngine On
	RewriteCond %{HTTPS} !=on
	RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] 
</VirtualHost>

<VirtualHost *:443>

	LoadModule authn_core_module modules/mod_authn_core.so
	LoadModule authz_core_module modules/mod_authz_core.so
	#LoadModule unixd_module modules/mod_unixd.so #doesn't work for some reason
	LoadModule proxy_module modules/mod_proxy.so
	LoadModule proxy_http_module modules/mod_proxy_http.so
	LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
	LoadModule headers_module modules/mod_headers.so
	LoadModule setenvif_module modules/mod_setenvif.so
	LoadModule ssl_module modules/mod_ssl.so

	ServerAdmin chris@chillstice.com
	ServerName office.chillstice.com
    ServerAlias www.office.chillstice.com
	DocumentRoot /var/www/office/public_html

    <Directory "/var/www/office/public_html">
        	Options Indexes FollowSymLinks
            AllowOverride All
			Require all granted
    </Directory>

    <IfModule mod_headers.c>
      Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
    </IfModule>

	#<IfModule unixd_module>
	#  User daemon
	#  Group daemon
	#</IfModule>

	SSLEngine on
	SSLCertificateFile /etc/letsencrypt/live/office.chillstice.com/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/office.chillstice.com/privkey.pem
	Include /etc/letsencrypt/options-ssl-apache.conf

	SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
	SSLProtocol All -SSLv2 -SSLv3
	SSLCompression off
	SSLHonorCipherOrder on

	SSLProxyEngine on
	#SSLProxyVerify none
	SSLProxyCheckPeerCN off
	#SSLProxyCheckPeerName off

	SetEnvIf Host "^(.*)$" THE_HOST=$1
	RequestHeader setifempty X-Forwarded-Proto https
	RequestHeader setifempty X-Forwarded-Host %{THE_HOST}e
	ProxyAddHeaders Off

	ProxyPassMatch (.*)(\/websocket)$ "ws://127.0.0.1:8443/$1$2"
	ProxyPass / "https://127.0.0.1:8443/"
	ProxyPassReverse / "https://127.0.0.1:8443/"
	#ProxyPassReverseCookieDomain https://127.0.0.1:8443 https://office.chillstice.com

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

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Docker Run Command:

Code: Select all

sudo docker run -i -t -d -p 8443:443 --restart=always --add-host=cloud.chillstice.com:127.0.0.1 -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql onlyofficemodified
Nextcloud 16.0.5 config.php:

Code: Select all

<?php
$CONFIG = array (
  'instanceid' => '[REDACTED]',
  'passwordsalt' => '[REDACTED]',
  'secret' => '[REDACTED]',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '127.0.0.1',
    2 => '192.168.1.250',
    3 => 'cloud.chillstice.com',
    4 => 'chillstice.com/cloud',
  ),
  'datadirectory' => '/media/NextCloudRaid/data',
  'dbtype' => 'mysql',
  'version' => '16.0.5.1',
  'overwrite.cli.url' => 'https://cloud.chillstice.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_Admin',
  'dbpassword' => '[REDACTED]',
  'installed' => true,
  'default_language' => 'en',
  'default_locale' => 'en_US',
  'knowledgebaseenabled' => true,
  'filelocking.enabled' => true,
  'maintenance' => false,
  'has_internet_connection' => true,
  'updatechecker' => true,
  'updater.release.channel' => 'stable',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => '[REDACTED]',
    'dbindex' => 0,
  ),
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'cloud',
  'mail_domain' => 'chillstice.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mail.chillstice.com',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'cloud@chillstice.com',
  'mail_smtppassword' => '[REDACTED]',
  'mail_smtpsecure' => 'ssl',
  'skeletondirectory' => '/media/NextCloudRaid/default-files',
  'defaultapp' => 'files',
  'allow_user_to_change_display_name' => true,
  'session_keepalive' => true,
  'remember_login_cookie_lifetime' => 1296000,
  'session_lifetime' => 604800,
  'auth.bruteforce.protection.enabled' => true,
  'trashbin_retention_obligation' => 'auto',
  'overwriteprotocol' => 'https',
  'check_for_working_htaccess' => true,
  'check_data_directory_permissions' => true,
  'htaccess.RewriteBase' => '/',
  'enable_previews' => true,
  'theme' => '',
  'loglevel' => 2,
  'onlyoffice' =>
  array(
    'verify_peer_off' => true,
    'jwt_secret' => '[REDACTED]',
    'jwt_header' => 'AuthorizationJwt',
  ),
  'app_install_overwrite' => 
  array (
    0 => 'announcementcenter',
    1 => 'defaultlinkopen',
    2 => 'files_clipboard',
    3 => 'admin_notifications',
  ),
);
  • I was struggling to get --env_file to work in the Docker run file with some environment variables, but the OnlyOffice instance literally breaks if I try adding env variables.
  • I also committed a duplicate docker image with a few changes to the local.json file for a custom secret and I disabled "rejectUnauthorized"
[/list]

If you have any questions or need any more information, don't hesitate to reply. I'll be watching this thread.

Alexandre
Posts: 43
Joined: Thu Dec 12, 2019 11:08 am

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by Alexandre » Wed Dec 18, 2019 1:08 pm

Hello.
Sorry for delayed response.
Please check if services can access each other via domain names using wget command:
1. From host

Code: Select all

wget https://office.chillstice.com
2. From Document Server container

Code: Select all

wget https://cloud.chillstice.com
Please tell us the result.

rickygm
Posts: 2
Joined: Fri Jan 10, 2020 7:19 pm

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by rickygm » Sat Jan 11, 2020 1:52 am

I have the same problem, I am integrating onlyoffice with nextcloud 17 and I get the same message , I'm running onlyffice in a docker container, and I access it well from the outside, but it doesn't allow me to integrate with nextcloud, I attach the images.Sorry for using this post, but I didn't want to open another
Attachments
nextcloud.jpg
nextcloud.jpg (221.17 KiB) Viewed 260 times
onlyoffice.jpg
onlyoffice.jpg (89.23 KiB) Viewed 260 times


Carl
Posts: 258
Joined: Thu Apr 12, 2018 10:00 am

Re: Error while downloading the document file to be converted (Cannot GET /apps/onlyoffice/empty)

Post by Carl » Tue Jan 14, 2020 10:43 am

Hello rickygm,

Please check the log /app/onlyoffice/DocumentServer/logs/documentserver/converter/out.log. It will contain errors regarding this issue.

Post Reply