Running udd
Create a disposable directory and run udd against it to explore the console
and JSON API. Creating a domain is a separate operation from starting the
server, so a missing domain does not silently become an empty replacement.
Before you start #
Prepare the following:
- Build or install the
udddevelopment binary. - Choose a new data directory that contains no files you need.
- Keep the console listener on a trusted local interface.
The examples assume udd is on your command search path. Repository build
instructions are in docs/building.md; udd(8) documents the full command
interface.
Create and run a domain #
-
Create the domain with an explicit local machine address:
-
Start the existing domain:
-
Open
http://127.0.0.1:5389in your browser. The console displays the directory root, configuration, schema, and local machine object.
Stop the server with Ctrl-C before restarting it against the same data
directory. The daemon holds an exclusive lock on the directory for its
lifetime. A second startup or creation attempt fails immediately with
data directory is already in use; it does not wait or change the database.
The operating system releases the lock when the process exits, including an
abnormal exit. There is no lock file to remove.
The startup report identifies its recovered generation and replayed frames.
Keep the whole data directory together, including its private machine-key
file. Command-line arguments must be valid UTF-8; invalid bytes produce a
usage error with exit status 2.
Run without persistent files #
For a session whose state disappears at exit, run:
This mode uses the same persistence interfaces with an in-memory filesystem. It creates a fresh domain at startup and chooses a free loopback GIP port.
Understand startup failures #
A missing domain requires an explicit creation step. A damaged generation, unsupported format, or invalid machine key causes startup to fail. Preserve the original directory for diagnosis and restore from a known complete backup; do not delete individual generations to make recovery proceed.
A reported truncated tail is different: recovery identified incomplete, unacknowledged bytes at the end of the active log. A warning about the local machine object's key means the stored directory record does not match the private identity used by this process.
A node with no root object can exist after interrupted creation. It reports
no-root rather than serving a replacement domain. This is distinct from
successful recovery of a populated directory.
Explore two machines #
The repository's dev/two-dc.sh builds a disposable pair of machines and runs
both consoles on loopback. It prepares their shared directory state out of
band. The fabric and message tabs exercise real connections and message
outcomes, but do not demonstrate network directory replication.