Closed deanfourie1 closed 3 weeks ago
I can’t really help you with this one. The database image fails to start. But don’t develop that one. It should work however. Try checking for special characters in the username/password etc. the image itself should work so it must be something with the input
Thanks, I sorted this by removing all previously created containers and starting again, not sure why it would not overwrite.
However, now it cannot login to my mail server.
I have a slightly complex password containing characters such as !@#$%^&*().
I have tried wrapping the password like
'password' and "password"
however, still it cannot login, just fails authentication.
web-1 | 2024/05/29 14:42:31 [error] 18#18: *1 FastCGI sent in stderr: "PHP message: [critical] Error thrown while running command "app:getreportsfrommailbox". Message: "["Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Authentication failed.","Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Authentication failed.","Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Authentication failed."]"" while reading response header from upstream, client: xxx server: _, request: "GET /reports/checkmailnow HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:",
Im sorry, but this tool simply does not work.
@tobsowo is this similar to the problem you were having?
No, it's not. I'm unable to retrieve emails so that it can be processed and see the results.
No, it's not. I'm unable to retrieve emails so that it can be processed and see the results.
could you post the error messages again for me? preferably from the docker output when running the app:getreportsfrommailbox command
just to make sure
Just pulled the latest version, got slapped with a database updates setup screen,
But when I click update database schema, nothing happens? Is this a bug?
Also, is there a way to run the migrations manually?
Thanks
Just pulled the latest version, got slapped with a database updates setup screen,
But when I click update database schema, nothing happens? Is this a bug?
Also, is there a way to run the migrations manually?
Thanks
The docker version should auto run the migrations on startup. Could you check if you have set the DATABASE_TYPE variable to your database type?
The docker version should auto run the migrations on startup. Could you check if you have set the DATABASE_TYPE variable to your database type?
Yes the type is set to mysql.
I've restarted the container several time, I cannot get past this screen, this was after doing a docker pull for the latest tag.
I also completely deleted the folder, backed up my docker-compose.yml and re cloned the repo, copy docker-compose back and same result.
Ah, here we go
web-1 | [critical] Error thrown while running command "doctrine:migrations:migrate --no-interaction". Message: "An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'user'@'172.21.0.3' (using password: YES)"
web-1 |
web-1 | In ExceptionConverter.php line 80:
web-1 |
web-1 | An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied f
web-1 | or user 'user'@'172.21.0.3' (using password: YES)
web-1 |
web-1 |
web-1 | In Exception.php line 28:
web-1 |
web-1 | SQLSTATE[HY000] [1045] Access denied for user 'user'@'172.21.0.3' (using pa
web-1 | ssword: YES)
web-1 |
web-1 |
web-1 | In Driver.php line 33:
web-1 |
web-1 | SQLSTATE[HY000] [1045] Access denied for user 'user'@'172.21.0.3' (using pa
web-1 | ssword: YES)
No matter what I do, i still get this error
db-1 | 2024-06-05 11:17:46 5 [Warning] Access denied for user 'databaseuser'@'172.21.0.3' (using password: YES)
web-1 | [critical] Error thrown while running command "doctrine:migrations:migrate --no-interaction". Message: "An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'databaseuser'@'172.21.0.3' (using password: YES)"
web-1 |
web-1 | In ExceptionConverter.php line 80:
web-1 |
web-1 | An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied f
web-1 | or user 'databaseuser'@'172.21.0.3' (using password: YES)
web-1 |
web-1 |
web-1 | In Exception.php line 28:
web-1 |
web-1 | SQLSTATE[HY000] [1045] Access denied for user 'databaseuser'@'172.21.0.3' (
web-1 | using password: YES)
web-1 |
web-1 |
web-1 | In Driver.php line 33:
web-1 |
web-1 | SQLSTATE[HY000] [1045] Access denied for user 'databaseuser'@'172.21.0.3' (
web-1 | using password: YES)
Docker compose as below
name: dmarc-smtptls-reports version: "2" services: db: image: mariadb:latest environment: MYSQL_DATABASE: dmarc MYSQL_USER: dbuser MYSQL_PASSWORD: password MYSQL_ROOT_PASSWORD: password1 ports:
ah, the connection details for the database are incorrect. The database returns an login failure
Which connection details?
Database connection details.
Hmm ok,
Changed DATABASE_HOST: localhost
web-1 | Generate .env.local file
web-1 | Set cron schedule
web-1 | 2024-06-05 13:41:23,525 INFO success: containerstartup entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
web-1 | Cron schedule match found, following input
web-1 | Setting timezone to Europe/Amsterdam
web-1 | Run migrations
web-1 | [critical] Error thrown while running command "doctrine:migrations:migrate --no-interaction". Message: "An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory"
web-1 |
web-1 | In ExceptionConverter.php line 80:
web-1 |
web-1 | An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or
web-1 | directory
web-1 |
web-1 |
web-1 | In Exception.php line 28:
web-1 |
web-1 | SQLSTATE[HY000] [2002] No such file or directory
web-1 |
web-1 |
web-1 | In Driver.php line 33:
web-1 |
web-1 | SQLSTATE[HY000] [2002] No such file or directory
i dont think localhost will ever work as a database host, dont you think?
Sorry im not sure, Im just using your provided docker compose file.
In your stock docker compose file, it is listed at "db" which you stated in incorrect.
In your stock docker compose file, it is listed at "db" which you stated in incorrect.
hostname: db refers to the database container name in the stack
services: db:
this is a perfectly normal way of defining relations between containers in a docker-compose It tells docker where to point to as a host so it can do the proper mapping
haha, but the point is it is not working...
With your included standard docker compose file,
Attaching to db-1, web-1
web-1 | 2024-06-10 10:53:21,186 INFO Set uid to user 0 succeeded
web-1 | 2024-06-10 10:53:21,187 INFO supervisord started with pid 1
web-1 | 2024-06-10 10:53:22,189 INFO spawned: 'containerstartup' with pid 8
web-1 | 2024-06-10 10:53:22,191 INFO spawned: 'cron' with pid 9
web-1 | 2024-06-10 10:53:22,192 INFO spawned: 'nginx' with pid 10
web-1 | 2024-06-10 10:53:22,194 INFO spawned: 'php-fpm' with pid 15
web-1 | Generate .env.local file
web-1 | Set cron schedule
web-1 | 2024-06-10 10:53:22,195 INFO success: containerstartup entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
web-1 | Cron schedule match found, following input
web-1 | Setting timezone to Europe/Amsterdam
web-1 | Run migrations
db-1 | 2024-06-10 8:53:22 7 [Warning] Access denied for user 'dmarc'@'172.24.0.3' (using password: YES)
web-1 | [critical] Error thrown while running command "doctrine:migrations:migrate --no-interaction". Message: "An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'dmarc'@'172.24.0.3' (using password: YES)"
web-1 |
web-1 | In ExceptionConverter.php line 80:
web-1 |
web-1 | An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied f
web-1 | or user 'dmarc'@'172.24.0.3' (using password: YES)
web-1 |
web-1 |
web-1 | In Exception.php line 28:
web-1 |
web-1 | SQLSTATE[HY000] [1045] Access denied for user 'dmarc'@'172.24.0.3' (using p
web-1 | assword: YES)
web-1 |
web-1 |
web-1 | In Driver.php line 33:
web-1 |
web-1 | SQLSTATE[HY000] [1045] Access denied for user 'dmarc'@'172.24.0.3' (using p
web-1 | assword: YES)
web-1 |
web-1 |
web-1 | doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--] [<version>]
web-1 |
web-1 | 2024-06-10 10:53:22,295 WARN exited: containerstartup (exit status 255; not expected)
web-1 | 2024-06-10 10:53:23,296 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
web-1 | 2024-06-10 10:53:23,296 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
web-1 | 2024-06-10 10:53:23,296 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
web-1 | [10-Jun-2024 10:53:25] NOTICE: fpm is running, pid 24
web-1 | [10-Jun-2024 10:53:25] NOTICE: ready to handle connections
^CGracefully stopping... (press Ctrl+C again to force)
My docker-compose.yml
name: dmarc-smtptls-reports
version: "2"
services:
db:
image: mariadb:latest
environment:
MYSQL_DATABASE: dmarc
MYSQL_USER: dmarc
MYSQL_PASSWORD: Password123
MYSQL_ROOT_PASSWORD: Password1
ports:
- 3306
restart: unless-stopped
healthcheck:
test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
interval: 10s
timeout: 5s
retries: 6
web:
image: antedebaas/dmarc-reports:latest
ports:
- 0.0.0.0:8000:8080
environment:
TZ: Europe/Amsterdam
DATABASE_TYPE: mysql
DATABASE_HOST: db
DATABASE_PORT: 3306
DATABASE_NAME: dmarc
DATABASE_USER: dmarc
DATABASE_PASSWORD: Password123
MAILER_HOST:
MAILER_SMTPPORT: 587
MAILER_IMAPPORT: 993
MAILER_USER:
MAILER_PASSWORD:
DELETE_PROCESSED_MAILS: false
ENABLE_REGISTRATION: false
MAILCHECK_SCHEDULE: "0 * * * *"
restart: unless-stopped
depends_on:
db:
condition: service_healthy
The problem is a database access problem. Not a docker compose problem. It’s connecting just fine. Your database just does not allow access
I must say, I have a reputation for not being able to get docker containers working
Ill do some more docker practice!
Closing this for now. Feel free to reopen or open a new issue when you need one.
The error.
My compose,