Troubleshooting

Installation and start-up problems

Problems starting Raft DB's programs, with the messages the code prints and what to do about each.

Messages in the first column are printed by the programs; the second column is the cause and the third the fix.

raftdb-server will not start#

MessageCauseFix
raftdb-server: unexpected argument XAn argument that is not --nameSettings are --name VALUE; see settings.
raftdb-server: argument N: unknown setting 'x' or raftdb.conf: line N: unknown setting 'x'A misspelt or removed setting (also cluster-id and its siblings, removed in D51)Fix the name; raftdb-server --print-config shows the valid ones in effect.
raftdb-server: --x needs a valueA setting without a value (only udp, open, allow-remote-servers and control may stand alone)Give the value.
line N: expected key = valueA line of the file without =Fix it; # starts a comment line.
the single profile listens on loopback only, not on 'ADDR'; use profile primary to serve the networkaddr is not loopback under the default profileUse --profile primary, or addr = 127.0.0.1:PORT. Read Network exposure first.
the replica profile needs replica-ofprofile = replica without replica-ofAdd replica-of = HOST:PORT.
the cluster profile was removed (D51): ... start every node with control and give each node's raftdb-watch the cluster_peers settingAn old configurationFollow Running a cluster.
control cannot be combined with replica-ofBoth setRemove one. A managed node takes its role from the watcher.
groups above 1 need control (a node managed by a watcher) / groups must be between 1 and 64groups set without control, or out of rangeFix.
engine must be memory or lsm, got 'x'Bad engineUse memory or lsm.
the lsm level-0 settings must satisfy lsm-l0-trigger <= lsm-l0-slowdown <= lsm-l0-stopInconsistent compaction settingsFix the three numbers.
spin-us must be from 0 to 1000; X needs a number, got 'y'; X needs true or false, got 'y'Bad valueFix the value.
cannot create DIR: ... / cannot write DIR/admin.password: ...The user cannot write the data directoryCreate it, give the service user write access, or set dir.
raftdb-server: cannot start: ...The server could not start (port in use, a log it cannot open, a damaged log) and a fatal-error report was writtenRead the reason after the colon; see below.
raftdb-server: FILE exists; not overwriting itinit refuses to overwriteUse --out OTHERFILE or remove the file.

cannot start: Address already in use (or the operating system's wording)#

Another process (maybe an old raftdb-server) holds the port. Find it (ss -ltnp, netstat -ano | findstr :7480) and stop it, or change addr. Never start a second server on the same data directory: there is no lock file and two processes would corrupt the logs. Check for a running process before you start.

The server starts, but the admin password is unknown#

It is in <dir>/admin.password. If dir was not given, the server used the standard folder if it exists, else ./raftdb-data of the working directory it was started from: starting it from another folder creates a new, empty data directory with a new password. Print the settings: raftdb-server --print-config shows dir.

A start takes a long time#

The memory engine replays every shard log; replay runs at about 3.2 million records a second, so a big history takes time. A log that is large and mostly dead is rewritten at start (checkpoint-min-mb). Use the lsm engine for data larger than memory.

GET /v1/server answers but writes fail#

A replica, or a managed node that is not the primary, refuses writes (403 read_only_replica, binary error 12). A full disk or a failed flush makes every later write fail until the process restarts: check the disk, free space, restart.

raftdb-mysql will not start#

MessageCauseFix
raftdb-mysql: unexpected argument 'x' / --x needs a valueArguments are --key valueFix.
raftdb-mysql: unknown setting 'x' (with FILE:LINE: for a file)Misspelt keyFix; see raftdb-mysql settings.
no MySQL user: add 'user = NAME:PASSWORD'No user lineAdd one.
raftdb_user is not set: the connector needs a Raft DB accountNo raftdb_userAdd it with its password.
user must be NAME:PASSWORD / user needs a nameBad userFix.
raftdb_password_file X: ...The file cannot be read (it is read when the settings are read, so a file the embedded server creates later does not exist yet)Give an explicit account in raftdb.conf and raftdb_password.
spin_us must be a number from 0 to 1000; alloc_cache must be on or off; raftdb_share must be reads or all; dialect must be mysql or mariadb; raftdb_connections must be a number from 0 to 64Bad valueFix.
embed PATH: ...The raftdb.conf named by embed cannot be read or parsed, or the embedded server cannot startFix that file; start the same file with raftdb-server --check-config.
Address already in use when binding listenThe port is takenChange listen.
this process already answers as another dialect (one process, one dialect)Two dialects in one processRun one process per dialect.
A command-line dialect, max_connections or embed seems ignoredWith --config, only some keys are applied over the filePut them in the file (raftdb-mysql settings).
A password is cut offA # in a value starts a commentAvoid #.

raftdb-watch will not start#

raftdb-watch: unknown setting 'x', unknown argument 'x' (try --help), --config needs a file name, FILE: ... for a file that cannot be read. raftdb-watch --config watch.conf --check-config prints what it understood (including passwords: do not paste it anywhere).

The Studio does not appear#

The server serves the Studio only with --studio FOLDER (the Studio's folder). Without it / is not the Studio.

Where to look next#