Next(cloud) error off the rank

Hi,
Syncthing is now running.
I installed Nextcloud but receive an error when trying to access it via /nextcloud

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Where would I access the server log?

Is configuration best done via command line or web interface?

And does anyone have tutorial link for getting it set up to my domain, preferably at nextcloud.mydomain.net and getting it set up with certbot?

Where do you get this error message? Usually NextCloud is working out of the box. There is nothing to configure. It can be uesed directly after installation completed.

Regarding SSL, you can follow this guide

  1. (optional) create a clean DietPi installation and complete initial setup
  2. first you would need to have a DynDNS service that allow you to connect from outside world to your home network by using a dynamic domain name. If you already have a DDNS service, you can go to point 5
  3. to get a DDNS domain, you would need to register at https://www.noip.com/ first
  4. if you finished registration process, we can go to install No-IP software on your DietPi device
  • run dietpi-config
    • go to option 8 : Network Options: Misc
    • select No-IP
    • confirm installation
    • once installation of No-IP software is done, select No-IP again
    • enter your login credentials for No-IP
  1. if DDNS is working, continue with next step
  2. ensure Port 80 and 443 are forwarded (from your internet router) correctly to your DietPi device
  3. once ready, run dietpi-software, search and install NextCloud
  4. once installation completed and your system was rebooted, try to connect to your Webserver on http (port 80)
  5. pls try to connect from your LAN as well as from Internet, you should receive the Webserver Default Page
  • once you’re able to connect to your Webserver from Internet on http (80), got to point 10. (https - port 443 will not work at this stage)
    • if you are not able to connect on http (80) from internet, you would need to check why and what’s wrong with your port forwarding
  1. let’s do the SSL certificate now, run dietpi-letsencrypt
  2. install CertBot
  3. once done you will be ask for your Let’sEncrypt information
  • fill in your domain name (No-IP DDNS)
    • fill in your email address
    • set Redirect to ON
    • Apply the setting
  1. once finished (and all services started) you should be able to reach your website on http (80) as well as https (443)
  2. if you are opening the website on http (80) you should be automatically redirected to https (443)

Hi,
I get the error in the browser

I have a domain name to use but I was just trying to access via the local ip address at this stage until I get some security in order.

you already get the issue by opening just the IP address http://192.168.20.19 ?

In that case I get 403 Forbidden

are you running any other web application and which web server you are using?

I’m not sure which web server i am using.
I think it’s lighttpd.
I installed pihole, then synching (remember the permissions errors), then Nextcloud.

ah ok, PiHole is the bad guy. Usually PiHole will block the access to the web server if it is installed. I remember another case. Just need to find the solution.

Oh OK
I would have thought pihole + something_else would be a popular combination

it’s the way how PiHole is setting up the web server. Just need to find how it would need to change.

ok I did a test installation with PiHole and NextCloud. Both are working fine. So there seems to be something on your config

http://192.168.20.19/admin is working for your?
http://192.168.20.19/nextcloud is not working correct?

and what about http://192.168.20.19/phpinfo.php

lighttpd error log can be found at /var/log/lighttpd/error.log

can you check witch config files are active

/etc/lighttpd/conf-enabled

and let’s check how document root for your web server looks like

ls -la /var/www/

****Hi Joulinar,
Thank you for your ongoing help.
http://192.168.20.19/admin




http://192.168.20.19/nextcloud




and what about http://192.168.20.19/phpinfo.php

Link to PDF of full phpinfo() output
https://app.box.com/s/yz75x8bav4mhb78beb68hmus35zvfojz

/var/log/lighttpd/error.log
this is an empty file

/etc/lighttpd/conf-enabled

jon@Odroid:~$ /etc/lighttpd/conf-enabled
-bash: /etc/lighttpd/conf-enabled: Is a directory
jon@Odroid:~$ cd /etc/lighttpd/conf-enabled
jon@Odroid:/etc/lighttpd/conf-enabled$ ls -al
total 8
drwxr-xr-x 2 root root 4096 May 11 22:50 .
drwxr-xr-x 4 root root 4096 May 11 17:43 ..
lrwxrwxrwx 1 root root   33 May 11 17:43 10-fastcgi.conf -> ../conf-available/10-fastcgi.conf
lrwxrwxrwx 1 root root   33 May 11 22:50 10-rewrite.conf -> ../conf-available/10-rewrite.conf
lrwxrwxrwx 1 root root   37 May 11 17:43 15-fastcgi-php.conf -> ../conf-available/15-fastcgi-php.conf
lrwxrwxrwx 1 root root   45 May 11 22:50 99-dietpi-dav_redirect.conf -> ../conf-available/99-dietpi-dav_redirect.conf
lrwxrwxrwx 1 root root   42 May 11 22:50 99-dietpi-nextcloud.conf -> ../conf-available/99-dietpi-nextcloud.conf
lrwxrwxrwx 1 root root   58 May 11 17:47 99-dietpi-pihole-block_public_admin.conf -> ../conf-available/99-dietpi-pihole-block_public_admin.conf
lrwxrwxrwx 1 root root   39 May 11 17:43 99-dietpi-pihole.conf -> ../conf-available/99-dietpi-pihole.conf
lrwxrwxrwx 1 root root   38 May 11 17:37 99-unconfigured.conf -> ../conf-available/99-unconfigured.conf



jon@Odroid:/etc/lighttpd/conf-enabled$ ls -la /var/www/
total 84
drwxr-xr-x  4 root     root      4096 May 11 22:49 .
drwxr-xr-x 12 root     root      4096 May 11 11:17 ..
lrwxrwxrwx  1 root     root        10 May 11 17:47 admin -> html/admin
-rw-r--r--  1 root     root     37984 May 11 22:50 apc.php
drwxr-xr-x  4 root     root      4096 May 11 17:42 html
drwxr-xr-x 13 www-data www-data  4096 May 11 22:53 nextcloud
-rw-r--r--  1 root     root     22915 May 11 22:50 opcache.php
-rw-r--r--  1 root     root        20 May 11 22:50 phpinfo.php
lrwxrwxrwx  1 root     root        11 May 11 17:47 pihole -> html/pihole

Hope this helps

Jon

ok, web server seems to be fine. At least it’s running. So indeed something wrong on the nextcloud installation. Can you check if all services are working fine

dietpi-services status

ok, the response is

on@Odroid:~$ sudo dietpi-services status
[sudo] password for jon:

 DietPi-Services
─────────────────────────────────────────────────────
 Mode: status

[  OK  ] DietPi-Services | redis-server		active (running) since Thu 2020-05-14 14:16:34 AEST; 1 day 7h ago
[FAILED] DietPi-Services | ● mariadb.service - MariaDB 10.3.22 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-05-14 14:16:38 AEST; 1 day 7h ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 667 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
  Process: 668 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 670 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 727 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
 Main PID: 727 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

May 14 14:16:34 Odroid systemd[1]: Starting MariaDB 10.3.22 database server...
May 14 14:16:35 Odroid mysqld[727]: 2020-05-14 14:16:35 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 727 ...
May 14 14:16:38 Odroid systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
May 14 14:16:38 Odroid systemd[1]: mariadb.service: Failed with result 'exit-code'.
May 14 14:16:38 Odroid systemd[1]: Failed to start MariaDB 10.3.22 database server.
[  OK  ] DietPi-Services | php7.3-fpm		active (running) since Thu 2020-05-14 14:16:39 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | lighttpd		active (running) since Thu 2020-05-14 14:16:40 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | syncthing		active (running) since Thu 2020-05-14 14:16:40 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | netdata		active (running) since Thu 2020-05-14 14:16:40 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | cron			active (running) since Thu 2020-05-14 14:16:40 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | ssh			active (running) since Thu 2020-05-14 14:16:34 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | fail2ban		active (running) since Thu 2020-05-14 14:15:59 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | pihole-FTL		active (running) since Thu 2020-05-14 14:15:59 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | dietpi-ramlog	active (exited) since Thu 2020-05-14 14:15:58 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | dietpi-preboot	active (exited) since Thu 2020-05-14 14:15:59 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | dietpi-boot		active (exited) since Thu 2020-05-14 14:16:33 AEST; 1 day 7h ago
[  OK  ] DietPi-Services | dietpi-postboot	active (exited) since Thu 2020-05-14 14:16:34 AEST; 1 day 7h ago
[ INFO ] DietPi-Services | dietpi-wifi-monitor	inactive (dead)

ok your database is not running. Let’s check what happen there. Pls restart your DB and check the error log

systemctl restart mariadb.service
journalctl -u mariadb
cat /var/log/mysql/error.log
jon@Odroid:~$ sudo systemctl restart mariadb.service
[sudo] password for jon:
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

what about

journalctl -u mariadb
cat /var/log/mysql/error.log

jon@Odroid:~$ sudo journalctl -u mariadb

-- Logs begin at Thu 2020-05-14 14:15:54 AEST, end at Fri 2020-05-15 22:59:30 AEST. --
May 14 14:16:34 Odroid systemd[1]: Starting MariaDB 10.3.22 database server...
May 14 14:16:35 Odroid mysqld[727]: 2020-05-14 14:16:35 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 727 ...
May 14 14:16:38 Odroid systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
May 14 14:16:38 Odroid systemd[1]: mariadb.service: Failed with result 'exit-code'.
May 14 14:16:38 Odroid systemd[1]: Failed to start MariaDB 10.3.22 database server.
May 15 22:55:49 Odroid systemd[1]: Starting MariaDB 10.3.22 database server...
May 15 22:55:50 Odroid mysqld[9931]: 2020-05-15 22:55:50 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 9931 ...
May 15 22:55:52 Odroid systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
May 15 22:55:52 Odroid systemd[1]: mariadb.service: Failed with result 'exit-code'.
May 15 22:55:52 Odroid systemd[1]: Failed to start MariaDB 10.3.22 database server.

jon@Odroid:~$ sudo cat /var/log/mysql/error.log

2020-05-15 22:55:50 0 [Note] InnoDB: Using Linux native AIO
2020-05-15 22:55:50 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-05-15 22:55:50 0 [Note] InnoDB: Uses event mutexes
2020-05-15 22:55:50 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-05-15 22:55:50 0 [Note] InnoDB: Number of pools: 1
2020-05-15 22:55:50 0 [Note] InnoDB: Using generic crc32 instructions
2020-05-15 22:55:50 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-05-15 22:55:50 0 [Note] InnoDB: Completed initialization of buffer pool
2020-05-15 22:55:50 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-05-15 22:55:50 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-05-15 22:55:50 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-05-15 22:55:50 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-05-15 22:55:50 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-05-15 22:55:50 0 [Note] InnoDB: 10.3.22 started; log sequence number 17126069; transaction id 88068
2020-05-15 22:55:50 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/dietpi_userdata/mysql/ib_buffer_pool
2020-05-15 22:55:50 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-05-15 22:55:50 0 [Note] Recovering after a crash using tc.log
2020-05-15 22:55:50 0 [ERROR] Bad magic header in tc log
2020-05-15 22:55:50 0 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2020-05-15 22:55:50 0 [ERROR] Can't init tc log
2020-05-15 22:55:50 0 [ERROR] Aborting

pls try following

sudo mv /var/lib/mysql/tc.log /var/lib/mysql/tc_bkp.log
systemctl restart mariadb.service