I am trying to deploy ruby app to aws using elastic beanstalk. I cd into repo, then git init, git add --all, git commit -am "update", eb init, eb create staging3 -db.engine postgres, fixed some error, then eb deploy. Now I get
FATAL: password authentication failed for user "ebroot"
My database.yml
adapter: postgresql
host: localhost
username: ggg
database: rtt
production:
adapter: postgresql
encoding: utf8
database: <%= ENV['RDS_DB_NAME'] %>
username: <%= ENV['RDS_USERNAME'] %>
password: <%= ENV['RDS_PASSWORD'] %>
host: <%= ENV['RDS_HOSTNAME'] %>
port: <%= ENV['RDS_PORT'] %>
My log http://pasted.co/6590f3ae
I am noob, Is this password has any connection with the password I created when database creation and migration locally.
Changing password: <%= ENV['RDS_PASSWORD'] %> to password: "<%= ENV['RDS_PASSWORD'] %>" fixes the problem. Can you please tell me why this is like this?
Related
Need help connecting to my Google SQL Postgres Database from Google App Engine. I've followed https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/deployment/hosting-guides/google-app-engine.html but keep running into the following error:
2022-09-27 16:11:32 default[20220928t020816] [2022-09-27 16:11:32.307] debug: ⛔️ Server wasn't able to start properly.
2022-09-27 16:11:32 default[20220928t020816] [2022-09-27 16:11:32.309] error: connect ECONNREFUSED /cloudsql/project-id:us-central1:database-id/.s.PGSQL.5432
database.ts
export default ({ env }) => ({
connection: {
client: 'postgres',
connection: {
host: env('DATABASE_HOST', '127.0.0.1'),
port: env.int('DATABASE_PORT', 5432),
database: env('DATABASE_NAME', 'database-id'),
user: env('DATABASE_USERNAME', 'strapi'),
password: env('DATABASE_PASSWORD', 'strapi'),
ssl: env.bool('DATABASE_SSL', false),
},
},
});
app.yaml
runtime: nodejs16
instance_class: F1
env_variables:
ADMIN_JWT_SECRET: 'XXXXXXXXXXXXX'
API_TOKEN_SALT: 'XXXXXXXXXXXXX'
APP_KEYS: 'XXXXXXXXXXXXX'
DATABASE_HOST: '/cloudsql/project-id:us-central1:database-id'
DATABASE_PORT: '5432'
DATABASE_NAME: 'database-id'
DATABASE_USERNAME: 'postgres'
DATABASE_PASSWORD: 'XXXXXXXXXXXXX'
DATABASE_SSL: 'false'
HOST: '0.0.0.0'
JWT_SECRET: 'XXXXXXXXXXXXX'
NODE_ENV: 'production'
PORT: '1337'
beta_settings:
cloud_sql_instances: 'project-id:us-central1:database-id'
One of the causes of error: connect ECONNREFUSED and the most common one when connecting to Cloud SQL using Unix Sockets (as is the case here) is that your GCP project does not have the Cloud SQL Admin API enabled.
Enable the Cloud SQL Admin API and that should help resolve the connectivity issue.
I am trying to set up the JHipster Registry with a local git config server.
--spring.cloud.config.server.composite.0.type=git
--spring.cloud.config.server.composite.0.uri=http://mygit/abc.git
those 2 config works but my git need permission to login.
now I got the error: Authentication is required but no CredentialsProvider has been registered
Does anyone know where can I set up the username and password?
I tried:
--spring.cloud.config.server.git.uri=
--spring.cloud.config.server.git.password=
--spring.cloud.config.server.git.username=
not working
Try
--spring.cloud.config.server.composite.0.username=
--spring.cloud.config.server.composite.0.password=
Add the following in the bootstrap-*.yml
cloud:
config:
server:
bootstrap: true
composite:
- type: git
uri: https://github.com/awnali/configuration
username: ${spring.cloud.config.server.git.username}
password: ${spring.cloud.config.server.git.password}
default-label: main
and then run the application with the following command:
java -jar target/jhipster-registry-6.8.0.jar --spring.profiles.active=prod --spring.cloud.config.server.git.username=***** --spring.cloud.config.server.git.password=*****
When I try to run my app on http://localhost:3000 I get following error
FATAL: password authentication failed for user "postgresq".
Not sure what is the issue, because in database.yml file my password is correct:
default: &default
adapter: postgresql
database: Dzeus
encoding: unicode
username: postgresq
password: mypassword
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
I'm able to connect to the database via pg admin program using the same password. Yesterday it worked fine but today something changed and I'm getting this error. Could you please help?
I'm building an application in MeteorJS.
I want to have GUI access to built-in MongoDB database.
So I found: https://github.com/andzdroid/mongo-express
I installed it, configured it to connect to localhost:3001.
Since mongodb doesn't have a default admin password, I tried to create it by:
meteor mongo
use admin
db.addUser("admin","password")
then I set
adminUsername: 'admin',
adminPassword: 'password',
in mongo-express\config.js.
However when I open localhost:8081, it asks me login credentials again and even if I insert them manaully (admin, password) it doesn't work.
So I went back to meteor mongo, tried to create admin user again and go error
Error: couln't add user: User admin#admin" already exists
What am I doing wrong?
edit /usr/local/lib/node_modules/mongo-express/config.default.js
find and edit to:
} else {
mongo = {
db: 'meteor',
host: 'localhost',
password: '',
port: 3001,
ssl: false,
url: 'mongodb://localhost:3001/meteor',
username: '',
};
}
I just deployed the rails app with Rubber on EC2.Additionally a RDS instance is created for the database. Run
$ cat /etc/host
to get the rubber config on production as
But when I browse http://web01.musemebackend.com/admin/login, I got the error of '504 Gateway Time-out, server didn't respond in time'
The error log in apache2 shows:
[ pid=1813 thr=12161140 file=utils.rb:176 time=2013-03-06 20:49:28.175 ]:
*** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (Can't connect to MySQL server on 'musemedb.cfmz4gvshyts.us-east-1.rds.amazonaws.com' (110) (Mysql2::Error)) (process 1813, thread #<Thread:0x000000017320e8>):
As I modified the config/database.yml:
production:
adapter: mysql2
encoding: utf8
database: muse_me_backend_production
username: app_admin
password: MYPASSWORD
host: musemedb.cfmz4gvshyts.us-east-1.rds.amazonaws.com
port: 3306
modified config/rubber/rubber-mysql.yml as:
# REQUIRED: The credentials for creating/accessong your app's database
#
db_user: app_admin
db_pass: MYPASSWORD
db_name: muse_me_backend_production
db_host: musemedb.cfmz4gvshyts.us-east-1.rds.amazonaws.com
and config/rubber/common/database.yml as
<%
#path = "#{Rubber.root}/config/database.yml"
%>
<%= Rubber.env %>:
adapter: <%= YAML::load(File.open("#{Rubber.root}/config/database.yml"))["production"]["adapter"] %>
encoding: utf8
database: <%= rubber_env.db_name %>
username: <%= rubber_env.db_user %>
password: <%= rubber_env.db_pass %>
host: <%= rubber_env.db_host %>
pool: 5
The app should be deployed successfully. Database migrations are raked successfully too. Are there anything I missed to connect the server? Do I need to own the domain name of musemebackend.com? Now I don't own it. I saw in tutorial it was just foo.com. Does that matter?
Thanks
The problem was that I didn't add the security group of the app role instance to DB security group. Now it was fixed.