[Onlyoffice] Error while downloading the document file to be converted

Hello,

I was running Onlyoffice in docker container on the NC server fine for a while. However, updates to NC and Onlyoffice broke my setup at some point and I’m trying to fix it for weeks already without success.
I really need some help now.

The Onlyoffice server itself is somewhat running:
grafik

But when I try to connect the Onlyoffice app (from NC store) to the Onlyoffice server, I receive the following error message:
Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.)

The browser’s network analysis reports this response:
{"documentserver":"https:\/\/office.mydomain.tld\/","documentserverInternal":null,"storageUrl":null,"secret":null,"error":"Error occurred in the document service: Error while downloading the document file to be converted."}

After I couldn’t fix the docker setup, I installed onlyoffice-documentserver package from the Arch User Repository (AUR) and deleted the docker image but still face the exact same issue, that the document file couldn’t be downloaded and converted.
I followed these guides for installation:
https://helpcenter.onlyoffice.com/server/linux/document/linux-installation.aspx
https://wiki.archlinux.org/index.php/Onlyoffice_Documentserver

And this guide to enable HTTPS for the latest Onlyoffice version:
https://helpcenter.onlyoffice.com/server/linux/document/switch-to-https.aspx


Now with Onlyoffice natively installed I can better check the logs but
/var/log/onlyoffice/documentserver/nginx.error.log
doesn’t report any errors (it writes error messages when I stop the services for testing, however).

In /etc/nginx/includes/onlyoffice-http.conf docservice is correctly defined as

upstream docservice {
  server localhost:8000;
}

and when I run
curl http://127.0.0.1:8000/healthcheck
it returns:
true

Unfortunately, I don’t know the URL to test the document download and conversion.

What I tried so far:

  • fix docker setup
  • install onlyoffice natively
  • set “rejectUnauthorized” to true in default.json
  • disable iptables
  • smaller nginx config changes (poking around and guessing - no real idea what to do there)
  • find solutions on the Internet by using a search engine
  • tried to install nginx-extras, but it seems not available for archlinux

My current setup is:

  • NC 15.0.2
  • Onlyoffice app version 2.1.2
  • onlyoffice-documentserver 5.2.6
  • ArchLinux 4.19.15-1-lts
  • nginx 1.14.2
  • mariaDB 10.1.37 for Nextcloud
  • postgresql 11.1 for Onlyoffice
  • valid Letsencrypt SSL certificates
  • redis 5.0.3
  • rabbitmq 3.7.10
  • nodejs-lts-carbon 8.15.0
  • PHP 7.3.1

Nextcloud log only shows:

{"reqId":"G9Z3yODc","level":3,"time":"2019-01-15T15:40:24+01:00","remoteAddr":"2011:xxxx:xxxx:xxxx:f:1:1:120","user":"ncadmin","app":"PHP","method":"GET","url":"\/settings\/admin\/onlyoffice","message":"count(): Parameter must be an array or an object that implements Countable at \/var\/www\/nextcloud\/apps\/onlyoffice\/templates\/settings.php#64","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.2.0"}
{"reqId":"G9Z3yODc","level":3,"time":"2019-01-15T15:40:24+01:00","remoteAddr":"2011:xxxx:xxxx:xxxx:f:1:1:120","user":"ncadmin","app":"PHP","method":"GET","url":"\/settings\/admin\/onlyoffice","message":"implode(): Invalid arguments passed at \/var\/www\/nextcloud\/apps\/onlyoffice\/templates\/settings.php#66","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.2.0"}
{"reqId":"Jes0TpEZ","level":3,"time":"2019-01-15T15:40:35+01:00","remoteAddr":"2011:xxxx:xxxx:xxxx:f:1:1:120","user":"ncadmin","app":"onlyoffice","method":"PUT","url":"\/apps\/onlyoffice\/ajax\/settings","message":"GetConvertedUri on check error: Error occurred in the document service: Error while downloading the document file to be converted.","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"15.0.2.0"}

I fear I made a stupid mistake somewhere, but I cannot find out where. Any advice how to better debug or how to solve is very much appreciate.

Maybe you can help me here @alexander_onlyoffice?

Thank you very much everybody!

Here the config files:

NC config.php
<?php
$CONFIG = array (
  'instanceid' => '********',
  'passwordsalt' => '******',
  'secret' => '******',
  'trusted_domains' =>
  array (
    0 => 'cloud.mydomain.tld',
    1 => 'office.mydomain.tld',
    2 => 'LOCALIP',
    3 => 'localhost',
  ),
  'datadirectory' => '/var/ncdata',
  'dbtype' => 'mysql',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '*******',
  'dbpassword' => '*******',
  'version' => '15.0.2.0',
  'logtimezone' => 'Europe/Berlin',
  'appstore.experimental.enabled' => true,
  'appstoreenabled' => true,
  'appstoreurl' => 'https://api.nextcloud.com/v1',
  'appcodechecker' => true,
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '587',
  'mail_smtphost' => 'smtp.maildomain.tld',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'cloud.mydomain',
  'mail_domain' => 'maildomain.tld',
  'mail_smtpsecure' => 'tls',
  'mail_smtpname' => 'cloud.mydomain@maildomain.tld',
  'mail_smtppassword' => '***',
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\MP3',
    6 => 'OC\\Preview\\TXT',
    7 => 'OC\\Preview\\MarkDown',
    8 => 'OC\\Preview\\TIFF',
    9 => 'OCA\\CameraRawPreviews\\RawPreview',
    10 => 'OCA\\CameraRawPreviews\\IndesignPreview',
    11 => 'OC\\Preview\\Movie',
    12 => 'OC\\Preview\\Photoshop',
  ),
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0,
  ),
  'maintenance' => false,
  'updater.server.url' => 'https://updates.nextcloud.com/updater_server/',
  'updater.release.channel' => 'stable',
  'loglevel' => 2,
  'theme' => '',
  'installed' => true,
  'overwrite.cli.url' => 'https://cloud.mydomain.tld',
  'defaultapp' => 'apporder',
  'updater.secret' => '*****',
);
App list

Enabled:

  • accessibility: 1.1.0
  • activity: 2.8.2
  • admin_audit: 1.5.0
  • announcementcenter: 3.4.0
  • apporder: 0.6.0
  • audioplayer: 2.5.1
  • bookmarks: 0.15.1
  • bruteforcesettings: 1.3.0
  • calendar: 1.6.4
  • camerarawpreviews: 0.6.3
  • checksum: 0.4.2
  • circles: 0.16.0
  • cloud_federation_api: 0.1.0
  • comments: 1.5.0
  • contacts: 3.0.1
  • dashboard: 6.0.0
  • dav: 1.8.1
  • deck: 0.5.2
  • dicomviewer: 1.1.0
  • dropit: 0.1.3
  • event_update_notification: 0.3.2
  • external: 3.2.0
  • federatedfilesharing: 1.5.0
  • federation: 1.5.0
  • files: 1.10.0
  • files_accesscontrol: 1.5.0
  • files_automatedtagging: 1.5.0
  • files_downloadactivity: 1.4.0
  • files_external: 1.6.0
  • files_markdown: 2.0.5
  • files_pdfviewer: 1.4.0
  • files_readmemd: 1.0.0
  • files_retention: 1.4.0
  • files_rightclick: 0.9.1
  • files_sharing: 1.7.0
  • files_texteditor: 2.7.0
  • files_trashbin: 1.5.0
  • files_versions: 1.8.0
  • files_videoplayer: 1.4.0
  • firstrunwizard: 2.4.0
  • gallery: 18.2.0
  • groupfolders: 2.0.2
  • jsloader: 1.0.2
  • logreader: 2.0.0
  • lookup_server_connector: 1.3.0
  • mail: 0.11.0
  • metadata: 0.8.0
  • nextcloud_announcements: 1.4.0
  • notes: 2.5.1
  • notifications: 2.3.0
  • oauth2: 1.3.0
  • ojsxc: 3.4.3
  • onlyoffice: 2.1.2
  • password_policy: 1.5.0
  • polls: 0.9.5
  • previewgenerator: 2.0.0
  • provisioning_api: 1.5.0
  • quota_warning: 1.4.0
  • ransomware_protection: 1.3.0
  • serverinfo: 1.5.0
  • sharebymail: 1.5.0
  • sharerenamer: 2.3.0
  • socialsharing_email: 1.0.5
  • spreed: 5.0.0
  • support: 1.0.0
  • systemtags: 1.5.0
  • tasks: 0.9.8
  • telephoneprovider: 1.0.2
  • theming: 1.6.0
  • twofactor_backupcodes: 1.4.1
  • twofactor_totp: 2.1.0
  • updatenotification: 1.5.0
  • workflowengine: 1.5.0
    Disabled:
  • cms_pico
  • drawio
  • encryption
  • files_mindmap
  • files_reader
  • issuetemplate
  • ransomware_detection
  • survey_client
  • user_ldap
  • user_usage_report
web server config onlyoffice
include /etc/nginx/includes/onlyoffice-http.conf;

## Normal HTTP host
server {
  listen 0.0.0.0:80;
  listen [::]:80;
  server_name office.mydomain.tld;
  server_tokens off;

  ## Redirects all traffic to the HTTPS host
  root /nowhere; ## root doesn't have to be a valid path since we are redirecting
  rewrite ^ https://$host$request_uri? permanent;
}

#HTTP host for internal services
server {
  listen 127.0.0.1:80;
  listen [::1]:80;
  server_name localhost;
  server_tokens off;

  include /etc/nginx/includes/onlyoffice-documentserver-common.conf;
  include /etc/nginx/includes/onlyoffice-documentserver-docservice.conf;
}

## HTTPS host
server {
  listen 0.0.0.0:443 ssl http2;
  listen [::]:443 ssl http2;
  server_name office.mydomain.tld;
  server_tokens off;
  root /usr/share/nginx/html;

  ## Strong SSL Security
  ## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
  ssl on;
  #ssl_verify_client off;

  ssl_session_timeout 1d;
  ssl_session_cache shared:SSL:50m;
  ssl_session_tickets off;

  # modern configuration. tweak to your needs.
  ssl_protocols TLSv1.2; # TLSv1.3;

  ssl_ciphers 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-GCM-SHA256';

  ssl_prefer_server_ciphers on;
  ssl_ecdh_curve secp384r1;

  resolver 9.9.9.9 valid=300s;
  resolver_timeout 10s;

  ssl_stapling on;
  ssl_stapling_verify on;

  ssl_dhparam /etc/ssl/dhparam_4096.pem;
  ssl_trusted_certificate /etc/ssl/ca-certs.pem;
  ssl_certificate /root/.acme.sh/mydomain.tld_ecc/fullchain.cer;
  ssl_certificate_key /root/.acme.sh/mydomain.tld_ecc/mydomain.tld.key;
  ssl_certificate /etc/letsencrypt/live/mydomain.tld/fullchain.pem; # managed by Certbot
  ssl_certificate_key /etc/letsencrypt/live/mydomain.tld/privkey.pem; # managed by Certbot
  
  add_header X-Content-Type-Options nosniff;
  # add_header Strict-Transport-Security max-age=31536000;
  # add_header X-Frame-Options SAMEORIGIN;

  include /etc/nginx/includes/onlyoffice-documentserver-*.conf;
}
web server config Nextcloud
upstream php-handler {
    server unix:/run/php-fpm/php-fpm.sock;
}

server {
    listen 80;
    listen [::]:80;
    server_name mydomain.tld;

    server_tokens off;

    # enforce https
    return 301 https://$server_name$request_uri;
}

server {
    listen 80;
    listen [::]:80;
    server_name cloud.mydomain.tld;

    server_tokens off;

    # enforce https
    return 301 https://$server_name$request_uri;
}

server {
    listen 80 default_server;
    listen [::]:80;
    server_name _;

    server_tokens off;

    # enforce https
    return 301 http://cloud.mydomain.tld;
}


server {
    listen 443;
    listen [::]:443;
    server_name mydomain.tld;

    server_tokens off;

    # forward to cloud.mydomain.tld
    return 301 https://cloud.mydomain.tld$request_uri;

    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;

    # modern configuration. tweak to your needs.
    ssl_protocols TLSv1.2 TLSv1.3;

    ssl_ciphers 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-GCM-SHA256';

    ssl_prefer_server_ciphers on;
    ssl_ecdh_curve secp384r1;

    resolver 9.9.9.9;

    ssl_stapling on;
    ssl_stapling_verify on;
	
    ssl_dhparam /etc/ssl/dhparam_4096.pem;
    ssl_trusted_certificate /etc/ssl/ca-certs.pem;
    ssl_certificate /root/.acme.sh/mydomain.tld_ecc/fullchain.cer;
    ssl_certificate_key /root/.acme.sh/mydomain.tld_ecc/mydomain.tld.key;
    ssl_certificate /etc/letsencrypt/live/mydomain.tld/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mydomain.tld/privkey.pem; # managed by Certbot

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
    add_header Referrer-Policy "no-referrer";

    add_header Feature-Policy "accelerometer 'none'; autoplay 'self'; geolocation 'none'; midi 'none'; notifications 'self'; push 'self'; sync-xhr 'self'; microphone 'self'; camera 'self'; magnetometer 'none'; gyroscope 'none'; speaker 'self'; vibrate 'self'; fullscreen 'self'; payment 'none'; usb 'none'";

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;

}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name cloud.mydomain.tld;

    server_tokens off;

    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-GCM-SHA256';

    ssl_prefer_server_ciphers on;
    ssl_ecdh_curve secp384r1;

    resolver 9.9.9.9;

    ssl_stapling on;
    ssl_stapling_verify on;

    ssl_dhparam /etc/ssl/dhparam_4096.pem;
    ssl_trusted_certificate /etc/ssl/ca-certs.pem;
    ssl_certificate /root/.acme.sh/mydomain.tld_ecc/fullchain.cer;
    ssl_certificate_key /root/.acme.sh/mydomain.tld_ecc/mydomain.tld.key;
    ssl_certificate /etc/letsencrypt/live/mydomain.tld/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mydomain.tld/privkey.pem; # managed by Certbot

	add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
	add_header Referrer-Policy "no-referrer";

    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;

    # Path to the root of your installation
    root /var/www/nextcloud/;

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location = /.well-known/carddav {
      return 301 $scheme://$host/remote.php/dav;
    }
    location = /.well-known/caldav {
      return 301 $scheme://$host/remote.php/dav;
    }

    # ACME challenge
    location ^~ /.well-known {
        allow all;
        alias /var/lib/letsencrypt/.well-known/;
        default_type "text/plain";
        try_files $uri =404;
    }
    location ^~ /.well-known/acme-challenge/ {
        allow all;
        alias /var/lib/letsencrypt/.well-known/acme-challenge/;
    }

    # set max upload size
    client_max_body_size 15G;

    # Buffers
    fastcgi_buffers 64 4K;

    # Rather disable gzip! This would allow some attacks and that's not worth the performance improvement
    gzip off;
    # Enable gzip but do not remove ETag headers
    #gzip on;
    #gzip_vary on;
    #gzip_comp_level 4;
    #gzip_min_length 256;
    #gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
    #gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

    location / {
        rewrite ^ /index.php$request_uri;
    }

	location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
        deny all;
    }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
        deny all;
    }

    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param HTTPS on;
        #Avoid sending the security headers twice
        fastcgi_param modHeadersAvailable true;
        fastcgi_param front_controller_active true;
        fastcgi_pass php-handler;
        fastcgi_intercept_errors on;
        fastcgi_pass_header Authorization;
        fastcgi_pass_header http_oauth_token;
        fastcgi_pass_header oauth_token_secret;
        fastcgi_request_buffering off;
        fastcgi_read_timeout 150;       # added to solve issue with connection loss to php-fpm while downloading
    }

    location ~ ^/(?:updater|ocs-provider)(?:$|/) {
        try_files $uri/ =404;
        index index.php;
    }

    # Adding the cache control header for js and css files
    # Make sure it is BELOW the PHP block
    location ~ \.(?:css|js|woff|svg|gif)$ {
        try_files $uri /index.php$request_uri;
        add_header Cache-Control "public, max-age=15778463";
        # Add headers to serve security related headers (It is intended to
        # have those duplicated to the ones above)
        # Before enabling Strict-Transport-Security headers please read into
        # this topic first.
        # add_header Strict-Transport-Security "max-age=15768000;
        #  includeSubDomains; preload;";
        #
        # WARNING: Only add the preload option once you read about
        # the consequences in https://hstspreload.org/. This option
        # will add the domain to a hardcoded list that is shipped
        # in all major browsers and getting removed from this list
        # could take several months.
        add_header X-Content-Type-Options nosniff;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        add_header X-Download-Options noopen;
        add_header X-Permitted-Cross-Domain-Policies none;
        # Optional: Don't log access to assets
        access_log off;
    }

    location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
        try_files $uri /index.php$request_uri;
        # Optional: Don't log access to other assets
        access_log off;
    }

    location /sites/ {
        #rewrite /sites/(.*) https://$server_name/apps/cms_pico/pico/$1 redirect;

        rewrite /sites/(.*) /apps/cms_pico/pico/$1 break;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_pass https://cloud.mydomain.tld/;
    }
	
	location ~* \.(?:flv|mp4|mov|m4a)$ {
        mp4;
        mp4_buffer_size 30M;
        mp4_max_buffer_size 200M;

        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        #include fastcgi_params;
        #include php_optimization.conf;
        fastcgi_pass php-handler;
        fastcgi_param HTTPS on;
    }
}

@alexander_onlyoffice is there probably a direction you can point me to? Any hint, what the root cause for this issue might be or where I could search for it? Or do you know somebody else, who could help me? Should I rather open a thread in the onlyoffice forum?

Hello @Schmu, we apologize for the delayed response.

Have your tried to check the accessibility of Nextcloud and Document Server to each other? This error means that Nextcloud is inaccessible for the Document Server. Try to use wget https://nextcloud_address from the machine with Document Server and wget https://documentserver_address from the server where Nextcloud is installed.

Send us also all logs of Document Server, they should be in folder /var/log/onlyoffice/documentserver/ for package installation.

Hello @alexander_onlyoffice
Thank you very much for your response. No reason to apologize, I’m just glad you help me here :slight_smile:

NC and OO run on the same machine. Onlyoffice is reachable via https://office.mydomain.tld and it forwards to http://127.0.0.1:8000

When I run the healthcheck against that IP and also against the FQDN it returns true:

bash$ curl 127.0.0.1:8000/healthcheck
true
bash$ curl https://office.mydomain.tld/healthcheck
true

So it seems reachable.

The only log in /var/log/onlyoffice/documentserver/ is nginx.error.log. And it is empty. It only contains entries from January 15th when the services were not running and the documentserver was not reachable.
I just tried to integrate OO in NC again, received the error message in the NC web GUI and still, there is no new entry in the log.

@Schmu, we will try to reproduce the describe issue on our side. I will notify you about the result.

It is very odd behavior when there are no logs in this folder. Please check the status of Document Server services with a command supervisorctl status all

Did you delete just the docker image or a container with Document Server from your previous setup too?

@Schmu, could you please also show us the content of local.json. It should be in /etc/onlyoffice/documentserver/

Yes, I stopped the docker image and even deleted it completely. The services are all running:

/root/ # systemctl status onlyoffice-spellchecker
● onlyoffice-spellchecker.service - Onlyoffice documentserver
   Loaded: loaded (/usr/lib/systemd/system/onlyoffice-spellchecker.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-01-16 00:17:19 CET; 5 days ago
 Main PID: 706 (node)
    Tasks: 16 (limit: 4915)
   Memory: 77.2M
   CGroup: /system.slice/onlyoffice-spellchecker.service
           ├─706 /usr/bin/node /usr/share/webapps/onlyoffice/documentserver/server/SpellChecker/sources/server.js
           └─965 /usr/bin/node /usr/share/webapps/onlyoffice/documentserver/server/SpellChecker/sources/server.js

Jan 16 00:17:19 nextcloud systemd[1]: Started Onlyoffice documentserver.
Jan 16 00:17:19 nextcloud node[706]: [2019-01-16T00:17:19.609] [WARN] nodeJS - start cluster with 1 workers
Jan 16 00:17:19 nextcloud node[706]: [2019-01-16T00:17:19.618] [WARN] nodeJS - worker 965 started.
Jan 16 00:17:20 nextcloud node[706]: [2019-01-16T00:17:20.493] [WARN] nodeJS - Express server starting...
Jan 16 00:17:20 nextcloud node[706]: [2019-01-16T00:17:20.631] [WARN] nodeJS - Express server listening on port 8080 in production-linux mode
/root/ # systemctl status onlyoffice-docservice
● onlyoffice-docservice.service - Onlyoffice documentserver
   Loaded: loaded (/usr/lib/systemd/system/onlyoffice-docservice.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-01-16 00:17:19 CET; 5 days ago
 Main PID: 711 (node)
    Tasks: 20 (limit: 4915)
   Memory: 103.9M
   CGroup: /system.slice/onlyoffice-docservice.service
           ├─ 711 /usr/bin/node /usr/share/webapps/onlyoffice/documentserver/server/DocService/sources/server.js
           └─1015 /usr/bin/node /usr/share/webapps/onlyoffice/documentserver/server/DocService/sources/server.js

Jan 16 00:17:21 nextcloud node[711]: [2019-01-16T00:17:21.140] [ERROR] nodeJS - [AMQP] Error: connect ECONNREFUSED 127.0.0.1:5672
Jan 16 00:17:21 nextcloud node[711]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
Jan 16 00:17:22 nextcloud node[711]: [2019-01-16T00:17:22.142] [ERROR] nodeJS - [AMQP] Error: connect ECONNREFUSED 127.0.0.1:5672
Jan 16 00:17:22 nextcloud node[711]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
Jan 16 00:17:23 nextcloud node[711]: [2019-01-16T00:17:23.266] [WARN] nodeJS - Express server listening on port 8000 in production-linux mode
Jan 17 00:17:20 nextcloud node[711]: [2019-01-17T00:17:20.083] [WARN] nodeJS - update cluster with 1 workers
Jan 18 00:17:20 nextcloud node[711]: [2019-01-18T00:17:20.085] [WARN] nodeJS - update cluster with 1 workers
Jan 19 00:17:20 nextcloud node[711]: [2019-01-19T00:17:20.090] [WARN] nodeJS - update cluster with 1 workers
Jan 20 00:17:20 nextcloud node[711]: [2019-01-20T00:17:20.094] [WARN] nodeJS - update cluster with 1 workers
Jan 21 00:17:20 nextcloud node[711]: [2019-01-21T00:17:20.098] [WARN] nodeJS - update cluster with 1 workers
/root/ # systemctl status onlyoffice-spellchecker
● onlyoffice-spellchecker.service - Onlyoffice documentserver
   Loaded: loaded (/usr/lib/systemd/system/onlyoffice-spellchecker.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-01-16 00:17:19 CET; 5 days ago
 Main PID: 706 (node)
    Tasks: 16 (limit: 4915)
   Memory: 77.2M
   CGroup: /system.slice/onlyoffice-spellchecker.service
           ├─706 /usr/bin/node /usr/share/webapps/onlyoffice/documentserver/server/SpellChecker/sources/server.js
           └─965 /usr/bin/node /usr/share/webapps/onlyoffice/documentserver/server/SpellChecker/sources/server.js

Jan 16 00:17:19 nextcloud systemd[1]: Started Onlyoffice documentserver.
Jan 16 00:17:19 nextcloud node[706]: [2019-01-16T00:17:19.609] [WARN] nodeJS - start cluster with 1 workers
Jan 16 00:17:19 nextcloud node[706]: [2019-01-16T00:17:19.618] [WARN] nodeJS - worker 965 started.
Jan 16 00:17:20 nextcloud node[706]: [2019-01-16T00:17:20.493] [WARN] nodeJS - Express server starting...
Jan 16 00:17:20 nextcloud node[706]: [2019-01-16T00:17:20.631] [WARN] nodeJS - Express server listening on port 8080 in production-linux mode
/root/ #

Should I really have a folder /etc/onlyoffice/? There is none actually. I searched for local* in the webapps folder instead, just in case on my system that is maybe the folder you mean, but I only found these results:

# find /usr/share/webapps/onlyoffice/ -name local*
/usr/share/webapps/onlyoffice/documentserver/server/Common/node_modules/amazon-s3-url-signer/local_test.js
/usr/share/webapps/onlyoffice/documentserver/server/DocService/node_modules/moment/locale
/usr/share/webapps/onlyoffice/documentserver/server/DocService/node_modules/moment/min/locales.js
/usr/share/webapps/onlyoffice/documentserver/server/DocService/node_modules/moment/min/locales.min.js
/usr/share/webapps/onlyoffice/documentserver/server/DocService/node_modules/moment/src/lib/create/local.js
/usr/share/webapps/onlyoffice/documentserver/server/DocService/node_modules/moment/src/lib/locale
/usr/share/webapps/onlyoffice/documentserver/server/DocService/node_modules/moment/src/lib/locale/locale.js
/usr/share/webapps/onlyoffice/documentserver/server/DocService/node_modules/moment/src/lib/locale/locales.js
/usr/share/webapps/onlyoffice/documentserver/server/DocService/node_modules/moment/src/lib/moment/locale.js
/usr/share/webapps/onlyoffice/documentserver/server/DocService/node_modules/moment/src/locale
/usr/share/webapps/onlyoffice/documentserver/server/Metrics/node_modules/statsd/debian/localConfig.js
/usr/share/webapps/onlyoffice/documentserver/web-apps/apps/documenteditor/main/locale
/usr/share/webapps/onlyoffice/documentserver/web-apps/apps/documenteditor/mobile/locale
/usr/share/webapps/onlyoffice/documentserver/web-apps/apps/presentationeditor/main/locale
/usr/share/webapps/onlyoffice/documentserver/web-apps/apps/presentationeditor/mobile/locale
/usr/share/webapps/onlyoffice/documentserver/web-apps/apps/spreadsheeteditor/main/locale
/usr/share/webapps/onlyoffice/documentserver/web-apps/apps/spreadsheeteditor/mobile/locale

And there is the folder:
/usr/share/webapps/onlyoffice/documentserver/web-apps/apps/documenteditor/main/locale/
which contains json files for languages; for example de.json and en.json. These seem to be the translations only.

I just created the folder /etc/onlyoffice manually, gave it the user and group ownership onlyoffice:onlyoffice and triggered a re-installation/ rebuild of the package. I’ll check if that folder is filled with files and folders afterwards.

Just to make sure I made everything right:
After I installed the package I created the web server config files like posted in my second post and copied the web server conf files from /home/username/.cache/yay/onlyoffice-documentserver/src/etc/nginx/includes/ to /etc/nginx/includes/:

ll /etc/nginx/includes/
total 20K
drwxr-x--- 2 root root  179 Jan  6 13:48 .
drwxr-x--- 9 root root 4.0K Jan  6 13:48 ..
-rw-r----- 1 root root  523 Apr 22  2018 onlyoffice-documentserver-common.conf
-rw-r----- 1 root root 1.5K Apr 22  2018 onlyoffice-documentserver-docservice.conf
-rw-r----- 1 root root  122 Apr 22  2018 onlyoffice-documentserver-spellchecker.conf
-rw-r----- 1 root root  806 Apr 22  2018 onlyoffice-http.conf

I restarted nginx and afterwards the onlyoffice welcome page was accessible and the healthcheck succeeded. So I thought everything is alright.

@Schmu, could you please contact us at support@onlyoffice.com. The problem looks much more difficult and it seems that there is something wrong with the installation of Document Server. There are no logs, despite the services are active, and no configs, which have to be in this version. We would like to gather more information, as this is not a standard situation.

Hello @alexander_onlyoffice

Thank you again for your reply. I just sent the email. While describing some additional information in the mail and checking again on the server, I just found out that the package doesn’t install the config files to /etc/onlyoffice/
but to
/etc/webapps/onlyoffice/

So in this folder I have the default.json, but still I can’t find the local.json somewhere.
I downloaded the docker image again (didn’t start it), extracted the local.json from this docker image and copied it to /etc/webapps/onlyoffice/documentserver/

The content is:

{
  "services": {
    "CoAuthoring": {
      "sql": {
        "dbHost": "localhost",
        "dbName": "onlyoffice",
        "dbUser": "onlyoffice",
        "dbPass": "onlyoffice"
      },
      "redis": {
        "host": "localhost"
      },
      "token": {
        "enable": {
          "request": {
            "inbox": false,
            "outbox": false
          },
          "browser": false
        },
        "inbox": {
          "header": "Authorization"
        },
        "outbox": {
          "header": "Authorization"
        }
      },
      "secret": {
        "inbox": {
          "string": "secret"
        },
        "outbox": {
          "string": "secret"
        },
        "session": {
          "string": "secret"
        }
      }
    }
  },
  "rabbitmq": {
    "url": "amqp://guest:guest@localhost"
  }
}

After restarting the onlyoffice services I tried again to activate the integration, but still it failed with the error message, that converting is not possible.

Hello @alexander_onlyoffice

I checked my nextcloud log again and noticed these error message, that come up as soon as I open the Onlyoffice configuration page within the admin’s settings section “Onlyoffice”:

[PHP] Error: implode(): Invalid arguments passed at /var/www/nextcloud/apps/onlyoffice/templates/settings.php#66
GET /settings/admin/onlyoffice

[PHP] Error: count(): Parameter must be an array or an object that implements Countable at /var/www/nextcloud/apps/onlyoffice/templates/settings.php#64
GET /settings/admin/onlyoffice

Might this be the root cause? There was an PHP upgrade to version 7.3 on my server recently. Not sure if the app works fine with PHP 7.3.

I get exactly the same php error! :frowning:

[PHP] Error: implode(): Invalid arguments passed at /var/www/nextcloud/apps/onlyoffice/templates/settings.php#66
GET /settings/admin/onlyoffice

[PHP] Error: count(): Parameter must be an array or an object that implements Countable at /var/www/nextcloud/apps/onlyoffice/templates/settings.php#64
GET /settings/admin/onlyoffice

@ Schmu did you get an answer? Is there a fix?

Thanks

Hi @LukeVader,

We had an exchange of messages, but the last one is from 11 days ago, unfortunately. So far we didn’t make any progress. I don’t know how to debug this issue any further, nor do I have a solution yet.

It was said that my installation is probably broken, but I installed Onlyoffice from Arch Linux user repository
https://aur.archlinux.org/packages/onlyoffice-documentserver/

And it seems to work for other people.

If you have the same problem, maybe you can provide your log files (mine are empty or not existent). The following information was requested:

  • all log files you can find regarding onlyoffice
  • can Nextcloud and Document Server access each other? Please try:
    • wget https://nextcloud_address
    • wget https://documentserver_address

Hi @Schmu,

I had the same problem as you. I’ve updated my OnlyOffice container some days ago and I’ve been facing the same error message.

For me the problem came from the token feature. I’ve set up a token to prevent other people to use my OnlyOffice but since the local.json file was not located in a docker volume, the update of the docker erased the all content.

Hope that it can help.

Hi @LeVerbeux,

Thanks for that hint. I will check that. Need to setup the docker env then again. I tried a native Onlyoffice server (no docker) meanwhile, which had the same issue.

For anybody else who comes across this issue, please also double check that you add as a trusted site - on nextcloud - the ip address that the document server will be using to speak to nextcloud.

So if users will access nextcloud from https://office.yoursite.com but the onlyoffice document server speaks to nextcloud on http://10.0.0.2 ( or localhost 127.0.0.1) then I think you would need to add 10.0.0.2 to your trusted sites in your /path/to/nextcloud/config/config.php file.

Hope this helps

Dear All… I am having the same issues… I can get my site running but nothing else… Can edit documents or create them… Any suggestions…

I do have it under trust sites…

I did also add "‘onlyoffice’ => array (
‘verify_peer_off’ => true
)

But I am still getting this error when going under nextcloud -> [onlyoffice] Error: GetConvertedUri on check error: Error occurred in the document service: Error while downloading the document file to be converted.

PUT /apps/onlyoffice/ajax/settings/address