Closed xpseudonym closed 4 years ago
The second drive isn't mounted correctly, that's why .ocdata
is missing.
So, where should Nextcloud_VM_www.hanssonit.se-sdb go - which I assume is vdb?
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/nextcloud--vg-root / ext4 errors=remount-ro 0 1
/dev/mapper/nextcloud--vg-swap_1 none swap sw 0 0
:/dev/mapper# ls -l
total 0
crw------- 1 root root 10, 236 Nov 24 01:48 control
lrwxrwxrwx 1 root root 7 Nov 24 01:48 nextcloud--vg-root -> ../dm-0
lrwxrwxrwx 1 root root 7 Nov 24 01:48 nextcloud--vg-swap_1 -> ../dm-1
:/dev/mapper# cd ../
:/dev# ls -l dm*
brw-rw---- 1 root disk 253, 0 Nov 24 01:48 dm-0
brw-rw---- 1 root disk 253, 1 Nov 24 01:48 dm-1
:/dev# ls -l vd*
brw-rw---- 1 root disk 252, 0 Nov 24 01:48 vda
brw-rw---- 1 root disk 252, 1 Nov 24 01:48 vda1
brw-rw---- 1 root disk 252, 16 Nov 24 01:48 vdb
brw-rw---- 1 root disk 252, 17 Nov 24 01:48 vdb1
brw-rw---- 1 root disk 252, 25 Nov 24 01:48 vdb9
:/dev#
hmm, I think by .ocdata... you mean ncdata? And, /dev/disk/by-label/ncdata does, indeed, point to vdb - vdb1. Which I assume needs mounting here: /mnt/ncdata? What's on vdb9?
Please post the output of df -h
. and ls -l /mnt/ncdata
Oh, I see, .ocdata should be here /mnt/ncdata/.ocdata
zpool import -fR / ncdata
Put's it there
How do I keep it there?
Oops, missed that
# df -h
Filesystem Size Used Avail Use% Mounted on
udev 967M 0 967M 0% /dev
tmpfs 200M 1.1M 199M 1% /run
/dev/mapper/nextcloud--vg-root 39G 3.2G 33G 9% /
tmpfs 997M 8.0K 997M 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 997M 0 997M 0% /sys/fs/cgroup
tmpfs 200M 0 200M 0% /run/user/1000
ncdata 39G 14M 39G 1% /mnt/ncdata
# ls -l /mnt/ncdata
total 2
drwxr-xr-x 5 www-data www-data 5 Nov 7 21:45 appdata_ocjykjmxhd1e
drwxr-xr-x 2 www-data www-data 3 Nov 7 21:44 files_external
-rw-r--r-- 1 www-data www-data 0 Nov 7 21:42 index.html
drwxr-xr-x 3 www-data www-data 3 Nov 7 21:42 ncadmin
But, that's after running:
zpool import -fR / ncdata
But, that's after running: zpool import -fR / ncdata
OK, issue is solved then. :)
Will it stick one boot to the next?
Hmm, no, not persistent one boot to another:
[sudo] password for ncadmin:
Fetching all the variables from lib.sh...
Testing if network is OK...
Checking connection...
curl didn't produce a 200 status, is the site reachable?
Setting correct interface...
Checking connection...
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: github.com
Address: 140.82.113.4
Testing if network is OK...
Checking connection...
Online!
/dev/fd/63: line 789: [: : integer expression expected
/dev/fd/63: line 825: [: : integer expression expected
Your data directory is invalid
Ensure there is a file called ".ocdata" in the root of the data directory.
Your data directory is not writable
Permissions can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/17/go.php?to=admin-dir_permissions.
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:166
Stack trace:
#0 /var/www/nextcloud/console.php(96): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#2 {main}Sorry but something went wrong. Please report this issue to https://github.com/nextcloud/vm/issues and include the output of the error message. Thank you!
sudo -u www-data php /var/www/nextcloud/occ -V failed
I can't reproduce this error and I do several installations every day on different servers around the world so there's nothing wrong in the scripts.
Please ask for help in the forum or get hands on support according to the "Support" label.
Thanks!
Because you are using a different vm system (virsh) to mount the zpool the systems uuid has changed, zpool won't automatically mount the zpool because it thinks it belongs to a different system. Running the following commands fixed it for me. (I'm using bhyve on FreeBSD).
sudo zpool import ncdata
sudo reboot
The -R
option for zpool import
will only temporarily import the pool.
(I'm using bhyve on FreeBSD).
@fyfe That makes sense, and is expected as well.
You can read more about currently supported systems here.
@fyfe from my (limited) reading, the -R option seems to over-ride a cachefile, from the man: 'Set‐ ting altroot defaults to using cachefile=none'; 'Sets the "cachefile" property to "none"' I found this here: https://www.linuxtopia.org/online_books/opensolaris_2008/ZFSADMIN/html/gbscy.html#gftgp This release provides the cachefile property, which controls where pool configuration information is cached. All pools in the cache are automatically imported when the system boots.
I can confirm the fix form me - gnu/linux/fedora (how many slashes does a system need)
@xpseudonym It seems there may be room for improvement?
Do you fancy making a PR to correct future issues?
Err, what's a PR...?
If you think something is wrong in the code, you can contribute by making a PR (Pull Request) and commit your improvements.
Thanks!
Ah, that is very flattering, thank you. I'm sorry, de-bugging is one thing - I'm good at fixing cars, nuts and bolts I can hold in my hands, but retaining bits of code in my mind... It's just never worked.
Funny, I know nothing about cars. :)
:o)
FYI there's a new guide online for installing on TrueNAS.
Thank you for that - I've since discovered the benefits of containers... :)
Steps to reproduce
Expected behaviour
setup script runs successfuly
Actual behaviour
[sudo] password for ncadmin: Fetching all the variables from lib.sh... Testing if network is OK... Checking connection... curl: (7) Couldn't connect to server curl didn't produce a 200 status, is the site reachable? Setting correct interface... Checking connection... Server: 127.0.0.53 Address: 127.0.0.53#53
Non-authoritative answer: Name: github.com Address: 140.82.118.3
Testing if network is OK... Checking connection... Online! /dev/fd/63: line 789: [: : integer expression expected /dev/fd/63: line 825: [: : integer expression expected Your data directory is invalid Ensure there is a file called ".ocdata" in the root of the data directory.
Your data directory is not writable Permissions can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/17/go.php?to=admin-dir_permissions.
An unhandled exception has been thrown: Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:166 Stack trace:
0 /var/www/nextcloud/console.php(96): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
1 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
2 {main}Sorry but something went wrong. Please report this issue to https://github.com/nextcloud/vm/issues and include the output of the error message. Thank you!
sudo -u www-data php /var/www/nextcloud/occ -V failed root@nextcloud:~# ping google.com PING google.com (172.217.20.110) 56(84) bytes of data. 64 bytes from fra02s28-in-f14.1e100.net (172.217.20.110): icmp_seq=1 ttl=51 time=18.1 ms ^C --- google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 15.834/16.758/18.180/1.025 ms root@nextcloud:~#
Server configuration
Linux nextcloud 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Nextcloud server version: (see your admin page) Sorry, can't access web server (admin page)
Server OS (Ubuntu server is default) Linux nextcloud 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
How did you install the VM? (Scripted install from master OR Released version) virt-v2v -i ova Nextcloud-VM_www.hanssonit.se.ova -of qcow2
Network
Do you use DHCP? Yes
Is port 80 and/or 443 open? Yes, VM is on 192.168.0.22 http://192.168.0.22/ replies 'Apache2 Ubuntu Default Page' http://192.168.0.22/nextcloud replies: 'Not Found The requested URL was not found on this server.'
Logs / Screenshots
Log file (/mnt/ncdata/nextcloud.log)
less /mnt/ncdata/nextcloud.log
/mnt/ncdata/nextcloud.log: No such file or directory
Insert your nextcloud.log file here
less /mnt/ncdata/nextcloud.log
/mnt/ncdata/nextcloud.log: No such file or directory
Installation log (command output)
Screenshoots