[Support] Linuxserver.io - Nextcloud


Recommended Posts

trying to get fail2ban to work with swag and nextcloud.

 

I can see my access attempts in /mnt/user/appdata/nextcloud/log/nginx/access.log 

 

However nothing in the log shows a fail or a success. I can see the IP its coming from but nothing about login success/fail

 

/data/nextcloud.log -> nextcloud logging is not working

 

/mnt/user/appdata/nextcloud/www/nextcloud/config/config.php
 

$CONFIG = array (
  'datadirectory' => '/data',
.
.
  'tempdirectory' => '/nextcloud_tmp',
  'theme' => '',
  'loglevel' => 2,
  'log_type' => 'file',
  'logfile' => 'nextcloud.log',
);

 

/data is a share on a disk so its not in my appdata

root@88ecb2f1ef01:/# ls -l /data/nextcloud.log 
-rwxrwxrwx 1 abc abc 0 Nov 17 18:18 /data/nextcloud.log

 

I resized the large file with
truncate /data/nextcloud.log --size=0  -> after this it no longer logged data

 

anyone know why logging is dead?

Edited by xokia
Link to comment

UNRAID 6.12.4 / Linuxserver - NEXTCLOUD UNABLE TO UPLOAD FILES

 

Fresh Unraid install.

Fresh install of MariaDB and Nextcloud.

worked for 2 days.

Only 2 users.

neither user is now able  to upload files for my Nextcloud.

not enough space when using the client app.

 

while using the web I get

 

I ether get an unknown error has occurred

or

error when assembling chunks status code 504.

 

I was able to find a solution which might have applied to me since im using the NGINX proxy manager, however i then switched to try and upload directly to the lan ip address of the nextcloud docker so not using the proxy manager and I still cannot upload hence i believe the error is within nextcloud.

 

My nextcloud share is directly on to the array and it does not use the cache drives.

 

So i clicked on nextcloud - logs: ( logterminal/nexcloud.log )

#3 {main}
Exception: Not installed in /app/www/public/lib/base.php:283
Stack trace:
#0 /app/www/public/lib/base.php(709): OC::checkInstalled()
#1 /app/www/public/lib/base.php(1196): OC::init()
#2 /app/www/public/cron.php(43): require_once('...')
#3 {main}
[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
───────────────────────────────────────

using keys found in /config/keys
System config value memcache.local set to string \OC\Memcache\APCu
System config value filelocking.enabled set to boolean true
System config value memcache.locking set to string \OC\Memcache\APCu
System config value upgrade.disable-web set to boolean true
[custom-init] No custom files found, skipping...
[ls.io-init] done.

 

 

I found an error.log file on the nexcloud app folder and came up with this:

 

[18-Nov-2023 17:53:56] NOTICE: fpm is running, pid 417
[18-Nov-2023 17:53:56] NOTICE: ready to handle connections
[18-Nov-2023 18:05:05] NOTICE: Terminating ...
[18-Nov-2023 18:05:05] NOTICE: exiting, bye-bye!
[18-Nov-2023 18:05:34] NOTICE: fpm is running, pid 445
[18-Nov-2023 18:05:34] NOTICE: ready to handle connections
[19-Nov-2023 16:25:55] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
[20-Nov-2023 05:57:34] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
[20-Nov-2023 06:05:13] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
 

i have been googling solutions and i think it points out to not enough resources ??

 

My server is 16GB of Ram

 

any help is appreciated.

Link to comment
On 11/20/2023 at 4:56 PM, beachbum said:

UNRAID 6.12.4 / Linuxserver - NEXTCLOUD UNABLE TO UPLOAD FILES

 

Fresh Unraid install.

Fresh install of MariaDB and Nextcloud.

worked for 2 days.

Only 2 users.

neither user is now able  to upload files for my Nextcloud.

not enough space when using the client app.

 

while using the web I get

 

I ether get an unknown error has occurred

or

error when assembling chunks status code 504.

 

 

So if you go one page back and look for my post I show how to configure this. It looks as though nextcloud also has an ngnix server installed which wasn't clearly documented. So you have to change the settings there to. I used a temp directory because I wanted to be able to upload very large files. Which if you dont use a temp directory it goes to RAM. Which is fine  unless you are uploading massive files like me.

Edited by xokia
Link to comment
  • 2 weeks later...

Hello - I am having issues doing a clean re-install.

1) After moving to new server hardware everything works except my Linuxserver Nextcloud Docker. I was seeing the error "Configuration was not read or initialized correctly, not overwriting /app/www/public/config/config.php". After research I was unable to find a simple fix, so decided to simply do a clean re-install.

2) I completely removed the old container and renamed /mnt/user/appdata/nextcloud

3) Installation (with all defaults) gets stuck in a loop, repeating the same error over and over. I assume there is still something left over from the previous install - can you suggest what it might be? If not, what could be tripping up a clean install?

Here's the log:  (the last section just repeats indefinitely if left)

 

THANKS!

 

*****************

UPDATE I got some help from Linusserver.io via Dischord - I think we ruled out any filesystem related issues. Tried bypassing the Fuse layer and mapping the  physical disks. Data drives are xfs, cache is btrfs. Tried putting appdata on a data disk in case btrfs is the issue. So far nothing fixes the problem.

 

*****************

[migrations] started
[migrations] 01-nginx-site-confs-default: executing...
[migrations] 01-nginx-site-confs-default: succeeded
[migrations] 02-default-location: executing...
[migrations] 02-default-location: succeeded
[migrations] done
───────────────────────────────────────

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

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

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

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

User UID:    99
User GID:    100
───────────────────────────────────────

Setting resolver to  127.0.0.11
Setting worker_processes to 16
generating self-signed keys in /config/keys, you can replace these with your own keys if required
..+.+......+...+......+...+++++++++++++++++++++++++++++++++++++++*..+......+..+............+.+++++++++++++++++++++++++++++++++++++++*...........................+....+...+...+............++++++
....+...+....+.....+++++++++++++++++++++++++++++++++++++++*.+......+...+++++++++++++++++++++++++++++++++++++++*......+.......+......+.....+.......+..+....+.....+.........+.......+.....+.............+........+...+.+...+..+....+......+...........+...+.+......+..+...+.......+..+....+..............................+............+...+.....+....+..+....+............+...+.....+............+..........+........+....+......+......+...+............+...+...+.....+...+....+.....+.+.....+......+...+.......++++++
-----
Initializing nextcloud 27.1.4.1 (this can take a while) ...
Setting permissions
New nextcloud instance
Please run the web-based installer on first connect!
Initializing finished
After completing the web-based installer, restart the Nextcloud container to apply default memory caching and transactional file locking configurations.
Alternatively, you can apply your own configurations by editing /config/www/nextcloud/config/config.php following the documentation:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html
https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/files_locking_transactional.html
[custom-init] No custom files found, skipping...
[ls.io-init] done.
Exception: Not installed in /app/www/public/lib/base.php:283
Stack trace:
#0 /app/www/public/lib/base.php(709): OC::checkInstalled()
#1 /app/www/public/lib/base.php(1196): OC::init()
#2 /app/www/public/cron.php(43): require_once('...')
#3 {main}
Exception: Not installed in /app/www/public/lib/base.php:283
Stack trace:
#0 /app/www/public/lib/base.php(709): OC::checkInstalled()
#1 /app/www/public/lib/base.php(1196): OC::init()
#2 /app/www/public/cron.php(43): require_once('...')
#3 {main}

Edited by malebron
Additional troubleshooting.
Link to comment

Hi, I just installed Nextcloud. For external access I use a reverse proxy (NPM) and Cloudflare proxy. Can you please advise me how to set up nextcloud to connect to a server on the local network directly if the communication is through my domain. This way all traffic goes through Cloudflare even though I am on the local network.

I use 2x AdGuard Home as my DNS server. I tried rewriting the domain to Nextcloud's private IP address via the DNS rewrite function. However, if I try to connect to the nextcloud server on the local network via my domain in Safari (Mac or iOS), the page won't open with the error - it can't establish a secure connection. An external connection through the domain, however, works fine.

What's odd is that if I try to connect through my domain on the local network using the anonymous tab in safari, the nextcloud page loads without a problem.

 

Any idea how to solve this?

Link to comment
2 hours ago, pkoci said:

I use 2x AdGuard Home as my DNS server. I tried rewriting the domain to Nextcloud's private IP address via the DNS rewrite function.

It's NPM you need to point to. I.e. you want your local DNS server to resolve your domain to NPM.

Edited by Kilrah
Link to comment
On 12/5/2023 at 10:07 AM, malebron said:

Hello - I am having issues doing a clean re-install.

1) After moving to new server hardware everything works except my Linuxserver Nextcloud Docker. I was seeing the error "Configuration was not read or initialized correctly, not overwriting /app/www/public/config/config.php". After research I was unable to find a simple fix, so decided to simply do a clean re-install.

2) I completely removed the old container and renamed /mnt/user/appdata/nextcloud

3) Installation (with all defaults) gets stuck in a loop, repeating the same error over and over. I assume there is still something left over from the previous install - can you suggest what it might be? If not, what could be tripping up a clean install?

Here's the log:  (the last section just repeats indefinitely if left)

 

THANKS!

 

*****************

UPDATE I got some help from Linusserver.io via Dischord - I think we ruled out any filesystem related issues. Tried bypassing the Fuse layer and mapping the  physical disks. Data drives are xfs, cache is btrfs. Tried putting appdata on a data disk in case btrfs is the issue. So far nothing fixes the problem.

 

*****************

[
#0 /app/www/public/lib/base.php(709): OC::checkInstalled()
#1 /app/www/public/lib/base.php(1196): OC::init()
#2 /app/www/public/cron.php(43): require_once('...')
#3 {main}

 

SOLVED: - In case this helps anyone else with this issue:

tl;dr -  DO NOT look at the log file while the installation is running. Let it complete, THEN look.

 

After many tries and much troubleshooting I gave up on the linuxserver.io container and tried using the knex666 one, but this would not install either - it also generated a repeating error message (different to the Linuxserver.io one) every 5mins or so. I tried a few things, with no luck, but the final time I did not monitor the log, but went to get coffee. When I returned it had completed successfully.

Based on this success, I tried re-installing the Linuxserver.io container, but this time I did not immediately open the logfile, but just let it run -- it completed successfully!

 

I can't say for sure that this is the direct cause or co-incidence, but AFAIK nothing else was different.

Link to comment
On 12/11/2023 at 12:41 PM, Kilrah said:

I just use DNS entries but I guess rewrite does the same yes...

In this case, the page won't open using my domain because cannot establish a secure connection in safari. Any idea? I know that adguards DNS rewrites works because my domain is resolved as nextclouds private IP.

Link to comment

So an update failed, this is the output:

using keys found in /config/keys
Initializing nextcloud 28.0.0.11 (this can take a while) ...
Upgrading nextcloud from 27.1.4.1 ...
Setting permissions
Setting log level to debug
Updating database schema
Exception: Database error when running migration 28000Date20230906104802 for app core
Index name "rd_wopi_token_idx" for table "oc_richdocuments_wopi" collides with the constraint on table "oc_officeonline_wopi".
Update failed
Maintenance mode is kept active
Resetting log level
Initializing finished
**** 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                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2018-08-16 │ 2023-04-13 │ /config/nginx/nginx.conf                                               │
│ 2022-08-20 │ 2023-08-13 │ /config/nginx/ssl.conf                                                 │
│            │ 2023-06-23 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.

 

and now it stuck in maintenance mode

Link to comment
10 hours ago, Archonw said:

To get out of maintenance mode you can open a terminal and put this in:

 

docker exec -it nextcloud occ maintenance:mode --off

docker exec -it nextcloud occ maintenance:mode --off

 

wher "nextcloud" is the name of your nextcloud docker  

thanks for the info I am now out of maintenance mode but the update still failed and the web interface says "Please use the command line updater because updating via browser is disabled in your config.php."

When I run "docker exec -it nextcloud occ upgrade" I get this error: Exception: Database error when running migration 28000Date20230906104802 for app core
Index name "rd_wopi_token_idx" for table "oc_richdocuments_wopi" collides with the constraint on table "oc_officeonline_wopi".
Update failed

Link to comment

I have just updated to Version 28 and now I cannot upload files via Web anymore, the uploading bar is displayed as if the file is being uploaded but then when it's complete it does not appear in the directory. Uploading with Windows Client works fine.

Also noticed I cannot use the drag & drop function (web) anymore either. Using latests Chrome, but also tried Firefox. It worked before the update. Anyone else having issues?

Edited by truetype
Link to comment

Similar here. The drag and drop field flickers and i can not place any files on it for upload. Upload via "+" icon is still possible.

 

I have this security warning: 19179 errors in the logs since 7. Dezember 2023

and the protocol pages is completely empty.

Edited by Archonw
Link to comment
5 hours ago, Archonw said:

Similar here. The drag and drop field flickers and i can not place any files on it for upload. Upload via "+" icon is still possible.

 

I have this security warning: 19179 errors in the logs since 7. Dezember 2023

and the protocol pages is completely empty.

Yeah same problem for me with the flickering also.

Holy smoke, that alot of errors, I have 22 errors (since 7 december) and counting right now, was 10 when I posted my first reply here.
And same here the Log page in Admin menu is completely Blank, can't even find the Errors in the AppData for Nextcloud.
 

Edited by truetype
Link to comment

I'm also having a similar issue since the latest update (28.0.0) - the security warning on the admin overview page is reporting a steadily increasing number of errors in the log, but the log page itself is blank.

 

The log is still being written to (I've looked it up directly on my server), and everything else in my instance seems to be working OK? Still, it's weird.

Edited by augot
Link to comment
On 12/14/2023 at 7:11 AM, dollabillz said:

thanks for the info I am now out of maintenance mode but the update still failed and the web interface says "Please use the command line updater because updating via browser is disabled in your config.php."

When I run "docker exec -it nextcloud occ upgrade" I get this error: Exception: Database error when running migration 28000Date20230906104802 for app core
Index name "rd_wopi_token_idx" for table "oc_richdocuments_wopi" collides with the constraint on table "oc_officeonline_wopi".
Update failed

fixed the issue by moving the "oc_richdocuments_wop" to a back up folder. the data table was a old one from an uninstalled app. the data file can be found in the appdata file of your database app for me its mariadb.

Link to comment

I'm suffering with a similar issue, although I am a noob so could be very wrong.

 

I updated the dockers for Swag, MariaDB and Nextcloud and since then I've been stuck in maintenance mode with the following log:

 

[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
───────────────────────────────────────

using keys found in /config/keys
Initializing nextcloud 28.0.0.11 (this can take a while) ...
Upgrading nextcloud from 27.1.4.1 ...
Setting permissions
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Exception: Database error when running migration 28000Date20231103104802 for app core
An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'nextcloud.oc_external_config' doesn't exist in engine
Update failed
Maintenance mode is kept active
Resetting log level
Initializing finished
[custom-init] No custom files found, skipping...
[ls.io-init] done.
 

I've tried to manually change the MaintenanceMode flag to false in the config.php file but on restarting Nextcloud it reverts back to true.

 

Restoring all three of the containers back to before the updates doesn't help either.

 

Anyone have any suggestions?

Link to comment

Well I had Nextcloud 28 working for a day... now I just get these ViewController.php errors. Disabled every app that I could and still won't fire up. Nextcloud clients continue to work but web interface just comes back with Internal Server Errors. 
 

Error   PHP         Undefined array key 0 at /config/www/nextcloud/apps/files/lib/Controller/ViewController.php#240                                                                                                         2023-12-19T14:58:52+00:00  
                                                                                                                                                                                                                                                         
  Error   index       Exception: Call to a member function getPath() on null in file '/config/www/nextcloud/apps/files/lib/Controller/ViewController.php' line 240 at lib/private/AppFramework/Http/Dispatcher.php line 169   2023-12-19T14:58:52+00:00  
                                                                                                                                                                                                                                                         
                      0. lib/private/AppFramework/App.php line 184                                                                                                                                                                                       
                         OC\AppFramework\Http\Dispatcher->dispatch(                                                                                                                                                                                      
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                      1. lib/private/Route/Router.php line 315                                                                                                                                                                                           
                         OC\AppFramework\App::main(                                                                                                                                                                                                      
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                      2. lib/base.php line 1069                                                                                                                                                                                                          
                         OC\Route\Router->match(                                                                                                                                                                                                         
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                      3. index.php line 39                                                                                                                                                                                                               
                         OC::handleRequest(                                                                                                                                                                                                              
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                         
                      Caused by Error: Call to a member function getPath() on null at .../apps/files/lib/Controller/ViewController.php line 240                                                                                                          
                                                                                                                                                                                                                                                         
                      0. lib/private/AppFramework/Http/Dispatcher.php line 230                                                                                                                                                                           
                         OCA\Files\Controller\ViewController->index(                                                                                                                                                                                     
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                      1. lib/private/AppFramework/Http/Dispatcher.php line 137                                                                                                                                                                           
                         OC\AppFramework\Http\Dispatcher->executeController(                                                                                                                                                                             
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                      2. lib/private/AppFramework/App.php line 184                                                                                                                                                                                       
                         OC\AppFramework\Http\Dispatcher->dispatch(                                                                                                                                                                                      
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                      3. lib/private/Route/Router.php line 315                                                                                                                                                                                           
                         OC\AppFramework\App::main(                                                                                                                                                                                                      
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                      4. lib/base.php line 1069                                                                                                                                                                                                          
                         OC\Route\Router->match(                                                                                                                                                                                                         
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                      5. index.php line 39                                                                                                                                                                                                               
                         OC::handleRequest(                                                                                                                                                                                                              
                                                                                                                                                                                                                                                         
                         )                                                                                                                                                                                                                               
                                                                                                                                         




Very much a love/hate relationship with Nextcloud over stuff like this.. 🤷‍♂️

Edited by BrandonG777
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.