Docker, MariaDB, Access Denied per Min, But not

Hello All,

I have recently set up an owncloud install using docker. My only derivation from the docker-compose script was to separate the mariadb into it’s own docker compose and network. I have attached the network to the owncloud container and I am able to login from the owncloud container to the mariadb instance using both the root user and the owncloud user.

The service itself does start up and I am able to use owncloud as fully as I am aware. I am able to add users and see them in the DB after I created them and vise versa when I remove a user I see it disappear from the DB.

The problem is that the owncloud service keeps generating these log files crash-2021-05-09.log. In these files are errors once per minute saying it’s getting access denied from the data base. Additionally; I can see errors on the mariadb side saying access was denied.

I have attached an error for review. Is there something that I have not configured? I am not sure where to go. Everything is working, but I just get these errors every minute.

crash.log (6.1 KB)

I suspect at this time that this must be some sort of PHP incompatibility with Maria DB on whatever the per minuet request is. I base this on the fact that I can use mysql to login from the owncloud container just fine as well as the owncloud service conducting a bunch of its own queries just fine. It’s just some “cron’d” per min query that keeps failed access.

It’s an occ command running periodically the one that is failing to acces the DB. As you’ve said, the DB is rejecting the connection somehow. Maybe you’re accessing as “owncloud@my.host” instead of “owncloud@my.ip”? Those would be 2 different users for mysql.

1 Like

Correction message… I had said this seemed like the issue, but I used the wrong IP when testing. I have tested with the docker issued DNS name for the mariadb container and the direct IP and I was able to connect using either as the host from the owncloud container. Still not sure what going on here, but it would seem that the OCC task is some how attempting to connect using something different than the main connection.

I don’t normally code in PHP, but is there is easy copy and paste snippet I can add to one of the PHP files to spit out what it’s trying to use as it’s connection parameters?

Another possible theory is that I use a generate password for the owncloud user that has special character. Perhaps what ever the occ task uses doesn’t like them?

Here is my config.php (using .txt extension to make the forum app happy) for more insight into my config. I obfuscated some of the values for privacy, but they are all generally like what I am using.

config.txt (1.4 KB)

Maybe that task isn’t running the way it should?
If you’re using the official ownCloud’s docker images, you should have a “config/overwrite.config.php” file. This file loads info from environment variables to be used by ownCloud. If somehow those environment variables aren’t set, the configuration will likely be different.
The official docker images have a “occ” binary in “/usr/bin” which does it for you, so instead of /var/www/owncloud/occ <command> you should be running /usr/bin/occ <command>

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.