Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] Linuxserver.io - Nextcloud

Featured Replies

19 hours ago, nekromantik said:

anyone?

Are you able to connect to that DB from another client? some DB viewer?

  • Replies 7.1k
  • Views 1.7m
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Here's my list of instructions....    Use them at your own risk.....   If upgrading to v12 please see here:   ##Turn on maintenance mode docker exec -it nextcloud occ m

  • When i did enter the docker container with ssh and did run the following command the error message was gone   sudo -u abc php /config/www/nextcloud/occ db:add-missing-indices   Onl

  • gustomucho
    gustomucho

    After tinkering with this for a while, it seems the solution is much simpler than I thought. For some reason, the only step required is to modify the config.php file. No need to install ffmp

Posted Images

1 hour ago, killeriq said:

Are you able to connect to that DB from another client? some DB viewer?

Yes all my other apps can connect to it fine. From containers to laptops.

11 hours ago, nekromantik said:

Yes all my other apps can connect to it fine. From containers to laptops.

This doesn't happen for no reason. Did you  change something recently? Eg. Did you upgrade recently?

6 hours ago, Geck0 said:

This doesn't happen for no reason. Did you  change something recently? Eg. Did you upgrade recently?

Both Nextcloud and MariaDB were upgraded recently 

On 10/17/2024 at 3:53 AM, nekromantik said:

anyone?

This could be a number of things and you really need to provide more info.

 

What was the NC version and what version did you upgrade to?

Same question for MariaDB?

 

I'm going with incompatibility between NC and MariaDB version. 

It's possible the NC upgrade failed, so you have a partially updated NC database.

 

Are you able to  roll back your MariaDB upgrade?

 

 

 

 

Thanks all for the helpful tips.

I did change my docker to use explicit tags (same as I did prior with postgres and other containers, but somehow never for NC).

 

Just updated to "linuxserver/nextcloud:30.0.1" and everything seems to work fine. 👍

 

 

Regarding the following screenshots:

On 10/16/2024 at 1:01 AM, killeriq said:

Ok now im on 29.0.8-previous , update went well.

 

But in UI i see this error, nothing specific in logs...

 

Will leave it for next day...1am here

 

image.thumb.png.21b162894c875b9ea98792a1d763dd45.png

image.thumb.png.64229f82bb0bcd41050daef5c4a7597c.png

 

I just noticed the same dirty table reads as well, during the update from 30.0.0 to 30.0.1. No more after the update finished.

A bit curious, because they are debug + info entries, but my log level is default = 2 = WARN (did event check my config/config.php)

 

Not really worried by that, if it simply logs more during the update.

 

 

But there are 2 other issues I still have (in NC30.0.0 + 30.0.1):

 

1st Setup Warning that I do have for quite some time:

Quote

Some headers are not set correctly on your instance - The `Strict-Transport-Security` HTTP header is not set (should be at least `15552000` seconds). For enhanced security, it is recommended to enable HSTS. For more details see the documentation ↗.

If I check my browser though (FireFox) I do get

strict-transport-security: max-age=63072000;includeSubDomains; preload

 

I do use https://hub.docker.com/r/jc21/nginx-proxy-manager and as far as I can tell, everything seems to be set up correctly.

https://docs.nextcloud.com/server/30/admin_manual/installation/harden_server.html#enable-http-strict-transport-security says preload is recommended, I don't use sub domains.

The max age is "at least 15552000, in my case 63072000. I don't realy see why I get this error. Or do I have to dig into the Apache VirtualHost file, even though I run the nginx and my browser has the correct header?

 

2nd Error:

I do get the same "Error occurred while checking server setup" message in the overview. What I don't understand is, that it only happened after I upgraded from NC29 to NC30. Further more I do have 2 separate users. 1x Admin, 1x my own user without admin privileges.

The admin user does work fine. My non-admin user gets the error message. I did create a user group called "maintainers", added non-admin user to it and gave administration privileges for "Overview - Secruity & setup warnings" to that groups. That way, I did not have to login with my admin user all the time to get some notifications. Worked since that option was added, until I upgraded to NC30. No idea why it works with 1 user, but not with the other.

 

 

The second one does not bother me too much tough- I simply removed the administration privilege. I am more baffled by the first one.

 

Apart from that - have a nice weekend everyone

 

6 hours ago, Geck0 said:

This could be a number of things and you really need to provide more info.

 

What was the NC version and what version did you upgrade to?

Same question for MariaDB?

 

I'm going with incompatibility between NC and MariaDB version. 

It's possible the NC upgrade failed, so you have a partially updated NC database.

 

Are you able to  roll back your MariaDB upgrade?

 

 

 

 

There was a new Nextcloud update and now it works again.

@dreadu

2nd issue - same here, no clue what to do with that

 

image.thumb.png.a73cd076956c6ae8fd4bbb51bdd19f65.png

On 10/22/2024 at 2:26 AM, killeriq said:

@dreadu

2nd issue - same here, no clue what to do with that

 

image.thumb.png.a73cd076956c6ae8fd4bbb51bdd19f65.png

Run these two commands and report back. I've just upgraded from 29 to 30.01 with no issues. After upgrading, it suggested I updated my MariaDB. Again, no issues.

Quote

docker exec -it nextcloud occ check

docker exec -it nextcloud occ setupcheck

 

 

I have a feeling that you've probably messed up your database along the way, or fiddled with some permissions when you don't have to and its causing you errors. I also don't use the Nextcloud AIO features. My Nextcloud links to Elasticsearch, Redis and Collabora dockers.

Linuxserver.io's Nextcloud version is top notch and makes it as simple as possible, but its probably also the most complicated docker that I have on my unRaid. If anything is going to break it'll be this. I also find that their versions will have plenty of bugs, despite RC releases. Hence, I don't upgrade to major versions early. I let other people go through the frustration of bugs and upgrade later on, after the next releases have fixed the bug. I'll then upgrade to the major version, even if it has the bug and then upgrade to the fixed version.

This keeps everything clean. I also don't use Linuxserver.io's recommended nginx.conf and mine is a mess, but its stable and doesn't need changing. Its a mess, because of all of the comments I've made in it, but its stable and gets on with it.

 

 

So my issue has happened again.

:(

It cant connect to DB again.

I am running MariaDB 11.4 which Nextcloud docs say is compatible.

I cannot downgrade NC from 30 as it says data is not compatible and downgrade is not supported.

8 hours ago, nekromantik said:

So my issue has happened again.

:(

It cant connect to DB again.

I am running MariaDB 11.4 which Nextcloud docs say is compatible.

I cannot downgrade NC from 30 as it says data is not compatible and downgrade is not supported.

I'm guessing you upgraded MariaDB, but not the database itself. Can you restart your MariaDB and open the container log, it may state something like this:

 

image.thumb.png.00922d27f99f1975052f68a33ba9aba6.png

 

Additionally, this is the latest that you need linuxserver/mariadb:10.11.8-r0-ls160.

I've literally upgraded my NC and MariaDB over the weekend and I only upgraded MariaDB because NC recommended it. 

Try this and post the results if it looks like this is the problem. Otherwise continue below this line.

Say thanks if I helped

😀

 

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I wrote this, before what's above, as I only just thought that this is likely to be your problem. Again, if you want help you need to give more information. You'll notice that there aren't a lot of people throwing ideas around, its because they don't have enough to work with and can't be bothered to pull the information out of the OP.


 

Its difficult to diagnose the issue without logs, etc. One also has to assume that you're proficient in diagnosing network issues, etc.

Personally, I think its your MariaDB version. I've recently upgraded to Nextcloud 30 and then again to 30.01. NC recommended to upgrade MariaDB, so I upgraded it to linuxserver/mariadb:10.11.8-r0-ls160

My personal thoughts, without logs and more information is to do the following:

1. Roll back, using your backups to an earlier version of NC for both MariaDB and Nextcloud.

2. After roll back follow the process I've outlined for upgrades, etc. using occ commands. I've outlined this recently.

3. Then upgrade MariaDB

4. Upgrade Nextcloud, going through main version upgrades and iterative ones (iterative you don't have to do all of them, you can skip a couple).

 

If you don't have appdata backups of your NC and MariaDB then you're likely stuck. At this point, ask yourself what are you losing by starting again? Remember that NC preserves your data between upgrades, etc. I'm guessing your Nextcloud is not mission critical.

 

I would do this:

Start again

1. Backup your data folder, appdata and database (phpmyadmin backup).

2. Remove your NC and MariaDB docker

3. Remove the NC and MariaDB folder from your appdata folder.

 

4. Install MariaDB version linuxserver/mariadb:10.11.8-r0-ls160 (This is the latest version).

5. Install NC 30.01.

6. In future keep decent backups, you can see the headache of resolving issues when you don't (trust me, I know from my own experience).

 

 

Edited by Geck0

8 minutes ago, Geck0 said:

I'm guessing you upgraded MariaDB, but not the database itself. Can you restart your MariaDB and open the container log, it may state something like this:

 

image.thumb.png.00922d27f99f1975052f68a33ba9aba6.png

 

I wrote this, before what's above, as I only just thought that this is likely to be your problem. Again, if you want help you need to give more information. You'll notice that there aren't a lot of people throwing ideas around, its because they don't have enough to work with.

 

Its difficult to diagnose the issue without logs, etc. One also has to assume that you're proficient in diagnosing network issues, etc.

Personally, I think its your MariaDB version. I've recently upgraded to Nextcloud 30 and then again to 30.01. NC recommended to upgrade MariaDB, so I upgraded it to linuxserver/mariadb:10.11.8-r0-ls160

My personal thoughts, without logs and more information is to do the following:

1. Roll back, using your backups to an earlier version of NC for both MariaDB and Nextcloud.

2. After roll back follow the process I've outlined for upgrades, etc. using occ commands. I've outlined this recently.

3. Then upgrade MariaDB

4. Upgrade Nextcloud, going through main version upgrades and iterative ones (iterative you don't have to do all of them, you can skip a couple).

 

If you don't have appdata backups of your NC and MariaDB then you're likely stuck. At this point, ask yourself what are you losing by starting again? Remember that NC preserves your data between upgrades, etc. I'm guessing your Nextcloud is not mission critical.

 

I would do this:

Start again

1. Backup your data folder, appdata and database (phpmyadmin backup).

2. Remove your NC and MariaDB docker

3. Remove the NC and MariaDB folder from your appdata folder.

 

4. Install MariaDB version linuxserver/mariadb:10.11.8-r0-ls160 (This is the latest version).

5. Install NC 30.01.

6. In future keep decent backups, you can see the headache when you don't.

There was no upgrade message on mariadb.

Here are the logs of Mariadb:

2024-10-27  0:28:31 0 [Note] Starting MariaDB 11.4.3-MariaDB-ubu2404 source revision 5ab81ffe0097a22a774957df28c5223cf0201de3 server_uid owS8T8cVn3lSalbvembgIJMPZL0= as process 1
2024-10-27  0:28:31 0 [Note] InnoDB: Compressed tables use zlib 1.3
2024-10-27  0:28:31 0 [Note] InnoDB: Number of transaction pools: 1
2024-10-27  0:28:31 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-10-27  0:28:31 0 [Note] InnoDB: Using liburing
2024-10-27  0:28:31 0 [Note] InnoDB: Initializing buffer pool, total size = 256.000MiB, chunk size = 4.000MiB
2024-10-27  0:28:31 0 [Note] InnoDB: Completed initialization of buffer pool
2024-10-27  0:28:31 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2024-10-27  0:28:31 0 [Note] InnoDB: End of log at LSN=19514785312
2024-10-27  0:28:31 0 [Note] InnoDB: Opened 3 undo tablespaces
2024-10-27  0:28:31 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
2024-10-27  0:28:31 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-10-27  0:28:31 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-10-27  0:28:31 0 [Note] InnoDB: log sequence number 19514785312; transaction id 7625654
2024-10-27  0:28:31 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-10-27  0:28:31 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2024-10-27  0:28:31 0 [Note] Plugin 'wsrep-provider' is disabled.
2024-10-27  0:28:32 0 [Note] InnoDB: Buffer pool(s) load completed at 241027  0:28:32
2024-10-27  0:28:35 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-10-27  0:28:35 0 [Note] Server socket created on IP: '::'.
2024-10-27  0:28:35 0 [Note] mariadbd: Event Scheduler: Loaded 0 events
2024-10-27  0:28:35 0 [Note] mariadbd: ready for connections.
Version: '11.4.3-MariaDB-ubu2404'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2024-10-27 00:28:30+01:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.4.3+maria~ubu2404 started.
2024-10-27 00:28:31+01:00 [Note] [Entrypoint]: MariaDB upgrade not required

 

and here are logs for NC:

 

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────
Linuxserver.io version: 30.0.1-ls347
Build-date: 2024-10-22T11:52:26+00:00
───────────────────────────────────────
    
using keys found in /config/keys
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2023-04-13 │ 2024-05-27 │ /config/nginx/nginx.conf                                               │
│ 2024-01-03 │ 2024-07-16 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/default.conf.back
[custom-init] No custom files found, skipping...
[ls.io-init] done.
octrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused in /app/www/public/lib/private/DB/Connection.php:233
Stack trace:
#0 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(453): OC\DB\Connection->connect()
#1 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(411): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(318): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /app/www/public/lib/private/DB/Connection.php(899): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /app/www/public/lib/private/DB/ConnectionAdapter.php(235): OC\DB\Connection->getDatabaseProvider()
#5 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(96): OC\DB\ConnectionAdapter->getDatabaseProvider()
#6 /app/www/public/lib/private/AppConfig.php(1211): OC\DB\QueryBuilder\QueryBuilder->expr()
#7 /app/www/public/lib/private/AppConfig.php(237): OC\AppConfig->loadConfig()
#8 /app/www/public/lib/private/AppConfig.php(1351): OC\AppConfig->searchValues()
#9 /app/www/public/lib/private/App/AppManager.php(126): OC\AppConfig->getValues()
#10 /app/www/public/lib/private/App/AppManager.php(147): OC\App\AppManager->getInstalledAppsValues()
#11 /app/www/public/lib/private/legacy/OC_App.php(191): OC\App\AppManager->getInstalledApps()
#12 /app/www/public/lib/private/AppFramework/Bootstrap/Coordinator.php(48): OC_App::getEnabledApps()
#13 /app/www/public/lib/base.php(657): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#14 /app/www/public/lib/base.php(1132): OC::init()
#15 /app/www/public/cron.php(24): require_once('...')
#16 {main}

 

The errors do not show right away after reboot of NC. NC reboots and its working fine. It takes between few hours or a day to break and show that connection refused message. Which is what is making me get confused. If there was a DB issue then it would restart and show issues right away when you try and use NC.

12 hours ago, Geck0 said:

See here:

 

 

Can you post your config.php (remove private data). I'm wondering if you're values are set incorrectly.

Update: And your MariaDB config page from the container.

 

Just noticed this. There is an issue with your MariaDB config.

 

image.thumb.png.7159f649df4e2b5b384298e806a7ed8a.png

I dont see where the error is in that? Which line?

 

Here is config.php

 

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'xxxx',
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxx',
  'trusted_domains' =>
  array (
    0 => '192.168.1.21',
    1 => 'xxxxx.com',
  ),
  'overwrite.cli.url' => 'https://xxxxxx.com',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '30.0.1.2',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.20:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxxx',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'enable_previews' => false,
  'loglevel' => 2,
  'mysql.utf8mb4' => true,
  'trusted_proxies' =>
  array (
    0 => '192.168.1.72',
  ),
  'overwritehost' => 'xxxxxx',
  'updater.release.channel' => 'stable',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\APCu',
  'upgrade.disable-web' => true,
);

 and attached is mariadb container page

Screenshot 2024-10-27 114550.png

58 minutes ago, nekromantik said:

I dont see where the error is in that? Which line?

 

Here is config.php

 

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'xxxx',
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxx',
  'trusted_domains' =>
  array (
    0 => '192.168.1.21',
    1 => 'xxxxx.com',
  ),
  'overwrite.cli.url' => 'https://xxxxxx.com',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '30.0.1.2',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.20:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxxx',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'enable_previews' => false,
  'loglevel' => 2,
  'mysql.utf8mb4' => true,
  'trusted_proxies' =>
  array (
    0 => '192.168.1.72',
  ),
  'overwritehost' => 'xxxxxx',
  'updater.release.channel' => 'stable',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\APCu',
  'upgrade.disable-web' => true,
);

 and attached is mariadb container page

Screenshot 2024-10-27 114550.png

Its 12am here, I'm clocking out but I've had a quick look.

Your config looks okay to me. Your MariaDb didn't look right in your last post. Server socket created on ip 0.0.0.0 is the line I was referring to. Sorry, wasn't able to circle it and was rushing to the door.

It doesn't look like its receiving its IP.

I may be wrong, but that may be worth looking at. If this has happened before without reason, perhaps there is an ip conflict on your network.

Just now, Geck0 said:

Its 12am here, I'm clocking out but I've had a quick look.

Your config looks okay to me. Your MariaDb didn't look right in your last post. Server socket created on ip 0.0.0.0 is the line I was referring to. Sorry, wasn't able to circle it and was rushing to the door.

It doesn't look like its receiving its IP.

I may be wrong, but that may be worth looking at. If this has happened before without reason, perhaps there is an ip conflict on your network.

nope thats normal its listening to all interfaces in the container. other apps I use like darr services all run on 0.0.0.0 internally and then unraid exposes on the bridge interface. If it was not listening then all apps would break. I use the same DB for 3 other apps and only NC has problems since NC was updated few weeks ago.

27 minutes ago, nekromantik said:

nope thats normal its listening to all interfaces in the container. other apps I use like darr services all run on 0.0.0.0 internally and then unraid exposes on the bridge interface. If it was not listening then all apps would break. I use the same DB for 3 other apps and only NC has problems since NC was updated few weeks ago.

Yeah, you're right. I'm out, let us know hie you get on.

 

On 10/24/2024 at 11:32 PM, Geck0 said:

Run these two commands and report back. I've just upgraded from 29 to 30.01 with no issues. After upgrading, it suggested I updated my MariaDB. Again, no issues.

 

 

I have a feeling that you've probably messed up your database along the way, or fiddled with some permissions when you don't have to and its causing you errors. I also don't use the Nextcloud AIO features. My Nextcloud links to Elasticsearch, Redis and Collabora dockers.

Linuxserver.io's Nextcloud version is top notch and makes it as simple as possible, but its probably also the most complicated docker that I have on my unRaid. If anything is going to break it'll be this. I also find that their versions will have plenty of bugs, despite RC releases. Hence, I don't upgrade to major versions early. I let other people go through the frustration of bugs and upgrade later on, after the next releases have fixed the bug. I'll then upgrade to the major version, even if it has the bug and then upgrade to the fixed version.

This keeps everything clean. I also don't use Linuxserver.io's recommended nginx.conf and mine is a mess, but its stable and doesn't need changing. Its a mess, because of all of the comments I've made in it, but its stable and gets on with it.

 

 

Here is the output

Well , as you mentioned....NC docker is probably only one Docker with constant issues :D

I use NC mainly for storing pics from Mobile and PC Docs backup. So those issues , if they are not easy to fix = starting from scratch wouldn't be that time consuming, but I forgot how i did the MariaDB part (can google it...;) )

 

root@unRAIDTower:~# docker exec -it nextcloud occ check
root@unRAIDTower:~# docker exec -it nextcloud occ setupcheck
        dav:
                ✓ DAV system address book: No outstanding DAV system address book sync.
        network:
                ✓ WebDAV endpoint: Your web server is properly set up to allow file synchronization over WebDAV.
                ✓ Data directory protected
                ✓ Internet connectivity
                ✓ JavaScript source map support
                ✓ JavaScript modules support
                ✓ OCS provider resolving
                ✓ .well-known URLs: Your server is correctly configured to serve `.well-known` URLs.
                ✓ Font file loading
        system:
                ✓ Errors in the log: No errors in the logs since October 21, 2024, 7:49:48 PM
                ✓ Allowed admin IP ranges: Admin IP filtering isn’t applied.
                ℹ Brute-force Throttle: Your remote address could not be determined.
                ✓ Cron errors: The last cron job ran without errors.
                ✓ Cron last run: Last background job execution ran 4 minutes ago.
                ✓ Debug mode: Debug mode is disabled.
                ✓ File locking
                ⚠ Maintenance window start: Server has no maintenance window start time configured. This means resource intensive daily background jobs will also be executed during your main usage time. We recommend to set it to a time of low usage, so users are less impacted by the load caused from these heavy tasks.
                ✓ Memcache: Configured
                ⚠ Mimetype migrations available: One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations.
                ✓ Architecture: 64-bit
                ✓ Temporary space available: Temporary directory is correctly configured:
- 3.6 GiB available in /tmp (PHP temporary directory)
                ✓ Push service: Free push service
        notifications:
                ✓ Push notifications - Fair use policy
        security:
                ✓ App directories owner: App directories have the correct owner "abc"
                ✓ Old administration imported certificates
                ✓ Code integrity: No altered files
                ℹ Forwarded for headers: Your remote address could not be determined.
                ✓ HTTPS access and URLs: You are accessing your instance over a secure connection, and your instance is generating secure URLs.
                ✓ Old server-side-encryption: Disabled
                ✓ PHP version: You are currently running PHP 8.3.12.
                ✓ Random generator: Secure
                ⚠ HTTP headers: Some headers are not set correctly on your instance
- The `X-Robots-Tag` HTTP header is not set to `noindex,nofollow`. This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.
- The `Strict-Transport-Security` HTTP header is not set (should be at least `15552000` seconds). For enhanced security, it is recommended to enable HSTS.

        database:
                ✓ Database missing columns: None
                ⚠ Database missing indices: Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them. Missing indices:
 "fs_name_hash" in table "filecache".
                ✓ Database missing primary keys: None
                ℹ Database pending bigint migrations: Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running "occ db:convert-filecache-bigint" those pending changes could be applied manually. This operation needs to be made while the instance is offline.
file_metadata.id

                ✓ MySQL Unicode support: MySQL is used as database and does support 4-byte characters
                ✓ Scheduling objects table size: Scheduling objects table size is within acceptable range.
                ⚠ Database version: MariaDB version "11.5.2-MariaDB-ubu2404" detected. MariaDB >=10.6 and <=11.4 is suggested for best performance, stability and functionality with this version of Nextcloud.
                ✓ Database transaction isolation level: Read committed
        config:
                ℹ Default phone region: Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective ISO 3166-1 code of the region to your config file.
                ℹ Email test: You have not set or verified your email server configuration, yet. Please head over to the "Basic settings" in order to set them. Afterwards, use the "Send email" button below the form to verify your settings.
                ✓ Overwrite CLI URL: The "overwrite.cli.url" option in your config.php is set to "https://killeriq.duckdns.org:9080" which is a correct URL. Suggested URL is "https://localhost".
                ✓ Configuration file access rights: Nextcloud configuration file is writable
        php:
                ✓ PHP default charset: UTF-8
                ✓ PHP set_time_limit: The function is available.
                ✓ Freetype: Supported
                ✓ PHP getenv
                ✓ PHP memory limit: 512 MB
                ✓ PHP modules
                ✓ PHP opcache: Checking from CLI, OPcache checks have been skipped.
                ✓ PHP "output_buffering" option: Disabled
                ✓ PHP Imagick module

 

So, you're running a version of MariaDB that is higher than recommended. You've also not run the occ commands neccesary for Nextcloud's database after upgrading.

 

I can't guarentee this will remove the red bang sign in your admin, telling you that you have errors because it may keep reporting that you're using an unsupported version of MariaDB, but there is no reason your instance won't run after resolving the issues. Sometimes going to the latest version of MariaDB is the bad choice, if its not supported and there has been a change in PHP, etc.

 

The results that you've sent actually tell you what to do. I've listed them below to help you out.

 

Go to your CLI in unRaid and type

Quote

docker exec -it "insertyournextclouddockerhere" 

with the occ commands below at the end

Quote

occ db:add-missing-indices

occ maintenance:repair --include-expensive

ie. docker exec -it mynextcloudinstance occ db:add-missing-indices

 

Those are the two main main issues that you have. You have others, but not sufficient to cause you problems.

Like this:

 

Quote

                ⚠ HTTP headers: Some headers are not set correctly on your instance

- The `X-Robots-Tag` HTTP header is not set to `noindex,nofollow`. This is a potential security or privacy risk, as it is recommended to adjust this setting accordingly.

- The `Strict-Transport-Security` HTTP header is not set (should be at least `15552000` seconds). For enhanced security, it is recommended to enable HSTS.

You should probably sort those out, but they can wait for now.

I suggest you try those commands and check it works. You may still get the error message, because it will flag that you are using an unsupported version of MariaDB, but you can probably ignore that if everything is working. I would do this first before rebuilding MariaDB.

Edited by Geck0

for the record, im getting this same error just now upgrading the container. 

 

this keeps coming up:

 

Quote

An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2006] MySQL server has gone away in /app/www/public/lib/private/DB/Connection.php:233

 

On 10/26/2024 at 7:33 PM, nekromantik said:

There was no upgrade message on mariadb.

Here are the logs of Mariadb:

2024-10-27  0:28:31 0 [Note] Starting MariaDB 11.4.3-MariaDB-ubu2404 source revision 5ab81ffe0097a22a774957df28c5223cf0201de3 server_uid owS8T8cVn3lSalbvembgIJMPZL0= as process 1
2024-10-27  0:28:31 0 [Note] InnoDB: Compressed tables use zlib 1.3
2024-10-27  0:28:31 0 [Note] InnoDB: Number of transaction pools: 1
2024-10-27  0:28:31 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-10-27  0:28:31 0 [Note] InnoDB: Using liburing
2024-10-27  0:28:31 0 [Note] InnoDB: Initializing buffer pool, total size = 256.000MiB, chunk size = 4.000MiB
2024-10-27  0:28:31 0 [Note] InnoDB: Completed initialization of buffer pool
2024-10-27  0:28:31 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2024-10-27  0:28:31 0 [Note] InnoDB: End of log at LSN=19514785312
2024-10-27  0:28:31 0 [Note] InnoDB: Opened 3 undo tablespaces
2024-10-27  0:28:31 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
2024-10-27  0:28:31 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-10-27  0:28:31 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-10-27  0:28:31 0 [Note] InnoDB: log sequence number 19514785312; transaction id 7625654
2024-10-27  0:28:31 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-10-27  0:28:31 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2024-10-27  0:28:31 0 [Note] Plugin 'wsrep-provider' is disabled.
2024-10-27  0:28:32 0 [Note] InnoDB: Buffer pool(s) load completed at 241027  0:28:32
2024-10-27  0:28:35 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-10-27  0:28:35 0 [Note] Server socket created on IP: '::'.
2024-10-27  0:28:35 0 [Note] mariadbd: Event Scheduler: Loaded 0 events
2024-10-27  0:28:35 0 [Note] mariadbd: ready for connections.
Version: '11.4.3-MariaDB-ubu2404'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2024-10-27 00:28:30+01:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.4.3+maria~ubu2404 started.
2024-10-27 00:28:31+01:00 [Note] [Entrypoint]: MariaDB upgrade not required

 

and here are logs for NC:

 

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────
Linuxserver.io version: 30.0.1-ls347
Build-date: 2024-10-22T11:52:26+00:00
───────────────────────────────────────
    
using keys found in /config/keys
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2023-04-13 │ 2024-05-27 │ /config/nginx/nginx.conf                                               │
│ 2024-01-03 │ 2024-07-16 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/default.conf.back
[custom-init] No custom files found, skipping...
[ls.io-init] done.
octrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused in /app/www/public/lib/private/DB/Connection.php:233
Stack trace:
#0 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(453): OC\DB\Connection->connect()
#1 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(411): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(318): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /app/www/public/lib/private/DB/Connection.php(899): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /app/www/public/lib/private/DB/ConnectionAdapter.php(235): OC\DB\Connection->getDatabaseProvider()
#5 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(96): OC\DB\ConnectionAdapter->getDatabaseProvider()
#6 /app/www/public/lib/private/AppConfig.php(1211): OC\DB\QueryBuilder\QueryBuilder->expr()
#7 /app/www/public/lib/private/AppConfig.php(237): OC\AppConfig->loadConfig()
#8 /app/www/public/lib/private/AppConfig.php(1351): OC\AppConfig->searchValues()
#9 /app/www/public/lib/private/App/AppManager.php(126): OC\AppConfig->getValues()
#10 /app/www/public/lib/private/App/AppManager.php(147): OC\App\AppManager->getInstalledAppsValues()
#11 /app/www/public/lib/private/legacy/OC_App.php(191): OC\App\AppManager->getInstalledApps()
#12 /app/www/public/lib/private/AppFramework/Bootstrap/Coordinator.php(48): OC_App::getEnabledApps()
#13 /app/www/public/lib/base.php(657): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#14 /app/www/public/lib/base.php(1132): OC::init()
#15 /app/www/public/cron.php(24): require_once('...')
#16 {main}

 

The errors do not show right away after reboot of NC. NC reboots and its working fine. It takes between few hours or a day to break and show that connection refused message. Which is what is making me get confused. If there was a DB issue then it would restart and show issues right away when you try and use NC.

 

Edited by tvd1

2 hours ago, tvd1 said:

for the record, im getting this same error just now upgrading the container. 

 

this keeps coming up:

 

 

 

 my error is connection refused not exception

Edited by nekromantik

Hi,

 

I am relatively new to Unraid (been using for 6 months with no prior experience with NAS/homelab stuff).

 

I had originally followed the SpaceInvaderOne setup guides for Nextcloud, however where he used reverse proxies/port-forwarding, I used cloudflared tunnels. I did however also use a MariaDB container to set up.

 

Anyway, I was trying to set up OnlyOffice on Nextcloud but was encountering errors with regards to HTTPS - I can't remember exactly what, but I think it was saying that it needed to use HTTPS rather than HTTP? Not entirely sure.

 

Anyway, after doing too much tinkering with configuration files with the (unhelpful) help of ChatGPT, I got to a point where I had messed around with the Nextcloud config so much that I just wanted to remove the container entirely and start over.

 

Installing the Nextcloud container again from scratch, I want to make sure I'm setting it up correctly. Unfortunately my setup seems to deviate from a lot of the guides out there enough that I feel I need more tailored setup guidance.

 

1. I want to set Nextcloud (and OnlyOffice) up with cloudflared tunnels rather than reverse proxies/port-forwarding

1a. But perhaps the advice from here might be that I should also incorporate reverse proxies/port-forwarding alongside tunnels? I'm not saying that, but I'm open to being told I should consider them if there is some kind of benefit to security etc.

 

2. I want to set this up to use HTTPS rather than HTTP.

2a. But perhaps someone here is going to tell me I don't need to do that.

 

3. In case this is relevant/helpful, my NAS setup comprises:

  • ZFS pool of 3x HDDs in RAIDZ1 (no standard array)
  • No cache drives - everything is done on the ZFS pool

Support on setting this up again following best practices, including how to configure the Nextcloud container when installing, how to configure the settings in Cloudflare, and anything else, would be massively appreciated.

 

nas-diagnostics-20241030-1046.zip

21 hours ago, nekromantik said:

 my error is connection refused not exception

has anyone come up with a solution? i've tried everything suggested and even tried restoring an old nextcloud instance from a backup. Even with the restore it still somehow shows it has to upgrade :

 

Quote

Initializing nextcloud 30.0.1.2 (this can take a while) ...
Upgrading nextcloud from 29.0.3.4 ..

 

then fails to connect to maria, which is confirmed working and the other apps i have that use it are fine.  I can't believe that mariadb would be too new? then why push an update if thats the case?

3 hours ago, tvd1 said:

Initializing nextcloud 30.0.1.2 (this can take a while) ...
Upgrading nextcloud from 29.0.3.4

Latest 29 is 29.0.8, while upgrading from an older 29 to 30.0.1 should work if you haven't kept up with uprates and try to do jumps it's always going to be a less tested/more error prone situation.

 

3 hours ago, tvd1 said:

I can't believe that mariadb would be too new? then why push an update if thats the case?

Don't know/think that's the problem, but in any case whatever mariadb container you'd be using is completely independent from NC.

3 hours ago, tvd1 said:

has anyone come up with a solution? i've tried everything suggested and even tried restoring an old nextcloud instance from a backup. Even with the restore it still somehow shows it has to upgrade :

 

 

then fails to connect to maria, which is confirmed working and the other apps i have that use it are fine.  I can't believe that mariadb would be too new? then why push an update if thats the case?

You cannot roll back NC, without rolling back the database as well. The database tables have been updated for the latest version of NC. I've written about steps to take when you roll back within the last couple of pages.

 

To me, what appears to be common amongst you guys with the same issue is using the lastest version of MariaDB, which is above what NC states is supported (if I recall correctly, I don't have time to review it). I'm using the latest version of v10, with absolutely no issues and I've only recently upgraded it. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.