ALLTERCO / fleet-management

Shelly outbound websocket server
29 stars 9 forks source link

Can't install fleet manager after update #10

Closed RuslanShmateyev closed 1 month ago

RuslanShmateyev commented 3 months ago

After release 0.2-alpha it is not possible to install fleet manager on node (22.5.1) and npm (10.8.2) versions. Postgres is installed and working correctly. After running the commands: cd ./frontend npm run install npm run build cd ../backend npm install npm run build npm start

On the command in the backend: npm start

An error: [2024-08-03T14:21:08.698] [ERROR] postgres - Migration failed Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string at Object.continueSession (/home/fleet-management-main/backend/node_modules/pg/lib/crypto/sasl.js:24:11) at Client._handleAuthSASLContinue (/home/fleet-management-main/backend/node_modules/pg/lib/client.js:272:18) at Connection.emit (node:events:520:28) at /home/fleet-management-main/backend/node_modules/pg/lib/connection.js:117:12 at Parser.parse (/home/fleet-management-main/backend/node_modules/pg-protocol/dist/parser.js:36:17) at Socket. (/home/fleet-management-main/backend/node_modules/pg-protocol/dist/index.js:11:42) at Socket.emit (node:events:520:28) at addChunk (node:internal/streams/readable:559:12) at readableAddChunkPushByteMode (node:internal/streams/readable:510:3) at Readable.push (node:internal/streams/readable:390:5) [2024-08-03T14:21:10.178] [FATAL] postgres - 😱 Connection to DB timed out! TIMEOUT

The password in postgres is set.

It may be necessary to configure the database connection settings in the configuration, but the documentation does not describe where to create the json file:

migration-collection - makes migration, accepts db config and path where migration files are located

example config

    {
        "connection": { // db connection config
            "host": "localhost",
            "user": "postgres",
            "max": 40,
            "password": "**********",
            "database": "em"
        },
        "schema": "migration", // namespace name, where migration tables will be created
        "cwd": [ // migration files paths
            "./db/migration/postgresql"
        ]
    }
zetxx commented 2 months ago

Hi there, you have some miss understanding in docker network itself: take a look at your last line of your log file: postgres - 😱 Connection to DB timed out! TIMEOUT this means that you don't have wire to postgre

zetxx commented 1 month ago

I will close this issue since no response received in the past 2 weeks. please comment to reopen