resulted in a `503 Service Temporarily Unavailable`

Issues during installation, usage and configuring
Post Reply
propeto13
Posts: 2
Joined: Thu May 27, 2021 12:02 am

resulted in a `503 Service Temporarily Unavailable`

Post by propeto13 » Thu May 27, 2021 12:11 pm

Hopefully can get some help, but can't seem to get these two to play nice with each other.

-ONLYOFFICE...
https://documentserver.mydomain.com/healthcheck =true

-Nextcloud - ONLYOFFICE integration app...
Error when trying to connect (Server error: `GET https://documentserver.mydomain.com/healthcheck` resulted in a `503 Service Temporarily Unavailable` response:


here is some system/config

Code: Select all

Server configuration detail
Operating system: Linux 5.10.28-Unraid #1 SMP Wed Apr 7 08:23:18 PDT 2021 x86_64
Webserver: nginx/1.18.0 (fpm-fcgi)
Database: mysql 10.4.19
PHP version: 7.4.19

Nextcloud version: 21.0.2 - 21.0.2.1
 - onlyoffice: 7.0.2
<details><summary>Configuration (config/config.php)</summary>
{
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"40.40.10.5:444",
"nextcloud.mydomain.com",
"40.40.10.5:4430",
"documentserver.mydomain.com"
],
"memcache.local": "\\OC\\Memcache\\APCu",
"filelocking.enabled": "true",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"timeout": 0,
"password": "***REMOVED SENSITIVE VALUE***",
"dbindex": 0
},
"dbtype": "mysql",
"version": "21.0.2.1",
"overwrite.cli.url": "https://nextcloud.mydomain.com",
"overwritehost": "nextcloud.mydomain.com",
"overwriteprotocol": "https",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"activity_expire_days": 14,
"auth.bruteforce.protection.enabled": true,
"blacklisted_files": [
".htaccess",
"Thumbs.db",
"thumbs.db"
],
"cron_log": true,
"enable_previews": false,
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\Movie",
"OC\\Preview\\PDF",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown"
],
"filesystem_check_changes": 0,
"htaccess.RewriteBase": "/",
"default_locale": "en_US",
"default_phone_region": "US",
"integrity.check.disabled": false,
"knowledgebaseenabled": false,
"tempdirectory": "/nextcloudtemp",
"logfile": "/data/nextcloud.log",
"loglevel": 1,
"logtimezone": "America/New_York",
"log_rotate_size": 104857600,
"maintenance": false,
"preview_max_x": 1024,
"preview_max_y": 768,
"preview_max_scale_factor": 1,
"quota_include_external_storage": false,
"skeletondirectory": "",
"trashbin_retention_obligation": "auto, 7",
"updater.release.channel": "stable",
"simpleSignUpLink.shown": false,
"theme": "",
"has_rebuilt_cache": true,
"app_install_overwrite": [
"occweb",
"bruteforcesettings"
],
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpsecure": "ssl",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"twofactor_enforced": "true",
"twofactor_enforced_groups": [
"admin"
],
"twofactor_enforced_excluded_groups": [],
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
"updater.secret": "***REMOVED SENSITIVE VALUE***"
}

I try adding to NC config.php file but that did not resolve the error and establish connection between the two.
),
'allow_local_remote_servers' => true,
'onlyoffice' =>
array (
'verify_peer_off' => true,
),

also, i try modifying the /etc/onlyoffice/documentserver/default.json => set rejectUnauthorized to false => run supervisorctl restart all. clear cache, re-try to establish connection between the two. results in same error message
Error when trying to connect (Server error: `GET https://documentserver.mydomain.com/healthcheck` resulted in a `503 Service Temporarily Unavailable` response:

any help be greatly appreciated.

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

Re: resulted in a `503 Service Temporarily Unavailable`

Post by Alexandre » Wed Jun 02, 2021 4:04 pm

Hello propeto13.
Please provide us with additional information about your installation:
1. Are Document Server and Nextcloud installed on the separate servers?
2. Version of Document Server installed.
3. How you performed installation of Document Server, send us also the link to the guide you used.

As for the integration, please check my steps to integrate Document server to Nextcloud.

1. Go to Document Server. Open /etc/onlyoffice/documentserver/local.json (if you are using Docker installation > go inside of container) and check it,  JWT section looks like this:
 

Code: Select all

     "token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          },
          "browser": true
        },
        "inbox": {
          "header": "AuthorizationJwt",
          "inBody": false
        },
        "outbox": {
          "header": "AuthorizationJwt",
          "inBody": false
        }
      },
      "secret": {
        "inbox": {
          "string": "mysecret"
        },
        "outbox": {
          "string": "mysecret"
        },
        "session": {
          "string": "mysecret"
        }
      },
2. Then save local.json and close it. Restart all Document Server services with supervisorctl restart all;
3. Go to Nextcloud server > add the following section to config.php of Nextloud: 

Code: Select all

'onlyoffice' =>
 array (
  'jwt_secret' => 'mysecret',
  'jwt_header' => 'AuthorizationJwt',
),
Please note that value of jwt_secret should match the value of secret.string and jwt_header should match header value from local.json.

4. Go to Nextcloud portal > ONLYOFFICE connector page and click Save button. Please check the result.

If the error still persists, please check mutual availability between servers.
Go to Nextcloud server and run wget https://domain_name_of_ONLYOFFICE.
And vice versa.Go to ONLYOFFICE server and execute wget https://domain_name_of_Nextcloud
Please show us the result.

Also please attach to your reply whole Document Server logs folder after the issue is reproduced. It’s located here:
docker: /app/onlyoffice/DocumentServer/logs/documentserver/
deb\rpm: /var/log/onlyoffice/documentserver/

propeto13
Posts: 2
Joined: Thu May 27, 2021 12:02 am

Re: resulted in a `503 Service Temporarily Unavailable`

Post by propeto13 » Tue Jun 15, 2021 11:35 pm

1. both Nextcloud and Onlyoffice are installed on the same server.
2. onlyoffice latest (https://hub.docker.com/r/onlyoffice/documentserver/)
-only office nextcloud app 7.0.2
3. https://www.youtube.com/watch?v=fUPmVZ9CgtM
-i then used to NginxProxyManager to rever proxy nextcloud.

Code: Select all

NEXTCLOUD-
root@1190580d8465:/# wget https://documentserver.mydomain.com
Connecting to documentserver.mydomain.com (172.67.151.158:443)
Connecting to documentserver.mydomain.com (172.67.151.158:443)
wget: can't open 'index.html': File exists
root@1190580d8465:/# 

Code: Select all

OLYOFFICE-
# wget https:// nextcloud.mydomain.com
https://: Invalid host name.
URL transformed to HTTPS due to an HSTS policy
--2021-06-15 18:48:52--  https://nextcloud.mydomain.com/
Resolving nextcloud.mydomain.com (nextcloud.mydomain.com)... 172.67.151.158, 104.21.0.253, 2606:4700:3033::6815:fd, ...
Connecting to nextcloud.mydomain.com (nextcloud.mydomain.com)|172.67.151.158|:443... connected.
HTTP request sent, awaiting response... 503 Service Temporarily Unavailable
2021-06-15 18:48:52 ERROR 503: Service Temporarily Unavailable.

# 

Post Reply