Get onlyoffice to work with nextcloud

nextcloud
onlyoffice

(Vinit Makol) #1

Good Morning, I am trying to get onlyoffice to work with nextcloud, and struggling a bit…

I followed the installation steps on wiki, and installed documentserver 5.07, and its running on the port 8082, but I keep getting the following message when trying to open a document. PDF files open just fine.
I even tried the re-install option and then recreated the database, but with same results. Any ideas?

Internal Server Error
The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.

Technical details
Remote Address: 192.168.1.3
Request ID: Wt2MU8f2-QOi58yz8F8rOwAAAAc


Howto install Onlyoffice document server as Nextcloud app
(Markus Neuberger) #2

I couldn’t reproduce the “internal server error” in a first test. Did you try to save the settings and see if it works? https://wiki.nethserver.org/doku.php?id=onlyoffice#save_button
Is it the same machine where you installed guacamole?

You may try to restart the documentserver and see if there are errors:

supervisorctl restart all

Please check the following logfiles:

  • /var/log/nginx/access.log
  • /var/log/nginx/error.log
  • /var/lib/nethserver/nextcloud/nextcloud.log
  • /var/log/messages

(Vinit Makol) #3

Yes its the same machine as guacamole. Its working flawlessly and we are loving it. My team’s productivity has improved tremendously.

–No errors in access.log

–From access.log
2018/04/22 12:35:55 [emerg] 12333#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: bind() to [::]:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: bind() to [::]:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: bind() to [::]:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: bind() to [::]:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: bind() to [::]:80 failed (98: Address already in use)
2018/04/22 12:35:55 [emerg] 12333#0: still could not bind()

/var/lib/nethserver/nextcloud/nextcloud.log
/var/log/messages
I don’t see any obvious errors. Here are the files.

When I try the save, I get an error ‘Unable to connect’


(Markus Neuberger) #4

Do these symbolic links exist? If not please try another reinstallation:

I saw you already use Letsencrypt cert and FQDN. Then you may just try to update to a newer documentserver (tested until 5.1.1) version. I saw there’s a new version 5.1.2 available, I have to test it. Seems onlyoffice releases quite often.

Thank you very much for this motivating feedback!

This error usually occurs only once because documentserver depends on nginx and default nginx wants to listen on port 80 where apache already listens. With nethserver-nginx, which is required by nethserver-onlyoffice, this error gets fixed.
As you wrote that the documentserver is running (I assume you can see the documentserver page on port 8082) we can ignore this nginx error.

This seems to be an old log. Newest entry is from Apr 17 14:15:21.


(Vinit Makol) #5

The links are missing. I tried installing version 5.1.1 but they were not created. I checked and the document server is running on 8082.


(Markus Neuberger) #6

Did you open port 8082 to the public? I tried to reach your documentserver without success. And you have to use FQDN from version 5.1.0 on, even if internal.

EDIT:

I tried to open your onlyoffice-http.conf file and got the “Internal server error” too.

grafik

text files are not opened by onlyoffice by default (or did you set txt files too?) so maybe there’s some error in the Nextcloud config.

grafik


(Vinit Makol) #7

Just opened port 8082 to public. Yes, I set txt files as well. I am getting the same message for all file types.


(Markus Neuberger) #8

I tried but it’s not open:

[root@testserver ~]# nmap -p 8082 yourdomain.com
PORT     STATE    SERVICE
8082/tcp filtered blackice-alerts

(Vinit Makol) #9

[root@gateway ~]# nmap -p 8082 vmakol.com

Starting Nmap 6.40 ( http://nmap.org ) at 2018-04-24 15:09 CEST
Nmap scan report for vmakol.com (217.71.195.125)
Host is up (490s latency).
rDNS record for 217.71.195.125: 125.195.71.217.wimax.clients.aeromax.es
PORT STATE SERVICE
8082/tcp open blackice-alerts

I tried from an external ip and I am unable to see https://vmakol.com:8082

Not sure whats going on… Internally its working fine, both with ip address and domain name.


(Vinit Makol) #10

I tried port 980 and that works fine from the outside.


(Markus Neuberger) #11

Is the service allowed on red?

config show fw_onlyoffice


(Vinit Makol) #12

[root@gateway ~]# config show fw_onlyoffice
fw_onlyoffice=service
TCPPort=8082
access=red,green
host=217.71.195.125
status=enabled
[root@gateway ~]# config show fw_onlyoffice
fw_onlyoffice=service
TCPPort=8082
access=red,green
host=217.71.195.125
status=enabled


(Vinit Makol) #13

[root@gateway ~]# nmap -sT -O localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2018-04-24 15:30 CEST
RTTVAR has grown to over 2.3 seconds, decreasing to 2.0
RTTVAR has grown to over 2.3 seconds, decreasing to 2.0
RTTVAR has grown to over 2.3 seconds, decreasing to 2.0
RTTVAR has grown to over 2.3 seconds, decreasing to 2.0
RTTVAR has grown to over 2.3 seconds, decreasing to 2.0
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00037s latency).
Not shown: 986 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
111/tcp open rpcbind
443/tcp open https
3128/tcp open squid-http
3306/tcp open mysql
5432/tcp open postgresql
8000/tcp open http-alt
8009/tcp open ajp13
8080/tcp open http-proxy
8082/tcp open blackice-alerts
9001/tcp open tor-orport
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3
OS details: Linux 3.7 - 3.9
Network Distance: 0 hops


(Markus Neuberger) #14

Please set your domain as host to avoid future problems with IP.

You may try

shorewall clear

to check if the firewall blocks.

Start it again after the test with

systemctl restart shorewall


(Vinit Makol) #15

I tried but that is causing other services to fail.

Task completed with errors
Adjust service nginx #45 (exit status 1)
restart service nginx failed!
Adjust service nginx #208 (exit status 1)
restart service nginx failed!
Adjust service nginx #312 (exit status 1)
failed


(Vinit Makol) #16

And now when I change it back to the original, I am still getting the errors.
Task completed with errors
Adjust service nginx #45 (exit status 1)
restart service nginx failed!
Adjust service nginx #208 (exit status 1)
restart service nginx failed!
Adjust service nginx #312 (exit status 1)
failed


(Vinit Makol) #17

Do I need to reinstall guacamole?


(Markus Neuberger) #18

No, I don’t think it’s a guacamole problem.


(Vinit Makol) #19

but it has stopped working.


(Markus Neuberger) #20

Maybe there was a misunderstanding.

I meant to set the onlyoffice host property to yourdomain.tld instead of the IP with

config setprop fw_onlyoffice host yourdomain.tld
signal-event nethserver-onlyoffice-update

It seems like you changed the hostname of your nethserver.