HTTP500 after logging, and Webmin not able to show a page after login

,

I cannot logging to my Nextcloud server anymore, i am getting a HTTP500 error and like i mentioned Webmin is so slow after login i am not seeing a page after 25 minutes.

I know that Internal server errors are quite unspecific without further information. But i am pretty novice when it comes to linux. So i don’t know how and which logfile(s) i am suppose to supply you guys with. Could someone tell me where to look?

I am using Nextcloud 18.1 on a Hyper-V virtual machine running Ubuntu (The Hanssonit image file).

Many thanks in advance!

P.S. of course i used the search, but all the topics are specific because of the included logfiles. So not very helpful (for now).

did you check with df -h if a filesystem is full?
did you check with top if any process is running wild?

you can check with sudo systemctl status postgresql if your database is running. (assuming you use postgres on ubuntu. otherwise you have to use the service name of your database insstead of postgresql
same applies to php: sudo systemctl restart php7.2-fpm.service

I will check this. I have found that HTTP500 are often caused by misconfiguration so i should check (in this order):

  • Rights permission : files, folders, users
  • PHP-Timeout : is your php conf correct. sometimes, more memory, more timout is needed.
  • htaccess : double check structure, coding of your [.htaccess]
  • syntax and/or options for scripts CGI/Perl : names, locations, options settings
  • PHP-Memory-Limit be sure you have everything ok.
  • Database check users, access, rights

Is this correct? Like i said i will be back with the results from your commands. Thanks again!

@Reiner_Nippes,
Thanks for your reply!
NCdata is 100%. How do i delete an user (incl. the data) using the CLI? Since i am not able to login using a browser.

Will this delete the user including the data (also the bin)?

sudo -u www-data php occ user:delete user1

Yes, but i think it is nog going to work.
First you have to setup youre NC.

What do you mean “setup youre NC”? My NC was working, but most likely because ncdata is 100% it is stuck now. I have seen this before. So i think when i remove the one user i am thinking of the problem should be solved (after a reboot).

Since i only have one user, it would also be fine to completely delete all users and all user data.

I could just reinstall NC but i would like to know how to do this instead of taking the easy way out by reinstalling NC :slight_smile:

This shouldn’t be required. You can try to login on your system and delete stuff manually. A few things you could delete:
There often is a nextcloud.log, you can empty it (if you are not sure, if you might need it to debug other problems, copy it to a local drive or a USB stick before emptying).
the updater-xyz contains the code of the older versions and downloaded folders. If your last update was complete, you can empty that as well. Also updater.log.
Is that enough that you can run the occ command? With that you can just empty trash bins and delete versioned file data (if not needed any more). Perhaps this step is not required to login.

@tflidd,

Sounds good… Could you tell me how to do this? I still have to learn a lot when it comes to Linux.

Login with a browser is not possible so i will have to do it from the CLI.

Probably the easiest thing to do is delete old updates, and then login with a browser and empty the bin?

i haven’t run the delete command (sudo -u www-data php occ user:delete user1) because @thijssie85 said it probably wasn’t gonna work. I didn’t wanna run something that isn’t gonna work.

Do you think i should just try to run the occ command?

Here you have the occ commands with the trashbin: https://docs.nextcloud.com/server/18/admin_manual/configuration_server/occ_command.html?highlight=occ#trashbin-label

For the files, it is the best to navigate via CLI to the folders and check them. Or perhaps an SFTP-Client such as WinSCP.

I don 't need to look at the user files, deleting them is ok in this case.

Webaddress also the one i need to use when using WinSCP?

In your case just as root and as host the ip address or hostname (via sftp).

I am able login using sftp but what do i do next? the folder ncdata will not show anything. the rest of the folders do show things, but where to go from here?

using the command to empty trashbins:

sudo -u www-data php occ trashbin:cleanup --all-users

gives me an error: could not open input file: occ

That is strange. Is this a separate drive and perhaps not mounted?

I used the Hyper-v VM from Hans. and afterwards i added a extra virtual hard drive to the pool.

What is the location of youre data? Is that on the same location of youre NC installation, or is that on de extra drive in youre pool?

I have added two extra drives to the pool.

What is the output of youre config.php and of
df -h

@Operations Actually, the only thing you need to do is run the update script built into the VM (located in /var/scripts). It automatically checks if the disk is full and performs a cleaning of unneeded files like snapshots and trashbin.

You could also upgrade to a larger version of course:
https://shop.hanssonit.se/product-category/virtual-machine/nextcloud-vm/