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

Issues during installation, usage and configuring
Post Reply
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: ... 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=;attempt=3;code:null;connect:null;(id=conv_check_133266315_docx)
Error: Error response: statusCode:404 ;body:
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<pre>Cannot GET /apps/onlyoffice/empty</pre>

    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>
	DocumentRoot /var/www/office/public_html

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

<VirtualHost *:443>

	LoadModule authn_core_module modules/
	LoadModule authz_core_module modules/
	#LoadModule unixd_module modules/ #doesn't work for some reason
	LoadModule proxy_module modules/
	LoadModule proxy_http_module modules/
	LoadModule proxy_wstunnel_module modules/
	LoadModule headers_module modules/
	LoadModule setenvif_module modules/
	LoadModule ssl_module modules/

	DocumentRoot /var/www/office/public_html

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

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

	#<IfModule unixd_module>
	#  User daemon
	#  Group daemon

	SSLEngine on
	SSLCertificateFile /etc/letsencrypt/live/
	SSLCertificateKeyFile /etc/letsencrypt/live/
	Include /etc/letsencrypt/options-ssl-apache.conf

	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://$1$2"
	ProxyPass / ""
	ProxyPassReverse / ""

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


# 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 -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

$CONFIG = array (
  'instanceid' => '[REDACTED]',
  'passwordsalt' => '[REDACTED]',
  'secret' => '[REDACTED]',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '',
    2 => '',
    3 => '',
    4 => '',
  'datadirectory' => '/media/NextCloudRaid/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  '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,
  '' => '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' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '',
  'mail_smtpport' => '465',
  'mail_smtpname' => '',
  '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,
  '' => 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' =>
    '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"

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

Posts: 59
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

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

Code: Select all

2. From Document Server container

Code: Select all

Please tell us the result.

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
nextcloud.jpg (221.17 KiB) Viewed 465 times
onlyoffice.jpg (89.23 KiB) Viewed 465 times

Posts: 274
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