Error It looks like you are trying to reinstall

PHP 7.4
NC 20

I was using Nextcloud (reviewing Phonetrack app) when all of a sudden it bombed. The next thing I know, I’m unable to open Nextcloud. I get " Error - It looks like you are trying to reinstall your Nextcloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue."

I wasn’t making any server or software changes. I did not run out of disk space. The server and all the other software on it works fine. This just came out of the blue.

The Nextcloud error log is full of thousands of lines of this:
[02-Apr-2023 13:29:07 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /opt/alt/php74/usr/lib64/php/modules/imagick.so (libMagickWand-7.Q16HDRI.so.7: cannot open shared object file: No such file or directory), /opt/alt/php74/usr/lib64/php/modules/imagick.so.so (/opt/alt/php74/usr/lib64/php/modules/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

And then at the end this, over and over:

[02-Apr-2023 16:52:43 UTC] PHP Warning:  Module 'sqlite3' already loaded in Unknown on line 0
[02-Apr-2023 16:52:43 UTC] PHP Warning:  Cannot load module 'memcached' because required module 'igbinary' is not loaded in Unknown on line 0
[02-Apr-2023 16:52:43 UTC] PHP Warning:  Cannot load module 'redis' because required module 'igbinary' is not loaded in Unknown on line 0
[02-Apr-2023 16:52:58 UTC] PHP Warning:  Module 'sqlite3' already loaded in Unknown on line 0
...

[02-Apr-2023 16:55:38 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'sqlite3.so' (tried: /opt/alt/php74/usr/lib64/php/modules/sqlite3.so (/opt/alt/php74/usr/lib64/php/modules/sqlite3.so: cannot open shared object file: No such file or directory), /opt/alt/php74/usr/lib64/php/modules/sqlite3.so.so (/opt/alt/php74/usr/lib64/php/modules/sqlite3.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
...

What do you mean, precisely, by it bombed?

Also, unfortunately, you’re running an extremely old version of Nextcloud that isn’t supported any longer.

Can you give us some ideas what platform you’re trying to run Nextcloud on?

bombed = crashed. stopped working. All I could see was the message in the screenshot.

that’s very nice that there’s a new version, but what do I do? Can I get Nextcloud working again?

Environment is Apache Linux MySQL 5.7 and PHP 7.4

What OS is this?

The behavior you describe and the errors shown sound like the OS auto updated or something. Nextcloud itself can’t cause those errors, but it can be impacted by them.

The first place I’d look is the PHP installation.

OS is simply given as
Linux 3.10.0-962.3.2.lve1.5.65.el7.x86_64
Why does it matter? I have zero control over the OS, as I am using shared hosting.

What do you suggest I look at in the PHP installation?

Nextcloud is the only thing that crashed. All my other server software has been working normally … forum, gallery, email, everything … Zero problems with PHP.

Does Nextcloud have some kind of diagnostics or file integrity checker or anything?

What about the error message? Can I re-create my CAN_INSTALL file?

my config/config.php file simply contains

<?php
$CONFIG = array (
  'instanceid' => 'ockawirykxvf',
);

Shouldn’t there be more stuff in there?

I asked about the OS because making sure the underlying environment you’re hosting NC on meets the NC requirements is critical.

Are all your other apps using the same PHP installation? It looks like you likely have multiple parallel PHP installations.

The logs you posted - what file are they from? They look like the general PHP error logs. They’re not from the nextcloud.log which is what you need to look at to diagnose Nextcloud itself.

You can check the integrity of the NC installation by running ./occ integrity:check-core.

That config file definitely needs more to it.

Any chance you have backups to refer to?

Running NC is not like running a Forum/etc. It has a ton of dependencies and is a much bigger platform.

that doesn’t explain why NC would be working one second, and not the next. The environment didn’t suddenly change.

yes

Nope
https://mountainmanjoe.ca/troubleshoot/phpinfo.php

it’s greek to me
https://mountainmanjoe.ca/troubleshoot/nextcloud.log.zip

I don’t have shell

unfortunately not. Are there any scripts to rebuild it?

Sure. You can re-deploy exactly the same version you had previously over the top of your broken installation. Probably by way of a manual “upgrade” of exactly the same version you were using previously:

https://docs.nextcloud.com/server/20/admin_manual/maintenance/upgrade.html

You’ll need to locate or reset your database credentials since you no longer have your config.php.

You were using v20.0.5 from the looks of it:

P.S. Based on your logs, at 2023-03-30T23:11:57-07:00 something messed up your Nextcloud installation:

{"reqId":"ZCZ5c_GmSAy332T8994N2AAAAAI","level":3,"time":"2023-03-30T23:11:57-07:00","remoteAddr":"216.232.19.14","user":"--","app":"PHP","method":"GET","url":"/cloud/index.php/apps/phonetrack/log/opengts/90c956ab5c39855fe5b1a3b5763c33ea/b5305302e69780d8ade5805c066d692b?id=xt1040&dev=xt1040&acct=Joe&batt=100&code=0xF020&alt=39.0&gprmc=$GPRMC,060843,A,4916.54117,N,12251.56541,W,0.000000,0.000000,310323,,*0C","message":"include(): Failed opening '/home/mountain/public_html/cloud/lib/composer/composer/../../../lib/private/DB/QueryBuilder/QueryFunction.php' for inclusion (include_path='/home/mountain/public_html/cloud/3rdparty/pear/archive_tar:/home/mountain/public_html/cloud/3rdparty/pear/console_getopt:/home/mountain/public_html/cloud/3rdparty/pear/pear-core-minimal/src:/home/mountain/public_html/cloud/3rdparty/pear/pear_exception:/home/mountain/public_html/cloud/apps') at /home/mountain/public_html/cloud/lib/composer/composer/ClassLoader.php#444","userAgent":"okhttp/3.10.0","version":"20.0.5.2"}

Does /home/mountain/public_html/cloud/lib/private/DB/QueryBuilder/QueryFunction.php still exist?

whew! I finally have time to get back to this.
Yes, QueryFunction.php exists, and appears to be intact.

Interesting. That is the app I was using when NC crashed. How could that nuke my config file though.

is it normal for the ‘data/updater-oc20leygohzu’ folder to be 1.7 GB in size?

I grabbed the config.php file from one of the backups (nc/data/updater-oc20leygohzu/backups) and used it to replace my incomplete one.

After that my Nextcloud splash page was restored, but I was unable to login. Keeps saying “Wrong username or password.”
I reset the password, logged back in, and at first glance, I seem to be back up and running.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.