Nextcloud Error - help needed

Hi all. The Turris MOX log in page allows me to log in. This is normal behavior. A short time later I find that I am logged out and when I attempt to go back in I am presented with a new account page. Please refer to the images below - you will see what I mean. If I pull the plug and reboot MOX the normal login works - but only for a time.

Any ideas?

I can access MOX via ssh during the time I am logged out.

I have looked at logs - but unsure what may be driving this. For example… see below. It has a number of references to mysql. and InnoDB.

NB ---- subnote — a while back I had to reset the Turris MOX after a power failure.

Jun 16 08:14:45 turris kernel: [ 67.727651] usb 2-1-port3: over-current condition
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Note] /usr/sbin/mysqld (mysqld 10.4.11-MariaDB) starting as process 3711 …
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 4184)
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Warning] Changed limits: max_open_files: 1024 max_connections: 151 (was 151) table_cache:
421 (was 2000)
Jun 16 08:14:45 turris kernel: [ 67.777165] usb usb3-port4: over-current condition
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Note] InnoDB: Using Linux native AIO
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Note] InnoDB: Uses event mutexes
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Note] InnoDB: Number of pools: 1
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Note] InnoDB: Using generic crc32 instructions
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
Jun 15 22:44:45 turris mysqld[3711]: 2020-06-16 8:14:45 0 [Note] InnoDB: Initializing buffer pool, total size = 64M, instances = 1, chunk size = 64M
Jun 16 08:14:46 turris kernel: [ 67.967387] usb 2-1-port4: over-current condition
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [Note] InnoDB: Completed initialization of buffer pool
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can b
e changed. See the man page of setpriority().
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [Note] InnoDB: Header page consists of zero bytes in datafile: ./ibdata1, Space ID:0, Flags:
0
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile ‘./ibdata1’ coul
d not be found in the doublewrite buffer.
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
Jun 16 08:14:46 turris kernel: [ 68.017141] usb usb3-port1: over-current condition
Jun 16 08:14:46 turris kernel: [ 68.257248] usb usb3-port2: over-current condition
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [Note] InnoDB: Starting shutdown…
Jun 16 08:14:46 turris kernel: [ 68.497181] usb usb3-port3: over-current condition
Jun 16 08:14:46 turris kernel: [ 68.737371] usb usb3-port4: over-current condition
Jun 16 08:14:45 turris kernel: [ 68.927436] usb 2-1-port4: over-current condition
Jun 16 08:14:45 turris kernel: [ 68.977305] usb usb3-port1: over-current condition
Jun 16 08:14:46 turris kernel: [ 69.167535] usb 2-1-port1: over-current condition
Jun 16 08:14:46 turris kernel: [ 69.217269] usb usb3-port2: over-current condition
Jun 16 08:14:46 turris kernel: [ 69.407417] usb 2-1-port2: over-current condition
Jun 16 08:14:46 turris kernel: [ 69.457227] usb usb3-port3: over-current condition
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [ERROR] Plugin ‘InnoDB’ init function returned error.
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Jun 15 22:44:46 turris mysqld[3711]: 2020-06-16 8:14:46 0 [ERROR] Aborting
Jun 16 08:14:46 turris kernel: [ 69.937258] usb usb3-port1: over-current condition

Much has happened since this post. A lot of the focus has been on diagnosing the mysql errors and InnoDB problems. Early in the piece the Nextcloud interface stopped working. Forris and Luci are all accessible while Nextcloud says 404 not found. I may have to go to Technical support with this.

Nextcloud is a bit hungry for system resources, so if you have it in /tmp or /var you will lost everything everytime you reboot your router.
just from log you posted seems … “tempfile” for mysql in /tmp is not good idea as well it seems that mysqld/innodb is looking for ./ibdata1 file. Do you have all path/rundirs correctly set?

I am Omnia user, so i do not know how the nextcloud is integrated in MOX(via foris??) variant of turris. Itried nextcloud directly and later due some issue - similar to yours i put nextcloud into LXC container, where i had all options ; later hunger for cpu/ram and lack of usage i actually remove it…)
When i was trying the nextcloud i remember i had to install and configure mariadb myself and set it up and connect nextcloud to it coz only “filesystem” storage plugin was supported by that version.

Since my last post Turris Mox is now running Turris 5.0.1 - - - yay!
But I digress. . . . Nextcloud is refusing to work. It would appear that its Hard Drive Storage is faulty. E.g.


Jun 20 19:23:15 turris kernel: [ 33.144108] usb usb3-port1: over-current condition
Jun 20 09:53:15 turris procd: /etc/rc.d/S95mysqld: 2020-06-20 19:23:15 0 [Warning] InnoDB: Retry attempts for reading partial data failed.
Jun 20 09:53:15 turris procd: /etc/rc.d/S95mysqld: 2020-06-20 19:23:15 0 [ERROR] InnoDB: Tried to read 16384 bytes at offset 147456, but was only able t
o read 0
Jun 20 09:53:15 turris procd: /etc/rc.d/S95mysqld: 2020-06-20 19:23:15 0 [ERROR] InnoDB: Operating system error number 5 in a file operation.
Jun 20 09:53:15 turris procd: /etc/rc.d/S95mysqld: 2020-06-20 19:23:15 0 [ERROR] InnoDB: Error number 5 means ‘I/O error’
Jun 20 09:53:15 turris procd: /etc/rc.d/S95mysqld: 2020-06-20 19:23:15 0 [Note] InnoDB: Some operating system error numbers are described at https://mar
iadb.com/kb/en/library/operating-system-error-codes/

In addition the Over current condition may be a factor as Nextcloud has a usb connected hard drive.
Any ideas - - - suggestions? I am getting a million logs telling me about the usb overcurrent issue.

Addendum 25-06-20

I get many logs like this. Has anyone seen something similar? Is is a bug?

[ 48.764590] usb usb3-port1: over-current condition
[ 48.775121] usb 2-1-port1: over-current condition
[ 49.005997] usb usb3-port2: over-current condition
[ 49.244753] usb usb3-port3: over-current condition
[ 49.484812] usb usb3-port4: over-current condition
[ 49.495583] usb 2-1-port4: over-current condition
[ 49.724785] usb usb3-port1: over-current condition
[ 49.736288] usb 2-1-port1: over-current condition
[ 49.964723] usb usb3-port2: over-current condition
[ 50.204793] usb usb3-port3: over-current condition
[ 50.444713] usb usb3-port4: over-current condition
[ 50.455174] usb 2-1-port4: over-current condition
[ 50.684820] usb usb3-port1: over-current condition

Thanks for your comments. . especially the highlighted text. It is helpful to hear about the “user experience” from others.

Not much progress here. My system is now running Turris 5.0.1 however Nextcloud is not working. I cannot get the Nextcloud web interface to show. After much work mysql is present.

~# ps aux | grep mysql
mysql 3670 0.3 6.7 477144 69172 ? Sl 02:12 0:02 /usr/sbin/mysqld

It seems my nextcloud “server” is not working - any ideas on how to diagnose this?
Naturally nextcloud is installed, and I have a root account to work with.

There should be a log file nextcloud.log in the data directory of the nextcloud installation. Might check that for clues

My install does not seem to have a nextcloud.log for some reason.
The below services are working. However I cannot get the lighttpd web page to appear.
The www directory did not have a nextcloud folder. . so I added one but it is empty.
Lighttpd.conf has server.document-root = “/www” . I am manually mounting the data drive at the moment, so I guess this is not working as it should - - - still going on this.

ps aux | grep mysqld

mysql 3728 0.3 6.7 477148 69196 ? Sl 14:34 0:01 /usr/sbin/mysqld
root 4401 0.0 0.0 1316 640 pts/0 S+ 14:42 0:00 grep mysqld


root@turris:~# ps aux | grep php
root 3078 0.0 0.4 295604 5020 ? Ss 14:34 0:00 php-fpm: master process (/etc/php7-fpm.conf)
nobody 3079 0.0 0.4 295624 4956 ? S 14:34 0:00 php-fpm: pool www
nobody 3080 0.0 0.4 295624 4956 ? S 14:34 0:00 php-fpm: pool www
root 4408 0.0 0.0 1316 572 pts/0 S+ 14:42 0:00 grep php


root@turris:~# ps aux | grep lighttpd
root 3314 0.1 0.5 6604 5500 ? S 14:34 0:00 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
root 4445 0.0 0.0 1316 572 pts/0 S+ 14:43 0:00 grep lighttpd