Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem accessing Document server #161

Open
ejgutierrez74 opened this issue Nov 12, 2019 · 5 comments
Open

Problem accessing Document server #161

ejgutierrez74 opened this issue Nov 12, 2019 · 5 comments

Comments

@ejgutierrez74
Copy link

ejgutierrez74 commented Nov 12, 2019

I have a LEMP instance with ubuntu 18.04 …

My /etc/hosts:
127.0.0.1 localhost
127.0.0.1 nextcloud.eduardo.com
127.0.0.1 onlyoffice.eduardo.com

I have a working instance of nextcloud in: nextcloud.eduardo.com, and i want that file server would connect to onlyoffice which is in onlyoffice.eduardo.com…

I have installed document server using deb package as your documentation says…And seems to work as i can read the message document server works in onlyoffice.eduardo.com

Also would like that default server would be localhost pointing to /var/www/html as usual…

Here is all my configuration nginx in /etc/nginx
https://drive.google.com/drive/u/1/folders/1I2ZiRUKqmm8u5U5TsqyoOKUvfTwY-SPA

Now the problem im facing is that from nextcloud onlyoffice app i cant connect to http://onlyoffice.eduardo.com 2 ( before i was able), it gives unknown error connection not possible.

Summarising and sorry for my bad english:
in browser i go to nextcloud.eduardo.com and works
onlyoffice.eduardo.com and works ( the screen which says document server is running)

But when i want to connect the nextcloud with this app to onlyoffice i got the error:
Error in nextcloud app onlyoffice:
Error al intentar establecer la conexión (Se ha producido un error en el servicio de documentos: Unknown error)

From log:

{“reqId”:“nJyreNqj0QQWAmAft7wA”,“level”:1,“time”:“November 12, 2019 16:29:36”,“remoteAddr”:“127.0.0.1”,“user”:“nextcloudadmin”,“app”:“onlyoffice”,“method”:“PUT”,“url”:"/index.php/apps/onlyoffice/ajax/settings/address",“message”:“SetStorageUrl: “,“userAgent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0”,“version”:“16.0.6.1”}
{“reqId”:“nJyreNqj0QQWAmAft7wA”,“level”:0,“time”:“November 12, 2019 16:29:36”,“remoteAddr”:“127.0.0.1”,“user”:“nextcloudadmin”,“app”:“onlyoffice”,“method”:“PUT”,“url”:”/index.php/apps/onlyoffice/ajax/settings/address”,“message”:“CommandRequest on check: {“error”:0,“version”:“5.4.1.39”}”,“userAgent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0”,“version”:“16.0.6.1”}
{“reqId”:“nJyreNqj0QQWAmAft7wA”,“level”:3,“time”:“November 12, 2019 16:29:36”,“remoteAddr”:“127.0.0.1”,“user”:“nextcloudadmin”,“app”:“onlyoffice”,“method”:“PUT”,“url”:"/index.php/apps/onlyoffice/ajax/settings/address",“message”:“GetConvertedUri on check error: Se ha producido un error en el servicio de documentos: Unknown error”,“userAgent”:“Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0”,“version”:“16.0.6.1”}

Also if i curl both sites they work.

If you need some aditional information dont doubt to ask me...

@alexanderonlyoffice
Copy link

alexanderonlyoffice commented Nov 30, 2019

@ejgutierrez74, please specify some additional information about the problem:

  1. Are Nextcloud and Document Server installed on one server or on different servers?
  2. Send us all logs of the Document Server to support@onlyoffice.com with a note 'For technical support';
  3. If the Document Server and Nextcloud are deployed on separate servers, please check their accessibility to each other using wget command: https://nextcloud.eduardo.com from the server with Document Server and wget https://onlyoffice.eduardo.com from the server with Nextcloud;
  4. Specify why did you connect ip address of the localhost with the domain names in /etc/hosts/, as according to the SSL Checker, both domain names are connected to the different ip addresses.

@ejgutierrez74
Copy link
Author

ejgutierrez74 commented Nov 30, 2019

@alexanderonlyoffice

My first idea is to have all working in same server, accessing nextcloud with nextcloud.eduardo.com and docuemt server in onlyoffice.eduardo.com, both virtualhosts, and using self-signed certificates ( i dont want to use them as is educational purpose, but some people and tutorials told me that it was mandatory to use https to connect onlyoffice and nextcloud.

just to make it clearer you can find in the post a schema:
https://pastebin.com/riC9T1TH

and my nginx configurations in both sides:
https://drive.google.com/drive/folders/1I2ZiRUKqmm8u5U5TsqyoOKUvfTwY-SPA?usp=sharing

But as i didnt get with it im trying in different servers ( one ubuntuNC virtual machine and other UbuntuDS virtual machine...
So here you can find full more information.... if you need anything else just let me know...

https://help.nextcloud.com/t/not-able-to-connect-to-document-server/64337

Also error with self-signed certificate:

eduardo@eduardo-VirtualBox:~$ wget https://nextcloud.eduardo.com
--2019-11-30 13:15:11--  https://nextcloud.eduardo.com/
Resolviendo nextcloud.eduardo.com (nextcloud.eduardo.com)... 192.168.1.52
Conectando con nextcloud.eduardo.com (nextcloud.eduardo.com)[192.168.1.52]:443... conectado.
ERROR: no se puede verificar el certificado de nextcloud.eduardo.com, emitido por “emailAddress=edufissure@msn.com,CN=192.168.1.52,OU=Informatica,O=Almata,L=Balaguer,ST=Lleida,C=ES”:
  Se encontró un certificado autofirmado.
    ERROR: el nombre común “192.168.1.52” del certificado no encaja con el nombre de equipo “nextcloud.eduardo.com” solicitado.
Para conectar inseguramente a nextcloud.eduardo.com, use `--no-check-certificate'.

Dont know the problem because ive also tried with nextcloud.eduardo.com instead of 192.168.1.52, both names should be valid to generate self-signed certificates using openssl.

Seem problem is related to self-signed certificate that doesnt work well with document server...


eduardo@eduardo-VirtualBox:~$ wget https://onlyoffice.eduardo.com
--2019-11-30 13:28:58--  https://onlyoffice.eduardo.com/
Resolviendo onlyoffice.eduardo.com (onlyoffice.eduardo.com)... 192.168.1.51
Conectando con onlyoffice.eduardo.com (onlyoffice.eduardo.com)[192.168.1.51]:443... conectado.
ERROR: no se puede verificar el certificado de onlyoffice.eduardo.com, emitido por “emailAddress=edufissure@msn.com,CN=192.168.1.51,OU=Informatica,O=Almata,L=Balaguer,ST=Lleida,C=ES”:
  Se encontró un certificado autofirmado.
    ERROR: el nombre común “192.168.1.51” del certificado no encaja con el nombre de equipo “onlyoffice.eduardo.com” solicitado.
Para conectar inseguramente a onlyoffice.eduardo.com, use `--no-check-certificate'.
eduardo@eduardo-VirtualBox:~$ wget http://onlyoffice.eduardo.com
URL transformed to HTTPS due to an HSTS policy
--2019-11-30 13:29:07--  https://onlyoffice.eduardo.com/
Resolviendo onlyoffice.eduardo.com (onlyoffice.eduardo.com)... 192.168.1.51
Conectando con onlyoffice.eduardo.com (onlyoffice.eduardo.com)[192.168.1.51]:443... conectado.
ERROR: no se puede verificar el certificado de onlyoffice.eduardo.com, emitido por “emailAddress=edufissure@msn.com,CN=192.168.1.51,OU=Informatica,O=Almata,L=Balaguer,ST=Lleida,C=ES”:
  Se encontró un certificado autofirmado.
    ERROR: el nombre común “192.168.1.51” del certificado no encaja con el nombre de equipo “onlyoffice.eduardo.com” solicitado.
Para conectar inseguramente a onlyoffice.eduardo.com, use `--no-check-certificate'.
eduardo@eduardo-VirtualBox:~$ wget http://onlyoffice.eduardo.com --no-check-certificate
URL transformed to HTTPS due to an HSTS policy
--2019-11-30 13:29:59--  https://onlyoffice.eduardo.com/
Resolviendo onlyoffice.eduardo.com (onlyoffice.eduardo.com)... 192.168.1.51
Conectando con onlyoffice.eduardo.com (onlyoffice.eduardo.com)[192.168.1.51]:443... conectado.
AVISO: no se puede verificar el certificado de onlyoffice.eduardo.com, emitido por “emailAddress=edufissure@msn.com,CN=192.168.1.51,OU=Informatica,O=Almata,L=Balaguer,ST=Lleida,C=ES”:
  Se encontró un certificado autofirmado.
    AVISO: el nombre común “192.168.1.51” del certificado no encaja con el nombre de equipo “onlyoffice.eduardo.com” solicitado.
Petición HTTP enviada, esperando respuesta... 302 Moved Temporarily
Ubicación: https://onlyoffice.eduardo.com/welcome/ [siguiente]
--2019-11-30 13:29:59--  https://onlyoffice.eduardo.com/welcome/
Reutilizando la conexión con onlyoffice.eduardo.com:443.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 4592 (4,5K) [text/html]
Guardando como: “index.html.4”

index.html.4                  100%[===============================================>]   4,48K  --.-KB/s    en 0s      

2019-11-30 13:29:59 (466 MB/s) - “index.html.4” guardado [4592/4592]

I hve to add that probably this problem is related with ssl in both docker-document server and "normal" document server installation in Ubuntu Linux.

@alexanderonlyoffice
Copy link

@ejgutierrez74, please note that self-signed certificates cannot be trusted that is why you get these errors. Please try to disable verification of self-signed certificates by Nextcloud and Document Server. In order to do that on the side of Nextcloud, open config.php and the following section:

'onlyoffice' =>
  array (
    'verify_peer_off' => TRUE,
  )

As for the Document Server, open default.json in /etc/onlyoffice/documentserver/ (inside the docker container for docker installation) and find "rejectUnauthorized": true. Change its value from true to false and restart all services of the Document Server with a command supervisorctl restart all.

Integration between Nextcloud and Document Server is also possible if both of the instances are using HTTP protocol.

@LinneyS
Copy link
Member

LinneyS commented Dec 27, 2019

You can use internal IP for requests between Nextcloud and ONLYOFFICE containers. Please enter them in Advanced server settings.

What version of connector are you using?

@ejgutierrez74
Copy link
Author

Latest one installed in NC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants