Howto install Onlyoffice document server as Nextcloud app

OK, but I think there must be slightly different ? I used firefox latest version…

1 Like

I used Chrome.

Edit: Verified. Using Firefox (with self-signed cert) it works only after accessing the document server

Lets see how other people handle that…

It may depend on how the browsers handle invalid certs/trusted connections. I had similar effect once with firefox. I had to add https://documentserver:8082 to trusted connections.

4 Likes

So why use a self-signed cert? With the availability of Let’s Encrypt, there really doesn’t seem to be any reason not to use a trusted cert any more.

You’re right. I just did an install in a virtual machine for testing purposes.

I wonder what would happen if the certificate expires and there is no one who can renew it, for some days even weeks.
Can the services be used even with the certificate expired?
Or users are disabled to use the services that depend on this certificate? (mail, nextcloud, etc)

An expired cert is as invalid as one issued by an untrusted CA. But that’s part of the point of Let’s Encrypt: it’s supposed to be automated, so renewals are also automated.

3 Likes

Package update, please test it!

yum install https://smart-ict.services/mirror/devtest/nethserver-onlyoffice-0.0.1-3.ns7.noarch.rpm

Be careful, version 5.1.0 only supports valid not-self-signed certs. See the wiki page for more details and update instructions.

grafik

2 Likes

After updating from 5.0.7 and services restart or system reboot nginx fails with:

nginx: [emerg] open() "/etc/nginx/includes/onlyoffice-http.conf" failed (2: No such file or directory) in /etc/nginx/conf.d/onlyoffice-documentserver.conf:9

Clean install with 5.1.0 works ok. /var/log/messages shows:

Apr  2 12:31:52 server yum[3156]: Installed: nethserver-onlyoffice-0.0.1-3.ns7.noarch
Apr  2 12:31:54 server esmith::event[3301]: Event: nethserver-nginx-update

Apr  2 12:31:55 server systemd: Starting The nginx HTTP and reverse proxy server...

Apr  2 12:31:55 server nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Apr  2 12:31:55 server nginx: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Apr  2 12:31:56 server nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Apr  2 12:31:56 server nginx: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Apr  2 12:31:56 server nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Apr  2 12:31:56 server nginx: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Apr  2 12:31:57 server nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Apr  2 12:31:57 server nginx: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Apr  2 12:31:57 server nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Apr  2 12:31:57 server nginx: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Apr  2 12:31:58 server nginx: nginx: [emerg] still could not bind()
Apr  2 12:31:58 server systemd: nginx.service: control process exited, code=exited status=1
Apr  2 12:31:58 server systemd: Failed to start The nginx HTTP and reverse proxy server.
Apr  2 12:31:58 server systemd: Unit nginx.service entered failed state.
Apr  2 12:31:58 server systemd: nginx.service failed.
Apr  2 12:31:58 server esmith::event[3301]: Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
Apr  2 12:31:58 server esmith::event[3301]: [INFO] service nginx restart

Apr  2 12:32:00 server esmith::event[3301]: [WARNING] restart service nginx failed!
Apr  2 12:32:00 server esmith::event[3301]: Action: /etc/e-smith/events/actions/adjust-services FAILED: 1 [5.300511]
Apr  2 12:32:00 server esmith::event[3301]: Event: nethserver-nginx-update FAILED

Apr  2 12:32:06 server esmith::event[3484]: Event: nethserver-onlyoffice-update

Apr  2 12:32:06 server esmith::event[3484]: expanding /#
Apr  2 12:32:06 server esmith::event[3484]: ERROR: No templates were found for /#.
Apr  2 12:32:06 server esmith::event[3484]: at /etc/e-smith/events/actions/generic_template_expand line 64.
Apr  2 12:32:06 server esmith::event[3484]: [WARNING] expansion of /# failed
Apr  2 12:32:06 server esmith::event[3484]: expanding /etc/nginx/conf.d/onlyoffice-documentserver.conf
Apr  2 12:32:06 server esmith::event[3484]: expanding /etc/onlyoffice/documentserver/default.json
Apr  2 12:32:06 server esmith::event[3484]: ERROR: No templates were found for /etc/onlyoffice/documentserver/default.json.
Apr  2 12:32:06 server esmith::event[3484]: at /etc/e-smith/events/actions/generic_template_expand line 64.
Apr  2 12:32:06 server esmith::event[3484]: [WARNING] expansion of /etc/onlyoffice/documentserver/default.json failed
Apr  2 12:32:06 server esmith::event[3484]: expanding /var/lib/pgsql/data/pg_hba.conf
Apr  2 12:32:06 server esmith::event[3484]: Action: /etc/e-smith/events/actions/generic_template_expand FAILED: 1 [0.128948]

Apr  2 12:32:08 server systemd: Starting RabbitMQ broker...
Apr  2 12:32:08 server systemd: Cannot find unit for notify message of PID 3556.
Apr  2 12:32:08 server systemd: Cannot find unit for notify message of PID 3557.
Apr  2 12:32:08 server systemd: rabbitmq-server.service: Got notification message from PID 3558, but reception only permitted for main PID 3543
Apr  2 12:32:08 server systemd: Cannot find unit for notify message of PID 3580.
Apr  2 12:32:08 server systemd: rabbitmq-server.service: Got notification message from PID 3581, but reception only permitted for main PID 3543
Apr  2 12:32:08 server systemd: rabbitmq-server.service: Got notification message from PID 3582, but reception only permitted for main PID 3543

Apr  2 12:32:09 server systemd: Started RabbitMQ broker.

Apr  2 12:32:40 server esmith::event[3484]: [INFO] service rabbitmq-server is not configured: skipped

Apr  2 12:32:40 server esmith::event[3484]: [INFO] service supervisor is not configured: skipped

Apr  2 12:32:40 server esmith::event[3484]: Event: nethserver-onlyoffice-update FAILED

Finally services are able to start and working correctly. So some of those errors/warnings are benign.

Thanks for testing!

I had to reinstall the document server to get the missing config file (/etc/nginx/includes/onlyoffice-http.conf) again:

https://wiki.nethserver.org/doku.php?id=onlyoffice#something_s_not_working

I don’t know why this .conf file is missing sometimes? Maybe it’s a problem with the onlyoffice-documentserver.rpm? I think about templating the .conf file but if something changes in next update we have similar problem again.

Yes, on update the rpm deletes the file.

As you said, reinstallation brings files back. And signal-event nethserver-onlyoffice-update makes it work again (on one occassion).

onlyoffice-documentserver reinstallation (relevant actions):

new symbolic_link : /etc/nginx/includes/onlyoffice-documentserver-common.conf
new symbolic_link : /etc/nginx/includes/onlyoffice-documentserver-docservice.conf
new symbolic_link : /etc/nginx/includes/onlyoffice-documentserver-spellchecker.conf
new symbolic_link : /etc/nginx/includes/onlyoffice-http.conf
new symbolic_link : /etc/supervisord.d/onlyoffice-documentserver-converter.ini
new symbolic_link : /etc/supervisord.d/onlyoffice-documentserver-docservice.ini
new symbolic_link : /etc/supervisord.d/onlyoffice-documentserver-gc.ini
new symbolic_link : /etc/supervisord.d/onlyoffice-documentserver-metrics.ini
new symbolic_link : /etc/supervisord.d/onlyoffice-documentserver-spellchecker.ini
new symbolic_link : /etc/supervisord.d/onlyoffice-documentserver.ini
2 Likes

There’s a new onlyoffice-documentserver update to version 5.1.1:

yum install https://github.com/ONLYOFFICE/DocumentServer/releases/download/ONLYOFFICE-DocumentServer-5.1.1/onlyoffice-documentserver.x86_64.rpm

This new nethserver-onlyoffice package should work with the new documentserver version, if it’s tested I upload it to the repo:

yum install https://smart-ict.services/mirror/devtest/nethserver-onlyoffice-0.0.1-3.ns7.noarch.rpm

An install howto can be found here, just use the package above instead of the repo package.

1 Like

Update from onlyoffice-documentserver 5.1.0 to 5.1.1 with the new nethserver-onlyoffice package works.
The new nethserver-onlyoffice package has the same version number as the latter (forced installation with yum reinstall).

Details

---> Package onlyoffice-documentserver.x86_64 0:5.1.0-115 will be updated
---> Package onlyoffice-documentserver.x86_64 0:5.1.1-23 will be an update
Failed to start The Apache HTTP Server (port conflict due to documentserver update changing nginx conf files?: fixed later by nethserver-onlyoffice)
Apr  8 00:07:29 server httpd: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Apr  8 00:07:29 server httpd: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Apr  8 00:07:29 server httpd: no listening sockets available, shutting down
Apr  8 00:07:29 server httpd: AH00015: Unable to open logs
Apr  8 00:07:29 server systemd: httpd.service: main process exited, code=exited, status=1/FAILURE
Apr  8 00:07:29 server kill: kill: cannot find process ""
Apr  8 00:07:29 server systemd: httpd.service: control process exited, code=exited status=1
Apr  8 00:07:29 server systemd: Failed to start The Apache HTTP Server.
Apr  8 00:07:29 server systemd: Unit httpd.service entered failed state.
Apr  8 00:07:29 server systemd: httpd.service failed.
yum reinstall https://smart-ict.services/mirror/devtest/nethserver-onlyoffice-0.0.1-3.ns7.noarch.rpm
---> Package nethserver-onlyoffice.noarch 0:0.0.1-3.ns7 will be reinstalled
nethserver-onlyoffice (/var/log/messages)
Apr  8 00:21:38 server esmith::event[2604]: expanding /#
Apr  8 00:21:38 server esmith::event[2604]: ERROR: No templates were found for /#.
Apr  8 00:21:38 server esmith::event[2604]: at /etc/e-smith/events/actions/generic_template_expand line 64.
Apr  8 00:21:38 server esmith::event[2604]: [WARNING] expansion of /# failed
Apr  8 00:21:38 server esmith::event[2604]: expanding /etc/nginx/conf.d/onlyoffice-documentserver.conf
Apr  8 00:21:38 server esmith::event[2604]: expanding /etc/onlyoffice/documentserver/default.json
Apr  8 00:21:38 server esmith::event[2604]: ERROR: No templates were found for /etc/onlyoffice/documentserver/default.json.
Apr  8 00:21:38 server esmith::event[2604]: at /etc/e-smith/events/actions/generic_template_expand line 64.
Apr  8 00:21:38 server esmith::event[2604]: [WARNING] expansion of /etc/onlyoffice/documentserver/default.json failed

Apr  8 00:22:02 server esmith::event[2604]: Event: nethserver-onlyoffice-update FAILED

Clean install went ok.
Update from 5.0.7 to 5.1.1 had the same problems as reported earlier, but worked after reinstall of onlyoffice-documentserver and issuing signal-event nethserver-onlyoffice-update

2 Likes

Thanks for testing!

I really have to improve my versioning system for testing :slightly_smiling_face:

Yes but I don’t see a way for solving it except maybe repack the documentserver in some way.

This is strange because these errors were fixed and do not occur on a fresh install. They were because of a wrong comment interpreted as template and /etc/onlyoffice/documentserver/default.json was templated in the old version. Maybe it’s just because of the reinstall.

You’re right, doesn’t happen on a clean install.

Don’t know which is the best option (the one with lesser hassle for both you, as maintainer, and users). stephdl or dev_team might be able to give some advice.
Hosting the package on your repo you’ll have more control on updates and possible troubles at the cost of extra bandwidth usage. Using nethserver-onlyoffice to download external package (i.e. as some flash player packages did IIRC) you have control on the order of installation and signaling events without affecting your bandwidth, but don’t know if it’s considered a good practice or accepted by the terms of use of external package.

1 Like

I found out that an update from nethserver-onlyoffice 0.0.1-2 to 0.0.1-3 only works with documentserver 5.0.7 because of the templated /etc/onlyoffice/documentserver/default.json which only fits to the old version. I try to find a solution but if it’s too much effort I’d release a “hard” update, where one has to manually reinstall the documentserver. Future updates will work smoothly as default.json is not templated anymore.

This is a good option. This way we can test new docserver rpms with direct install and if they work we update the repo.

For the future repackaging or integrating like you described are the way to go but I have to learn first…

Released the update to fix future documentserver update problems.

4 Likes

47 posts were split to a new topic: Get onlyoffice to work with nextcloud

Ok mrmarkuz it’s working thank for de port 8082 I put it and is working now.

1 Like