Lots of problems after upgrade: php memory limit, integrity check issues, cron job not running, and OnlyOffice not working anymore

Okay so there’s a lot of problems that have popped up after I updated to 16 and I think I fixed some of them, but I thought they might be connected so I’ll list them here concisely with as much supporting information as I can.

Problems

Lack of memory

I had an alert in my overview settings that said I lacked the min amount of memory. For some reason it seems that between my upgrade from 15.07 and 16 the parts of .htaccess and .user.ini that specified the max memory limit had been deleted. So I went to the back up of 15.07 and copy and pasted those parts into the .htaccess and .user.ini files. I also went to the etc./php/7.2/php.ini file and changed the max memory limit to 1GB

This got rid of the php message.

Cron Job not Running

I got an alert in my settings overview that cron job hadn’t run in 6 hours. I did some research and found that I could run it manually with

 sudo -u www-data php -f /var/www/nextcloud/cron.php

I ran that in terminal and I got a response saying that it was unable to run due to lack of memory. I thought I had fixed the memory issue but upon doing some googling found some places that said it had to be changed in the php.ini file (which I thought I had already changed). I noticed that I had put 1GB and the way that .htaccess had been set up was 1024M so I changed 1GB to 1024M and that seemed to fix it.

Also, as an aside, when I had originally change the php.ini it had said -1 for some reason which seems weird. What’s up with that?

Integrity check did not pass

I already know that directly editing the .htaccess and .user.ini files is a problem for the integrity check. I’ve had this problem before. But I was having that error message BEFORE I change those files. According to the report the broken files seems to be the addition of

- files_rightclick
	- EXTRA_FILE
		- README.md" 

That seems to be a readme file that was added to the files rightclick app plugin. I don’t know why it did that but it did.

After editing the .htaccess and .user.ini files they also showed up in the “effected files” report.

I have had this problem previously and was unable to fix it using the suggested methods in the forum. Since it didn’t fundamentally seem to be hurting anything I just left it.

My guess is that maybe when I did the upgrade to 16, it saw those files didn’t pass the integrity check so it just replaced them with new files, but for some reason did so without the addition of the memory limit information etc.

Only Office not running

This is what started this whole exploration. Only Office wasn’t working so I looked into it.

I had received an email reminder for certbot renewal which for some reason has stopped autorenewing on it’s own. I thought maybe that was it.

I’m running Only Office as a docker container, because this is how it was set up to be run by the Ansible script that I used to install NextCloud which can be found [here].

I had to shut down my nginx server and docker containers because certbot couldn’t run because nginx and docker-proxy was taking up port 80.

When I restarted the nginx server (and therefore NextCloud server) the docker container for Only Office did not restart. I was however able to get it to restart using docker container start onlyoffice .

Even with it restarted though, it still won’t connect. Either through the web app or by directly visiting the URL listed as Document Editing Service address in the OnlyOffice app plugin settings.

So… idk what’s up with that.

Misc Info from monitoring and logs

Version: 7.2.19

Memory Limit: 1 GB

Max Execution Time: 3600

Upload max size: 5.9 GB

some logs attained through web view:

[onlyoffice] Debug: Open: 6337097 /test.docx

GET /apps/onlyoffice/6337097?filePath=%2Ftest.docx
from 192.168.1.1 by admin at 2019-06-20T16:05:34+00:00

I see a bunch of stuff coming from the bookmarks app which looks like this

[bookmarks] Debug: getImage for URL: https://unsplash.com/ array (
  'basic' => 
  array (
    'title' => 'Beautiful Free Images & Pictures | Unsplash',
    'description' => 'Beautiful, free images and photos that you can download and use for any project. Better than any royalty free or stock photos.',
  ),
  'image' => 
  array (
    'small' => 'http://images.unsplash.com/photo-1556227834-09f1de7a7d14?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjEyMDd9',
    'favicon' => 'https://unsplash.com/favicon-32x32.png',
  ),
  'video' => 
  array (
  ),
  'url' => 'https://unsplash.com/',
)

at 2019-06-20T16:00:03+00:100:

A sample of the nextcloud access logs in my logs folder:

192.168.1.1 - david [20/Jun/2019:13:12:17 -0500] "PROPFIND /remote.php/dav/files/david/phone HTTP/2.0" 207 372 "-" "Mozilla/5.0 (Windows) mirall/2.5.2git (build 20190319) (Nextcloud)" "-" "cloud.jackalope.tech" sn="cloud.jackalope.tech" rt=0.033 ua="unix:/run/php/php7.2-fpm.sock" us="207" ut="0.032" ul="395" cs=-
192.168.1.1 - david [20/Jun/2019:13:12:17 -0500] "PROPFIND /remote.php/dav/files/david/Documents HTTP/2.0" 207 376 "-" "Mozilla/5.0 (Windows) mirall/2.5.2git (build 20190319) (Nextcloud)" "-" "cloud.jackalope.tech" sn="cloud.jackalope.tech" rt=0.044 ua="unix:/run/php/php7.2-fpm.sock" us="207" ut="0.048" ul="395" cs=-
192.168.1.1 - david [20/Jun/2019:13:12:17 -0500] "PROPFIND /remote.php/dav/files/david/work HTTP/2.0" 207 371 "-" "Mozilla/5.0 (Windows) mirall/2.5.2git (build 20190319) (Nextcloud)" "-" "cloud.jackalope.tech" sn="cloud.jackalope.tech" rt=0.047 ua="unix:/run/php/php7.2-fpm.sock" us="207" ut="0.048" ul="387" cs=-
192.168.1.1 - david [20/Jun/2019:13:12:28 -0500] "PROPFIND /remote.php/dav/files/david/phone HTTP/2.0" 207 372 "-" "Mozilla/5.0 (Linux) mirall/2.5.2git (Nextcloud)" "-" "cloud.jackalope.tech" sn="cloud.jackalope.tech" rt=0.043 ua="unix:/run/php/php7.2-fpm.sock" us="207" ut="0.044" ul="395" cs=-
192.168.1.1 - david [20/Jun/2019:13:12:28 -0500] "PROPFIND /remote.php/dav/files/david/Documents HTTP/2.0" 207 376 "-" "Mozilla/5.0 (Linux) mirall/2.5.2git (Nextcloud)" "-" "cloud.jackalope.tech" sn="cloud.jackalope.tech" rt=0.042 ua="unix:/run/php/php7.2-fpm.sock" us="207" ut="0.044" ul="395" cs=-
192.168.1.1 - - [20/Jun/2019:13:12:33 -0500] "GET /apps/logreader/poll?lastReqId=5h1nSjGPdDOeLObi60MM HTTP/2.0" 200 2 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" "-" "cloud.jackalope.tech" sn="cloud.jackalope.tech" rt=20.036 ua="unix:/run/php/php7.2-fpm.sock" us="200" ut="20.036" ul="25" cs=-
192.168.1.1 - - [20/Jun/2019:13:12:37 -0500] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 200 74 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0" "-" "cloud.jackalope.tech" sn="cloud.jackalope.tech" rt=0.041 ua="unix:/run/php/php7.2-fpm.sock" us="200" ut="0.040" ul="95" cs=-

Nothing in the NC or nginx error logs

EDIT: I just tried to make a change to the OnlyOffice settings and I got this response notificatio:

URL error 7: Failed to connect to cloud.jackalope.tech port 8443: Connection refused (see http://curl.haxx.se/libcurl

EDIT2:

Just gogled the error and I found this forum post which seems to have to do with my issue as it’s dealing with someone who used the same ansible script as me. OnlyOffice Integration https certificate failed

I added the extra line to the PHP.config and it does not seem to have fixed the issue. In fact it seems to have made it worse in a way? I still can’t save settings etc or access the document server but in addition to that, when I click on a document it doesn’t even attempt to open it in onlyoffice, it just defaults to downloading it. I also can’t create new docx documents via the Plus symbol in the web ui.