Oc_jobs corruption (nc14)

Hello!

my Nextcloud instance works quite well, I discovered to be in trouble creating a new user.

/var/log/syslog

Dec  7 15:52:02 ubu-scintycloud mysqld: 2019-12-07 15:52:02 7f33b6eea700  InnoDB: table "nextcloud"."oc_jobs"is corrupted. Please drop the table and recreate

I tried without success a mysqlrepair

adminubu@ubu-scintycloud:~$ sudo mysqlrepair nextcloud oc_jobs
Failed to SHOW CREATE TABLE `oc_jobs`
Error: Table 'nextcloud.oc_jobs' doesn't exist in engine

What is the scope of this table?
What is the best solution?

  1. build the table from scratch
  2. recover the table from a previous backup
  3. roll back the full VM to a previous state
  4. other suggestions

Nextcloud version 14:
Operating system and version Ubuntu 16.04:

asking mysqld version with a mistyping gives some idea of possible troubles or optimizations:

191207 16:10:03 [Note] mysqld (mysqld 10.0.38-MariaDB-0ubuntu0.16.04.1) starting as process 4343 ...
191207 16:10:03 [Warning] Can't create test file /var/lib/mysql/ubu-scintycloud.lower-test
mysqld: One can only use the --user switch if running as root
191207 16:10:03 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

191207 16:10:03 [Note] InnoDB: Using mutexes to ref count buffer pool pages
191207 16:10:03 [Note] InnoDB: The InnoDB memory heap is disabled
191207 16:10:03 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
191207 16:10:03 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
191207 16:10:03 [Note] InnoDB: Compressed tables use zlib 1.2.8
191207 16:10:03 [Note] InnoDB: Using Linux native AIO
191207 16:10:03 [Note] InnoDB: Not using CPU crc32 instructions
191207 16:10:03 [Note] InnoDB: Initializing buffer pool, size = 128.0M
191207 16:10:03 [Note] InnoDB: Completed initialization of buffer pool
191207 16:10:03 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
191207 16:10:03 [ERROR] InnoDB: The system tablespace must be writable!
191207 16:10:03 [ERROR] Plugin 'InnoDB' init function returned error.
191207 16:10:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
191207 16:10:03 [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
191207 16:10:03 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
191207 16:10:03 [ERROR] Plugin 'Aria' init function returned error.
191207 16:10:03 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
191207 16:10:03 [Note] Plugin 'FEEDBACK' is disabled.
191207 16:10:03 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
191207 16:10:03 [ERROR] mysqld: unknown option '--versioe'
191207 16:10:03 [ERROR] Aborting

191207 16:10:03 [Note] mysqld: Shutdown complete

Thanks for your help!

In this table are regular jobs that are run by cron. If your backup is not very old, I’d try restore from there this first. If the table does not exist currently, you can check if the occ-command with the repair step can restore it:
https://docs.nextcloud.com/server/14/admin_manual/configuration_server/occ_command.html?highlight=commands#maintenance-commands-label

NC14 is not supported any more, even 15 falls out of support end of this year, so prepare to update to NC 16 soon.

Thanks for your help!

In the meanwhile I tried:

  1. take a snapshot of the current state
  2. restored the August VM backup (not so old for my personal use)
  3. dumped the oc_jobs table from this backup
  4. restored the backup

it looks like not issuing problem any more, also the new user creation was fine.

Then I started the upgrade process that is gone okay until version 16.
Then I received the required PHP upgrade message.

Because the Ubuntu was sticking on 16.04 I did the upgrade to 18.04.
Then I face several PHP problems from the update script.

I found a post here listing the php 7.3 packets needed to Nextcloud.
Then I proceed to install php 7.3 and follow the post.

Now I’m up and running with NC17 ! :slight_smile:

1 Like