I am getting master database connection error while running the cmd command “satellite run auditor” in windows. Below is the complete error log. What is missing in the command / configuration?
{"error": "Error starting master database: satellitedb: failed opening database via DBX at \"postgres://?application_name=satellite-auditor\": satellitedb: failed to connect to `host=localhost user=Malay101 database=`: failed SASL auth (FATAL: password authentication failed for user \"Malay101\" (SQLSTATE 28P01))\n\tstorj.io/storj/satellite/satellitedb.open:132\n\tstorj.io/storj/satellite/satellitedb.Open:106\n\tmain.cmdAuditorRun:32\n\tstorj.io/private/process.cleanup.func1.4:399\n\tstorj.io/private/process.cleanup.func1:417\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomOptions:113\n\tstorj.io/private/process.ExecWithCustomConfigAndLogger:79\n\tstorj.io/private/process.ExecWithCustomConfig:74\n\tstorj.io/private/process.ExecCustomDebug:69\n\tmain.main:1088\n\truntime.main:267", "errorVerbose": "Error starting master database: satellitedb: failed opening database via DBX at \"postgres://?application_name=satellite-auditor\": satellitedb: failed to connect to `host=localhost user=Malay101 database=`: failed SASL auth (FATAL: password authentication failed for user \"Malay101\" (SQLSTATE 28P01))\n\tstorj.io/storj/satellite/satellitedb.open:132\n\tstorj.io/storj/satellite/satellitedb.Open:106\n\tmain.cmdAuditorRun:32\n\tstorj.io/private/process.cleanup.func1.4:399\n\tstorj.io/private/process.cleanup.func1:417\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomOptions:113\n\tstorj.io/private/process.ExecWithCustomConfigAndLogger:79\n\tstorj.io/private/process.ExecWithCustomConfig:74\n\tstorj.io/private/process.ExecCustomDebug:69\n\tmain.main:1088\n\truntime.main:267\n\tmain.cmdAuditorRun:34\n\tstorj.io/private/process.cleanup.func1.4:399\n\tstorj.io/private/process.cleanup.func1:417\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomOptions:113\n\tstorj.io/private/process.ExecWithCustomConfigAndLogger:79\n\tstorj.io/private/process.ExecWithCustomConfig:74\n\tstorj.io/private/process.ExecCustomDebug:69\n\tmain.main:1088\n\truntime.main:267"}
satellite run auditor is only expected to be run by the satellite.
The error message says that it’s unable to connect to the database, which indicates that either the database configuration is incorrect or it’s missing altogether.
It’s not quite clear what you are trying to achieve. But, if you are trying to setup a local Storj network for testing, then I would recommend trying GitHub - storj/up: Docker-compose files for running full Storj network locally, which automates most of the configuration and setup for you. It also has different commands to replace any part of the system with locally built binaries.
Actually I was trying to achieve the updating of audit score and compensation of the nodes i.e. reputation. I am not able to locate the exact parameter in the satellite config file which needs to be enabled for enabling the updation of audit score and compensation. Is it repairer.reputation-update-enabled?
The command is correct, however you need to provide the same configuration to it as the satellite api or core. I.e. you need to provide the database, metainfo url, order encryiption keys and identity location.
As I stated, the configuration files contain all the arguments that you need. You can copy these from the configuration files and use them on command-line as usual.
The Database error is not coming now after passing of the postgres connection string in parameter metainfo.database-url and also passing the value of --orders.encryption-keys. But now I am getting below error
Failed metabase database version check. {"error": "validate db version mismatch: expected 17 != -1", "errorVerbose": "validate db version mismatch: expected 17 != -1\n\tstorj.io/storj/private/migrate.(*Migration).ValidateVersions:138\n\tstorj.io/storj/satellite/metabase.(*DB).CheckVersion:388\n\tmain.cmdAuditorRun:90\n\tstorj.io/private/process.cleanup.func1.4:399\n\tstorj.io/private/process.cleanup.func1:417\n\tgithub.com/spf13/cobra.(*Command).execute:852\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:960\n\tgithub.com/spf13/cobra.(*Command).Execute:897\n\tstorj.io/private/process.ExecWithCustomOptions:113\n\tstorj.io/private/process.ExecWithCustomConfigAndLogger:79\n\tstorj.io/private/process.ExecWithCustomConfig:74\n\tstorj.io/private/process.ExecCustomDebug:69\n\tmain.main:1088\n\truntime.main:267"}
Can anyone tell the exact reason for this error? What change is to be done in CLI? My current CLI looks like below.
I suppose that you didn’t migrate your satellite DB from the version when it was created to the current one using all previous versions.
In this case the simplest thing either do upgrades one by one or drop this database and create a new one, if it’s a test data anyway.
Also make sure that this short hostname
is actually available for your binary. For me it looks like a docker container. And there are several ways how to solve this, from running your satellite in the container too (using THE SAME network as a Postgres), or expose it to the host (allowing in the firewall and so on). But right now this hostname look like not reachable.
I also would recommend to use a Cockroach DB instead of PostgreSQL (like our prod).
Latest version in my database is 17, but using my command, the version being compared is -1 to 17 as per the error. Don’t know why this error is coming.
I was able to start the auditor using below command
satellite run --database postgres://postgres:malay@101@localhost:5432/storj01092023?sslmode=disable --metainfo.database-url postgres://postgres:malay@101@localhost:5432/storj01092023?sslmode=disable --orders.encryption-keys 0100000000000000=0100000000000000000000000000000000000000000000000000000000000000 auditor
But, the values in reputations table viz. ‘total_audit_count’, ‘audit_success_count’ is not getting updated. Can anyone throw some light on how the reputation values will be updated?
Usually the best place to start from is design docs and trying to find any doc that mentions those systems – GitHub - storj/design-docs: Workspace for all Storj design documents, in this case it’s audit and reputation systems. Although, they may not precisely describe the current system they usually indicate larger changes to them.
I have a scenario now. My 10 nodes of the test network are running. I have added a new 11th node and all the file upload thing works for 11th node also. Now, to test the auditor and reputation I have stopped the new 11th node so that it’s score reduces.
Somehow, there is no updation done in the reputations table at all. Expected output should be that for the 11th node the audit score should change.
I don’t know what is missing here. My auditor service runs on below CLI command in Windows.
satellite run --database postgres://postgres:malay@101@localhost:5432/storj01092023?sslmode=disable --metainfo.database-url postgres://postgres:malay@101@localhost:5432/storj01092023?sslmode=disable --orders.encryption-keys 0100000000000000=0100000000000000000000000000000000000000000000000000000000000000 auditor
Do I require any additional arguments in the above command?