Nikeev / sesdashboard

Analytics and activity tracking dashboard for AWS Simple Email Service
https://sesdashboard.com/
MIT License
86 stars 27 forks source link

Getting this error when running bin/console #40

Closed L1so closed 2 years ago

L1so commented 2 years ago

Hello, this project looks promising and good, so I decided to install it. However, I get this error.

04:12:07 CRITICAL  [console] Error thrown while running command "doctrine:migrations:migrate -n". Message: "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution" ["exception" => Doctrine\DBAL\Exception\ConnectionException^ { …},"command" => "doctrine:migrations:migrate -n","message" => "An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution"]                      

In AbstractMySQLDriver.php line 112:

  An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name r  
  esolution                                                                                                                          

In Exception.php line 18:

  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution  

In PDOConnection.php line 39:

  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution  

In PDOConnection.php line 39:

  PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution  

doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [--] [<version>]

I already fill my credential on .env.local, whats wrong with them ? Thank you

Nikeev commented 2 years ago

Hello!

Do you use Docker to run an application?

It seems that application can't connect to MySQL server.

If it is Docker installation, please check that MySQL container is running and available. If you are running an app not in Docker, please also check DATABASE_URL variable in .env.local and replace sesdashboard-mysql with your MySQL server credentials, for example localhost or 127.0.0.1. Check the port 3306 too.

L1so commented 2 years ago

I'm using what you call a regular install, I have apache webserver running on my server. I don't know much about composer etc.

Ok, will do that. Thanks !

L1so commented 2 years ago

My bad ! I thought I only need to set mysql password and user, I forgot sesdashboard-mysql line. Thanks !

Also can I view the body of the mail using this program ? I just got it installed, but yet to find my email body.

Nikeev commented 2 years ago

Email body is not passed with event data that Amazon SES publishes to Amazon SNS, so it is not possible to find it in an app.

L1so commented 2 years ago

Too bad then, I used to have this functionality back on sendinblue. Thank you very much :smiley:

MaximilianKohler commented 5 months ago

I also got an error with the docker install:

WARN[0000] /home/nginx/domains/domain.com/docker-compose.yml: `version` is obsolete
OCI runtime exec failed: exec failed: unable to start container process: exec: "bin/console": permission denied: unknown
make: *** [migrations] Error 126

These are the default permissions:

permissions

I changed them to 754 then ran docker compose down and make init. I then got a different error:

make init
docker compose up -d
[+] Running 3/4
 ⠸ Network egname_default  Created                                                                                                       0.3s
 ✔ Container sesdashboard-webserver          Started                                                                                                       0.3s
 ✔ Container sesdashboard-php-fpm            Started                                                                                                       0.2s
 ✔ Container sesdashboard-mysql              Started                                                                                                       0.2s
Composer could not detect the root package (nikeev/sesdashboard) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package box/spout is abandoned, you should avoid using it. No replacement was suggested.
Package sensio/framework-extra-bundle is abandoned, you should avoid using it. Use Symfony instead.
Generating autoload files
119 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Run composer recipes at any time to see the status of your Symfony recipes.

Executing script cache:clear [OK]
Executing script assets:install public [OK]

/usr/bin/env: 'php\r': No such file or directory
make: *** [migrations] Error 127

Are there other permissions that need to be set? I would guess that the public folder needs to be changed from 750 to 754?

This thread https://stackoverflow.com/questions/50789087/windows-10-docker-usr-bin-env-php-r-no-such-file-or-directory hinted that the issue is the line breaks, and I confirmed with notepad++ that the files are using windows CR LF instead of unix LF. I had cloned the files locally and then uploaded them to the linux server with Filezilla. So I ran docker compose down then deleted all the files and git cloned again directly to the server. Now the line breaks are all linux and the default permissions for bin/console are 755, and everything worked fine.