App to onlyoffice - DNS not working

Hello all,

I ran two separate VM server, one for nextcloud and one for onlyoffice document server.

Nextcloud version: 11.0.2 (stable)
Operating system and version: Centos 7 Kernel Version 3.10.0-514.10.2.el7.x86_64 (both server are same)
Apache and nginx version: Apache/2.4.6 (CentOS) on the nextcloud and nginx/1.10.3 on the document server
PHP version: PHP 5.6.30 (cli) (built: Jan 19 2017 22:31:39)
OnlyOffice Version : 4.3
Explorer: Edge and Chrome Version 57.0.2987.133

Is this the first time you’ve seen this error?: yes

Can you reliably replicate it? YES (If so, please outline steps):
If I setup the onyloffice serverdocument setting in nextcloud with IP I could run and open edit documents from nextcloud.
If I like to use DNS in that setting I got every time the same error:
ONLYOFFICE app not configured. Please contact admin

The issue you are facing:
no document could be opened / edit etc.

The output of your Nextcloud log in Admin > Logging:

{“reqId”:“Jipb4TdZU1CVYo7Muh71”,“remoteAddr”:"",“app”:“PHP”,“message”:“Undefined index: REQUEST_URI at /var/www/html/nextcloud/apps/onlyoffice/appinfo/application.php#65”,“level”:3,“time”:“2017-04-06T13:00:01+00:00”,“method”:"–",“url”:"–",“user”:"–",“version”:“11.0.2.7”}
{“reqId”:“Jipb4TdZU1CVYo7Muh71”,“remoteAddr”:"",“app”:“PHP”,“message”:“Undefined index: REQUEST_URI at /var/www/html/nextcloud/apps/onlyoffice/appinfo/application.php#65”,“level”:3,“time”:“2017-04-06T13:00:02+00:00”,“method”:"–",“url”:"–",“user”:"–",“version”:“11.0.2.7”}
{“reqId”:“qiH6oMfPepf9cu4cXSMh”,“remoteAddr”:"",“app”:“PHP”,“message”:“Undefined index: REQUEST_URI at /var/www/html/nextcloud/apps/onlyoffice/appinfo/application.php#65”,“level”:3,“time”:“2017-04-06T13:15:01+00:00”,“method”:"–",“url”:"–",“user”:"–",“version”:“11.0.2.7”}
{“reqId”:“qiH6oMfPepf9cu4cXSMh”,“remoteAddr”:"",“app”:“PHP”,“message”:“Undefined index: REQUEST_URI at /var/www/html/nextcloud/apps/onlyoffice/appinfo/application.php#65”,“level”:3,“time”:“2017-04-06T13:15:01+00:00”,“method”:"–",“url”:"–",“user”:"–",“version”:“11.0.2.7”}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php $CONFIG = array ( 'instanceid' => 'YYYY', 'passwordsalt' => 'XXXXX', 'secret' => 'CCCCCCCC', 'trusted_domains' => array ( 0 => 'x.x.x.x', 1 => 'cloud.domain.com', 2 => 'cloud', 3 => 'office', 4 => 'office.domain.com', 5 => 'FQDN of the office server', ), 'datadirectory' => '/var/www/html/nextcloud/data', 'overwrite.cli.url' => 'https://cloud.domain.com', 'dbtype' => 'mysql', 'version' => '11.0.2.7', 'dbname' => 'nextcloud_db', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'nxtuser', 'dbpassword' => 'xxxxxxxxxx', 'logtimezone' => 'UTC', 'installed' => true, 'tempdirectory' => '/var/www/html/nextcloud/data/temp/', 'memcache.local' => '\\OC\\Memcache\\APCu', 'mail_from_address' => 'cloud', 'mail_smtpmode' => 'smtp', 'mail_domain' => '**domain**.com', 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory', 'preview_libreoffice_path' => '/usr/bin/libreoffice', 'check_for_working_htaccess' => true, 'mail_smtphost' => 'x.x.x.x', 'mail_smtpport' => '25', ); The output of your Apache/nginx/system log in `/var/log/____`: x.x.x.x - - [06/Apr/2017:15:26:29 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 537 y.y.y.y - - [06/Apr/2017:15:26:35 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 610 x.x.x.x was an internal IP y.y.y.y was an external IP (my test) Beside my nextcloud server is available from internal as well externally, therefore I configured the ISP and gave both server an "sub" domain as well a separate official IP each. From external I got everytime the same error I described above (I need the DNS running and I guess it will work from extern too) Forgot to tell you: DNS / HOST (A) / aliase internally working fine (setup in my internal DNS server), ping etc. too, also all needed ports and service opened in the linux firewall setting in both server. Any suggestion would be nice!

Hi,

What is shown, when you enter
https://<url to your onlyoffice server>
into your browser? It should show a page reading:

Thank you for choosing ONLYOFFICE!
Document Server is running

If that isn’t the case SSL is probably not configured correctly.

So you didn’t use nginx as proxy and configured apache to handle both nextcloud and onlyoffice, right?

Hi,

it show me the Welcome page, that is working, but if I set the DNS in nextcloud setting that problem occurred.

Only different nextcloud do have a ssl cert from a certification vendor and my onlyoffice document server an own selfmade cert.

Ruediger

When you login to your NC VM, can you resolve the OnlyOffice on the command line correctly?

If not it would look like the OS DNS settings are not correct.

Looks like DNS issues. If you are using public DNS then a change or update can take several hours or a working day depending on which DNS your VMs are using.

Hi,

internally the DNS Name like the external but with an HOST (A) entry and the internal IP address, so therefore
one DNS with two different IP depending on where you are located (internal / extern).

All test internal redirect me to the right server’s web page!

External to the right server, so no problem with that DNS routing.

Hi,

DNS resolution everthing works well, what else could it be that the DNS name is not recognized!

Public DNS is setup internally equal that there is no interference upcoming. (I already described it)