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#
| Message | Cause | Fix |
|---|---|---|
raftdb-server: unexpected argument X | An argument that is not --name | Settings 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 value | A setting without a value (only udp, open, allow-remote-servers and control may stand alone) | Give the value. |
line N: expected key = value | A 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 network | addr is not loopback under the default profile | Use --profile primary, or addr = 127.0.0.1:PORT. Read Network exposure first. |
the replica profile needs replica-of | profile = replica without replica-of | Add 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 setting | An old configuration | Follow Running a cluster. |
control cannot be combined with replica-of | Both set | Remove 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 64 | groups set without control, or out of range | Fix. |
engine must be memory or lsm, got 'x' | Bad engine | Use memory or lsm. |
the lsm level-0 settings must satisfy lsm-l0-trigger <= lsm-l0-slowdown <= lsm-l0-stop | Inconsistent compaction settings | Fix 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 value | Fix the value. |
cannot create DIR: ... / cannot write DIR/admin.password: ... | The user cannot write the data directory | Create 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 written | Read the reason after the colon; see below. |
raftdb-server: FILE exists; not overwriting it | init refuses to overwrite | Use --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#
| Message | Cause | Fix |
|---|---|---|
raftdb-mysql: unexpected argument 'x' / --x needs a value | Arguments are --key value | Fix. |
raftdb-mysql: unknown setting 'x' (with FILE:LINE: for a file) | Misspelt key | Fix; see raftdb-mysql settings. |
no MySQL user: add 'user = NAME:PASSWORD' | No user line | Add one. |
raftdb_user is not set: the connector needs a Raft DB account | No raftdb_user | Add it with its password. |
user must be NAME:PASSWORD / user needs a name | Bad user | Fix. |
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 64 | Bad value | Fix. |
embed PATH: ... | The raftdb.conf named by embed cannot be read or parsed, or the embedded server cannot start | Fix that file; start the same file with raftdb-server --check-config. |
Address already in use when binding listen | The port is taken | Change listen. |
this process already answers as another dialect (one process, one dialect) | Two dialects in one process | Run one process per dialect. |
A command-line dialect, max_connections or embed seems ignored | With --config, only some keys are applied over the file | Put them in the file (raftdb-mysql settings). |
| A password is cut off | A # in a value starts a comment | Avoid #. |
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#
- Connection problems
- Reporting bugs (and the fatal-error report in
<dir>/reports/)