Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: error: password authentication failed for user "electron_release_server_user"

I was messing around with this amazing Sails project here.

I managed to get it 100% functional on my Macbook Pro with little to no difficulty.

Here's my fork.

Now I'm trying to get it working on an Azure Ubuntu 14.04 box and after running it with npm start which just calls node app.js I get this error:

Error creating a connection to Postgresql using the following settings:
{ host: 'localhost',
 port: 5432,
 schema: true,
 ssl: false,
 adapter: 'sails-postgresql',
 user: 'electron_release_server_user',
 password: '[redacted]',
 database: 'electron_release_server',
 identity: 'postgresql' }

* * *
Complete error details:
 { error: password authentication failed for user "electron_release_server_user"
    at Connection.parseE (/home/azureuser/electron-release-server/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
at Connection.parseMessage (/home/azureuser/electron-release-server/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:366:17)
at Socket.<anonymous> (/home/azureuser/electron-release-server/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:172:18)
at Socket.Readable.push (_stream_readable.js:130:10)
at TCP.onread (net.js:535:20)
 name: 'error',
 length: 117,
 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: '285',
 routine: 'auth_failed' }

In my local.js I have:

connections: {
    postgresql: {
      adapter: 'sails-postgresql',
      host: 'localhost',
      user: 'electron_release_server_user',
      password: '<SECRET>',
      database: 'electron_release_server'
    }
  },

This exact configuration worked on my local machine but now that it's on this Ubuntu VM... no luck.

Anyone? I need this in order to release a product!

like image 821
Tyler James Leonhardt Avatar asked Dec 07 '22 22:12

Tyler James Leonhardt


1 Answers

So it turned out to be my version of Node.

Node.js 6.0 just didn't seem to work. Once I downgraded to LTS, poof, everything worked as expected.

like image 162
Tyler James Leonhardt Avatar answered Apr 27 '23 18:04

Tyler James Leonhardt