Closed abelardolg closed 4 years ago
Can you paste here mysql container logs?
This is happening on make start right?
Hi there,
How could I get the mysql container logs, please?
Yes, it is happening on make start.
Regards.
@jorge07 , ΒΏte refieres a este? dpkg.log
Is mandatory to run any script prior run make start
?
No it isn't. Just make sure docker shows all services up
Yes, at this point docker shows all services up. Here is the log of my last attempt mere minutes ago. log_make_start.log
Can you pass the output of docker logs cqrs_symfony_mysql_1
to see if mysql is ready to accept connections? It can be slow depending of how many resources you use.
Hi @jorge07 ,
I run make start
and when it showed the error mentioned above, I run docker logs cqrs_symfony_mysql_1
:
mysql_logs.log
Mmm very rare, all seems healthy. Can you try the make start
sstep by step? You just need to follow the makefile
@jorge07 do you have any idea why I cannot call 'mysql' container from inside of PHP one? It seems to be error somewhere in configuration, but I cannot figure out where. While making migrations (make db
) I'm getting an error PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name does not resolve
. Any ieas? Thanks in advance!
I'll add an extra step call wait-for-mysql
to make it less error prone. Thanks
Thanks, @jorge07 ! π
As promised #174
Hi there, Does that PR fix this issue?
Best regards.
It does for me. Just need another one to confirm before merge Here my logs
symfony-5-es-cqrs-boilerplate on ξ master [!] via π v7.3.11 on π³ v19.03.5 via (dockerd) at βΈοΈ minikube
β make start
docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml stop
Stopping symfony-5-es-cqrs-boilerplate_elasticsearch_1 ... done
Stopping symfony-5-es-cqrs-boilerplate_rmq_1 ... done
Stopping symfony-5-es-cqrs-boilerplate_mysql_1 ... done
docker-compose rm -v -f
Going to remove symfony-5-es-cqrs-boilerplate_elasticsearch_1, symfony-5-es-cqrs-boilerplate_rmq_1, symfony-5-es-cqrs-boilerplate_mysql_1
Removing symfony-5-es-cqrs-boilerplate_elasticsearch_1 ... done
Removing symfony-5-es-cqrs-boilerplate_rmq_1 ... done
Removing symfony-5-es-cqrs-boilerplate_mysql_1 ... done
docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml build
kibana uses an image, skipping
mysql uses an image, skipping
elasticsearch uses an image, skipping
rmq uses an image, skipping
start_dependencies uses an image, skipping
php uses an image, skipping
nginx uses an image, skipping
workers uses an image, skipping
docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml run --rm php sh -lc 'xoff;COMPOSER_MEMORY_LIMIT=-1 composer install'
Creating symfony-5-es-cqrs-boilerplate_rmq_1 ... done
Creating symfony-5-es-cqrs-boilerplate_elasticsearch_1 ... done
Creating symfony-5-es-cqrs-boilerplate_mysql_1 ... done
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
81 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Executing script cache:clear [OK]
Executing script assets:install public [OK]
docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml run --rm start_dependencies
Starting symfony-5-es-cqrs-boilerplate_elasticsearch_1 ... done
Starting symfony-5-es-cqrs-boilerplate_rmq_1 ... done
Starting symfony-5-es-cqrs-boilerplate_mysql_1 ... done
Pulling start_dependencies (dadarek/wait-for-dependencies:)...
latest: Pulling from dadarek/wait-for-dependencies
3489d1c4660e: Pull complete
38737c1480a6: Pull complete
Digest: sha256:b38e28108dee0aad90984e176adcc014dbf31b528602640f6c9a280cdc7ce2f0
Status: Downloaded newer image for dadarek/wait-for-dependencies:latest
Waiting for mysql to listen on 3306...
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
Waiting for elasticsearch to listen on 9200...
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
sleeping
Waiting for rmq to listen on 5672...
docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml up -d
symfony-5-es-cqrs-boilerplate_rmq_1 is up-to-date
symfony-5-es-cqrs-boilerplate_mysql_1 is up-to-date
Starting symfony-5-es-cqrs-boilerplate_kibana_1 ...
Starting symfony-5-es-cqrs-boilerplate_kibana_1 ... done
Creating symfony-5-es-cqrs-boilerplate_workers_1 ... done
Creating symfony-5-es-cqrs-boilerplate_php_1 ... done
Creating symfony-5-es-cqrs-boilerplate_start_dependencies_1 ... done
Creating symfony-5-es-cqrs-boilerplate_nginx_1 ... done
docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml exec -T php sh -lc './bin/console d:d:d --force --if-exists'
Dropped database `api` for connection named default
docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml exec -T php sh -lc './bin/console d:d:c --if-not-exists'
Created database `api` for connection named default
docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml exec -T php sh -lc './bin/console d:m:m -n'
Application Migrations
Migrating up to 20190416102503 from 0
++ migrating 20180102233829
-> CREATE TABLE events (id INT AUTO_INCREMENT NOT NULL, uuid BINARY(16) NOT NULL, playhead INT UNSIGNED NOT NULL, payload LONGTEXT NOT NULL, metadata LONGTEXT NOT NULL, recorded_on VARCHAR(32) NOT NULL, type VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_5387574AD17F50A634B91FA9 (uuid, playhead), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB
++ migrated (took 257.8ms, used 6M memory)
++ migrating 20180204151052
-> CREATE TABLE users (uuid BINARY(16) NOT NULL COMMENT '(DC2Type:uuid_binary)', credentials_email VARCHAR(255) NOT NULL, credentials_password VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_1483A5E9299C9369 (credentials_email), PRIMARY KEY(uuid)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
++ migrated (took 301ms, used 6M memory)
++ migrating 20190416102503
-> ALTER TABLE users ADD created_at DATETIME NOT NULL COMMENT '(DC2Type:datetime_immutable)', ADD updated_at DATETIME DEFAULT NULL COMMENT '(DC2Type:datetime_immutable)'
++ migrated (took 364.3ms, used 6M memory)
------------------------
++ finished in 390.8ms
++ used 6M memory
++ 3 migrations executed
++ 3 sql queries
@jorge07 , I stopped and delete all services prior to execute the make start
command.
When it finished, any errors were showed. All was fine, but...
Then I run symfony server:start to run the app. Firstly, I tried to signup a new user but this operation failed:
An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
Same error.
Let me know what was wrong, please. Thanks in advance. :)
Regards.
You don't need to tun server:start
. Just go to http://locahost:80
and that's it, nginx is running there
This is what I do:
mkdir qa
cd qa
git clone git@github.com:jorge07/symfony-5-es-cqrs-boilerplate.git
cd symfony-5-es-cqrs-boilerplate
make start
open http://127.0.0.1
In your case checkout to the patch branch first
It worked!
Thanks for your effort, @jorge07 !
π€π€π€π€π€π€π€π€π€π€π€π€π€π€π€π€
Nice. Will merge then and close this one.
Hi there,
In a nutshell: When the script runs this command:
sudo docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml exec -T php sh -lc './bin/console d:d:d --force --if-exists'
it displays the following error:
An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused
Please, refer to the attached log file for more information. log_make_start (1).log