error: password authentication failed for user “Postgres”
I am getting a 502 Bad Gateway on my application and I looked at the EB Logs and I believe this is the problem:
/var/log/containers/server-8b2907355681-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ error: password authentication failed for user "Postgres"
at Connection.parseE (/app/node_modules/pg/lib/connection.js:553:11)
at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:378:19)
at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:119:22)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 104,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '328',
routine: 'auth_failed' }
However, I have corrected the password inside of EB Configuration to match exactly the one docker-compose.yml file:
api:
build:
dockerfile: Dockerfile.dev
context: ./server
volumes:
- /app/node_modules
- ./server:/app
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- PGUSER=postgres
- PGHOST=postgres
- PGDATABASE=postgres
- PGPASSWORD=password_protected
- PGPORT=5432

I have tried changing Postgres to postgres inside the Elasticbeanstalk environment variables but that has not resolved the issue. I am still getting error: password authentication failed for user "Postgres"
I then deleted RDS instance and provisioned a new with the same exact username and password, case sensitive and all. I added that RDS to the Security Group, I am still getting a 502 Bad Gateway with the same error of:
/var/log/containers/server-8b2907355681-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ error: password authentication failed for user "Postgres"
at Connection.parseE (/app/node_modules/pg/lib/connection.js:553:11)
at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:378:19)
at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:119:22)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 104,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '328',
routine: 'auth_failed' }
I provisioned a new PostgreSQL RDS for the third time, ensured that all username and passwords were the same including case sensitive and eliminated any special characters and this time not only did I still get the same error, I also got this one:
-------------------------------------
/var/log/containers/server-09be251b359b-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ Error: connect ETIMEDOUT 172.31.82.39:5432
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '172.31.82.39',
port: 5432 }
I don't have much else to go on, if there is anyone else with more experience, would appreciate your help.
postgresql amazon-rds
add a comment |
I am getting a 502 Bad Gateway on my application and I looked at the EB Logs and I believe this is the problem:
/var/log/containers/server-8b2907355681-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ error: password authentication failed for user "Postgres"
at Connection.parseE (/app/node_modules/pg/lib/connection.js:553:11)
at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:378:19)
at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:119:22)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 104,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '328',
routine: 'auth_failed' }
However, I have corrected the password inside of EB Configuration to match exactly the one docker-compose.yml file:
api:
build:
dockerfile: Dockerfile.dev
context: ./server
volumes:
- /app/node_modules
- ./server:/app
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- PGUSER=postgres
- PGHOST=postgres
- PGDATABASE=postgres
- PGPASSWORD=password_protected
- PGPORT=5432

I have tried changing Postgres to postgres inside the Elasticbeanstalk environment variables but that has not resolved the issue. I am still getting error: password authentication failed for user "Postgres"
I then deleted RDS instance and provisioned a new with the same exact username and password, case sensitive and all. I added that RDS to the Security Group, I am still getting a 502 Bad Gateway with the same error of:
/var/log/containers/server-8b2907355681-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ error: password authentication failed for user "Postgres"
at Connection.parseE (/app/node_modules/pg/lib/connection.js:553:11)
at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:378:19)
at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:119:22)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 104,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '328',
routine: 'auth_failed' }
I provisioned a new PostgreSQL RDS for the third time, ensured that all username and passwords were the same including case sensitive and eliminated any special characters and this time not only did I still get the same error, I also got this one:
-------------------------------------
/var/log/containers/server-09be251b359b-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ Error: connect ETIMEDOUT 172.31.82.39:5432
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '172.31.82.39',
port: 5432 }
I don't have much else to go on, if there is anyone else with more experience, would appreciate your help.
postgresql amazon-rds
add a comment |
I am getting a 502 Bad Gateway on my application and I looked at the EB Logs and I believe this is the problem:
/var/log/containers/server-8b2907355681-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ error: password authentication failed for user "Postgres"
at Connection.parseE (/app/node_modules/pg/lib/connection.js:553:11)
at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:378:19)
at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:119:22)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 104,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '328',
routine: 'auth_failed' }
However, I have corrected the password inside of EB Configuration to match exactly the one docker-compose.yml file:
api:
build:
dockerfile: Dockerfile.dev
context: ./server
volumes:
- /app/node_modules
- ./server:/app
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- PGUSER=postgres
- PGHOST=postgres
- PGDATABASE=postgres
- PGPASSWORD=password_protected
- PGPORT=5432

I have tried changing Postgres to postgres inside the Elasticbeanstalk environment variables but that has not resolved the issue. I am still getting error: password authentication failed for user "Postgres"
I then deleted RDS instance and provisioned a new with the same exact username and password, case sensitive and all. I added that RDS to the Security Group, I am still getting a 502 Bad Gateway with the same error of:
/var/log/containers/server-8b2907355681-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ error: password authentication failed for user "Postgres"
at Connection.parseE (/app/node_modules/pg/lib/connection.js:553:11)
at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:378:19)
at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:119:22)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 104,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '328',
routine: 'auth_failed' }
I provisioned a new PostgreSQL RDS for the third time, ensured that all username and passwords were the same including case sensitive and eliminated any special characters and this time not only did I still get the same error, I also got this one:
-------------------------------------
/var/log/containers/server-09be251b359b-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ Error: connect ETIMEDOUT 172.31.82.39:5432
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '172.31.82.39',
port: 5432 }
I don't have much else to go on, if there is anyone else with more experience, would appreciate your help.
postgresql amazon-rds
I am getting a 502 Bad Gateway on my application and I looked at the EB Logs and I believe this is the problem:
/var/log/containers/server-8b2907355681-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ error: password authentication failed for user "Postgres"
at Connection.parseE (/app/node_modules/pg/lib/connection.js:553:11)
at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:378:19)
at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:119:22)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 104,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '328',
routine: 'auth_failed' }
However, I have corrected the password inside of EB Configuration to match exactly the one docker-compose.yml file:
api:
build:
dockerfile: Dockerfile.dev
context: ./server
volumes:
- /app/node_modules
- ./server:/app
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- PGUSER=postgres
- PGHOST=postgres
- PGDATABASE=postgres
- PGPASSWORD=password_protected
- PGPORT=5432

I have tried changing Postgres to postgres inside the Elasticbeanstalk environment variables but that has not resolved the issue. I am still getting error: password authentication failed for user "Postgres"
I then deleted RDS instance and provisioned a new with the same exact username and password, case sensitive and all. I added that RDS to the Security Group, I am still getting a 502 Bad Gateway with the same error of:
/var/log/containers/server-8b2907355681-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ error: password authentication failed for user "Postgres"
at Connection.parseE (/app/node_modules/pg/lib/connection.js:553:11)
at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:378:19)
at Socket.<anonymous> (/app/node_modules/pg/lib/connection.js:119:22)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'error',
length: 104,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '328',
routine: 'auth_failed' }
I provisioned a new PostgreSQL RDS for the third time, ensured that all username and passwords were the same including case sensitive and eliminated any special characters and this time not only did I still get the same error, I also got this one:
-------------------------------------
/var/log/containers/server-09be251b359b-stdouterr.log
-------------------------------------
> @ start /app
> node index.js
Listening
{ Error: connect ETIMEDOUT 172.31.82.39:5432
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '172.31.82.39',
port: 5432 }
I don't have much else to go on, if there is anyone else with more experience, would appreciate your help.
postgresql amazon-rds
postgresql amazon-rds
asked 7 mins ago
DanielDaniel
172119
172119
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f232677%2ferror-password-authentication-failed-for-user-postgres%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f232677%2ferror-password-authentication-failed-for-user-postgres%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown