Nextcloud AIO v5.1.0 Apache & Nextcloud won't start. Been over 2 hours now

I finihsed the update and started the containers. It’s been 30 minutes and Apache and Nextcloud containers are still Starting

Hm… Can you do this?

in that link it says " Can you uncomment #user_allow_other"

What file is #user_allow_other located?

See changed datadir - Internal server error · nextcloud/all-in-one · Discussion #663 · GitHub

I uncommented #user_allow_other in etc/fuse.conf
Rebooted 30 minutes ago, no change. Apache and Nextcloud are still Starting.
Should I wait 2 hours to see if they start like that link said?

1 Like

Can you maybe run sudo ls -la /mnt and post the nextcloud container logs again?

1 Like
ncadmin@nextcloud:~$ ls -la /mnt
total 16
drwxr-xr-x  5 root     root 4096 Apr 23 18:33 .
drwxr-xr-x 20 root     root 4096 May 15 19:47 ..
-r--------  1 root     root   27 Apr 23 16:38 .credentials
drwxrwxrwx  1 root     root    0 May 24 15:23 backup
drwxr-x---  1 www-data root    0 Jun  2 07:31 ncdata
drwxr-xr-x  2 root     root 4096 Apr 23 16:43 ncdata1
ncadmin@nextcloud:~$



ncadmin@nextcloud:~$ sudo docker logs nextcloud-aio-apache

Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...



ncadmin@nextcloud:~$ sudo docker logs nextcloud-aio-nextcloud
              now
-------------------------------
 2023-06-03 11:29:17.905037-07
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Installing imagemagick via apk...
Enabling Imagick...
Configuring Redis as session handler...
Setting php max children...
The www-data user doesn't seem to have access rights in the datadir.
Most likely are the files located on a drive that does not follow linux permissions.
Please adjust the permissions like mentioned below.
The found permissions are:
33:0 750
(userID:groupID permissions)
but they should be:
33:0 750
(userID:groupID permissions)
Also make sure that the parent directories on the host of the directory that you've chosen as datadir are publicly readable with e.g. 'sudo chmod +r /mnt' (adjust the command accordingly to your case) and the same for all subdirectories.
Additionally, if you want to use a Fuse-mount as datadir, set 'allow_other' as additional mount option.
For SMB/CIFS mounts as datadir, see https://github.com/nextcloud/all-in-one#can-i-use-a-cifssmb-share-as-nextclouds-datadir
              now
-------------------------------
 2023-06-03 12:01:27.150354-07
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
              now
-------------------------------
 2023-06-03 12:27:21.698385-07
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Configuring Redis as session handler...
Setting php max children...
The www-data user doesn't seem to have access rights in the datadir.
Most likely are the files located on a drive that does not follow linux permissions.
Please adjust the permissions like mentioned below.
The found permissions are:
33:0 750
(userID:groupID permissions)
but they should be:
33:0 750
(userID:groupID permissions)
Also make sure that the parent directories on the host of the directory that you've chosen as datadir are publicly readable with e.g. 'sudo chmod +r /mnt' (adjust the command accordingly to your case) and the same for all subdirectories.
Additionally, if you want to use a Fuse-mount as datadir, set 'allow_other' as additional mount option.
For SMB/CIFS mounts as datadir, see https://github.com/nextcloud/all-in-one#can-i-use-a-cifssmb-share-as-nextclouds-datadir
              now
-------------------------------
 2023-06-03 13:01:11.499476-07
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
ncadmin@nextcloud:~$ ^C
ncadmin@nextcloud:~$

Thanks! And the output of sudo ls -la /mnt/ncdata && sudo mount | grep ncdata ?

1 Like

ncadmin@nextcloud:~$ sudo ls -la /mnt/ncdata && sudo mount | grep ncdata
[sudo] password for ncadmin:
total 2052
drwxr-x— 1 www-data root 0 Jun 2 07:31 .
drwxr-xr-x 5 root root 4096 Apr 23 18:33 …
-rwxrwxrwx 1 root root 542 May 1 11:05 .htaccess
-rwxrwxrwx 1 root root 0 May 1 11:05 .ocdata
drwxrwxrwx 1 root root 0 Apr 23 18:55 admin
drwxrwxrwx 1 root root 0 Apr 26 21:48 appdata_ocz93kvhm654
-rwxrwxrwx 1 root root 0 Apr 23 17:06 audit.log
drwxrwxrwx 1 root root 0 May 15 20:35 backup
drwxrwxrwx 1 root root 0 May 11 18:19 bind
drwxrwxrwx 1 root root 0 May 7 15:29 files_encryption
drwxrwxrwx 1 root root 0 May 11 18:19 files_external
-rwxrwxrwx 1 root root 0 Apr 23 17:10 fts-index.done
-rwxrwxrwx 1 root root 53 Apr 29 17:30 ‘googlef37f6a59e435b34b (1).html’
-rwxrwxrwx 1 root root 0 May 1 11:05 index.html
drwxr-x— 1 www-data root 0 May 11 18:18 mike
-rwxrwxrwx 1 root root 0 Apr 23 17:06 nextcloud.log
drwxrwxrwx 1 root root 0 May 23 13:39 snoopy
drwxrwxrwx 1 root root 0 Jun 2 11:42 tmp
//192.168.1.1/storage on /mnt/ncdata type cifs (rw,relatime,vers=1.0,cache=strict,username=admin,uid=33,noforceuid,gid=33,noforcegid,addr=192.168.1.1,iocharset=utf8,soft,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=65536,bsize=1048576,echo_interval=60,actimeo=1)
ncadmin@nextcloud:~$

Hm, can you check if using the recommended settings from GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All-in-One and provides easy deployment and maintenance with most features included in this one Nextcloud instance. and rebooting makes any difference?

1 Like

Wow that did it.

I changed

//192.168.1.1/storage  /mnt/ncdata  cifs   vers=1.0,uid=www-data,gid=www-data,credentials=/mnt/.credentials,iocharset=utf8   0       0

To

//192.168.1.1/storage  /mnt/ncdata cifs rw,mfsymlinks,seal,credentials=/mnt/.credentials,uid=33,gid=0,file_mode=0770,dir_mode=0770 0 0

And now all containers started.

Thank you very much.

I am just now learning how to maintain my nextcloud server so this was enjoyable for me, however I don’t understand a lot of why you had me do the things you requested.

For the FSTAB, I tried many examples over the internet and none of them worked except for what I had. Can you explain to me how my fstab entry caused this problem and how your format corrects it?

If you have time,

Thanks

Mike

1 Like

Great to hear that this solved it!

I only got the idea that something in there could be wrong after you posted the output of ls -la /mnt/ncdata because the file/folder permissions looked strange to me. That lead me to the conclusion that the recommended settings in the AIO docs would may make it work.

1 Like

I’ll look at the permission differences.

Thansk again

Keep up the good work :upside_down_face:

2 Likes

I just realized why the containers started. It’s because //192.168.1.1/storage /mnt/ncdata cifs rw,mfsymlinks,seal,credentials=/mnt/.credentials,uid=33,gid=0,file_mode=0770,dir_mode=0770 0 0 failed to mount
When I run

root@nextcloud:/mnt/ncdata/snoopy# mount -a
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
root@nextcloud:/mnt/ncdata/snoopy#

Since the NAS drive isnt getting mounted, nothing will sync

I commented out //192.168.1.1/storage /mnt/ncdata cifs rw,mfsymlinks,seal,credentials=/mnt/.credentials,uid=33,gid=0,file_mode=0770,dir_mode=0770 0 0

and uncommented //192.168.1.1/storage /mnt/ncdata cifs vers=1.0,uid=www-data,gid=www-data,credentials=/mnt/.credentials,iocharset=utf8 0 0
rebooted NC. The containers started.
From the web interface I created a doc called Hi. That did show up in the nc client folder.
In the nc client folder I created a test doc called test and that showed up in the web interface.

Yet, I got pop up errors saying both could not sync due to errors - even though they did sync

1 Like

You might want to add vers=1.0 baxk and remove the seal option for a test.

1 Like

Thanks again for your help. The troubleshooting steps lead me to the problem which was my NAS 1TB drive having issues. I moved all the data off, reformatted completely and moved the data back. I was able to boot the NC server and all containers started. I did have sync issues, but that was resulved by restoring from backup. Been running for a wekk now with no issue.

2 Likes

@mstrauss22 and @szaimen thank you for this thread. I am having the same issue, but as a noob, cannot follow where @mstrauss22 commented out and uncommented the line of code. How do I do that? When I “sudo ls -la /mnt/ncdata && sudo mount |grep ncdata”, I get a "ls: cannot access ‘/mnt/ncdata’ : no suck file or directory.