Hi,
I'm very enthusiastic about installing Nextcloud as a Kodi plugin, that will define for me the systemd service. But I've to say that I'm more or less hopeless; after having tried initializing Nextcloud container and make it communicate with MariaDB.
In sort
I installed NextCloud and MariaDB addons, but when I connect to NextCloud UI for the install process (when we specify DB address, user and password), I got
<br>
Quote
SQLSTATE[HY000] [2002] Connection refused
Details
I followed the steps detailed in this thread. Here are the detailed steps I followed:
install mariadb, with no user and pre-created db, or with a dedicated user and
nc
database (nc for NextCloud) as read in this threadwaiting for the installation to complete (cheching with
docker logs
that all installation steps finished and that the server is actually ready and listening)in case I installed with a dedicated user:
- checked that the user (
'nextcloud'@'%'
) had all privileges by using mysql command in mariadb container - also checked the nextcloud password
- checked that the user (
install NextCloud addon
Wait for install to finish (checking container's logs)
reboot (I wonder why, but I tried ad it's mentioned by a moderator user in this comment, I did it without thinking)
checked that I'm able to access mariadb from another container:
- installed Adminer image
- added this container onto
lsio
network - successfully logged onto DB as root and nextcloud user (using 172.18.0.3, witch is MariaDB IP address in
lsio
network)
but when I try to connect MariaDB from Nextcloud, this just doesn't works:
I tried all combinations of:
- using MariaDB root login / pass, or dedicated
nc
DB user / pass (that have all privileges onnc
database) - using as DB host and port: all combinations of ("172.18.0.3", "mariadb") for host and ("3306", blank) for port
Later I noticed that in NextCloud log file for every attempt there was this error:
<br>
Quote"remoteAddr":"192.168.1.45","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Host 192.168.1.115 was not connected to because it violates local access rules","version":"20.0.6.1"
I checked in Nextcloud's config.php
file (/storage/.kodi/userdata/addon_data/docker.linuxserver.nextcloud/config/www/nextcloud/config/config.php) and my box LAN IP address is whitelisted in trusted domains:
I also tested to add 'allow_local_remote_servers' => true,
as I read here (without understanding deeply)
Containers network problems
When I launch bash on nextcloud
container (docker exec -it nextcloud bash
- I'm not able to ping
mariadb
container- using its name
mariadb
- using its IP in
lsio
network (172.18.0.3
in my case)
- using its name
I realized that I'm not able to access internet neither. Here's the content of
/etc/resolv.conf
:
I suppose this isn't "normal", but I'm not an expert in networking.
Final thoughts
I'm wondering where did I missed something.
- is the problem is related to the "local access rules violation" problem ?
- is the problem is related to the communication issues between the 2 containers ? I'm on the verge to define my own docker-compose file and make a systemd service to see if that helps
Additional information
- LibreELEC v9.2.6 on Raspberry Pi4
LibreELEC:~ # docker inspect -f '{{ index .Config.Labels "build_version" }}' mariadb
Linuxserver.io version:- 110.4.17mariabionic-ls8 Build-date:- 2021-01-23T01:27:05-05:00
LibreELEC:~ # docker inspect -f '{{ index .Config.Labels "build_version" }}' nextcloud
Linuxserver.io version:- 20.0.6-ls117 Build-date:- 2021-01-26T13:30:45-05:00
Does anyone have any clue ? aptalca maybe ? I'd be grateful !
Thanks for reading !