postal icon indicating copy to clipboard operation
postal copied to clipboard

Installation Error

Open SaasX opened this issue 5 years ago • 4 comments

Hi,

I using tutorial to install postal on ubuntu server but i have an error on this step : postal initialize

The error : Initializing database rake aborted! Mysql2::Error::ConnectionError: Access denied for user 'postal'@'localhost' (using password: YES) /opt/postal/vendor/bundle/ruby/2.3.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in connect' /opt/postal/vendor/bundle/ruby/2.3.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:90:in initialize' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in new' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in mysql2_connection' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:830:in new_connection' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:874:in checkout_new_connection' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in try_to_checkout_new_connection' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:814:in acquire_connection' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:538:in checkout' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in connection' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1033:in retrieve_connection' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_handling.rb:118:in retrieve_connection' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/connection_handling.rb:90:in connection' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/tasks/database_tasks.rb:57:in check_protected_environments!' /opt/postal/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.4.3/lib/active_record/railties/databases.rake:13:in block (2 levels) in <top (required)>' /opt/postal/vendor/bundle/ruby/2.3.0/gems/rake-12.3.3/exe/rake:27:in <top (required)>' Tasks: TOP => db:schema:load => db:check_protected_environments (See full trace by running task with --trace)

An idea ?

SaasX avatar Feb 25 '21 18:02 SaasX

Mysql2::Error::ConnectionError: Access denied for user 'postal'@'localhost' (using password: YES)

Seems like there is something wrong with your database configuration. Check if your username and password combination are correct.

dermalikmann avatar Feb 27 '21 10:02 dermalikmann

I resumed the configuration and it works.

Another problem is that I cannot connect in 25 / STARTLS (which I did in quick installation).

Port 25 is well open and used by postal services.

What type of connection do you use?

SaasX avatar Mar 01 '21 14:03 SaasX

You need to configure the smtp_server settings in the config file to enable it and provide an SSL certificate.

willpower232 avatar Mar 02 '21 09:03 willpower232

Thank you for your answer. I manage to connect to the server now, but the messages remain with the status "pending".

SaasX avatar Mar 02 '21 10:03 SaasX