* started todo list for rework * startd long todo list * startd long todo list * remove ts docs from ts sdk dir * started new docs draft * rearranged code example dir structure * modified code component filepaths * first pass rust sdk * small shift typescript org * updated todo list * consolidating images folders in one place * first pass @ operator docs * gen updates * sdk in its own dir * first pass developers structure * first pass network structure * structure * add licensing * moved old docs -> old_docs dir for clarity when devving * moving around new docs - think this is the final dir structure * updated todo list * new autodoc version (#4781) * Update rework_todo.md * quick first sketch of landing page * rework of structure of developers * added arch and concepts stubs * add new bits to todo list * new list * tweak to overview * mixnet node overview * tweak overview * first pass new arch * first pass concepts * first pass traffic * more network docs * moved some chain files to the dev portal stubs * removed old reference to archive * note to client * concepts 2nd pass * crypto first proper pass, sphinx * stub for not p2p * structure change * traffic 2nd pass * misc * hid root index * overhaul arch * overhaul arch * add links + tweaks * update todo list * updating nyx section * added zknym docs * added zknym docs * note on where to find deployed info * smart contracts done * started moving integrations docs over from ts sdk * pass @ integration page * todo for the tldr overview * added ffi stub files * updated todo list * move sdks to developers * initial pass at new clients overview for developers * rework intro * add echo serv to tools * sidebar autocollapse * integration overview work + tools * concepts overview for devporta * stub * more for networking pages * added to concepts in dev portal * updated arch * crypto overview page * typo fix * add credential stub * first pass concepts done * start reorg of rust sdk docs * reorg + added FFI table * added no scroll to inline code * finished ffi overview page * first pass @ rest of rust sdk doc * first pass ffi * tweaks * added testnet example + note to custom topology example overview * stripped unnecessary stuff from TS * tweaks to ffi * updated faq * first pass tcpproxy * commit before moving image dir * moved images/ to correct place * started on client redo * chain first pass * moved cli wallet out of tools * first pass new ws client * new chain info, left todo links in * links * more links * chain registry * added echo server to tools * rust sdk links * ts sdk links * final linkchecks * redo acks diagram as mermaid * add mermaid flow diagram * added links for codecs + full flow diagram * removed todo * remove forced dark mode * diagram + concepts overview * small correction re tcpproxy ffi * remove diagram title * new sock5 diagram, minor client docs tweaks * diagrams * change order in list * added note for standalone: can be accessed via sdk * tweaks * replaced old diagram with mermaid * fixed link * hardcoded import version for the moment * update deps * remove test component * recreated tools dir * remove tools dir moved to wrong palce * prebuild and predev script for autodoc commands * make script own command instead of prebuild * made code blocks sh * updated autogenerated docs * temp * auto commit generated command files * add link to autodoc generated files * updated autodoc for committing changing else exit * auto commit generated command files * updated readme * make subcommand headers smaller * removed mdbook related scripts * update readme * update readme * removed backups of root meta.json * cherry pick yana commits + some extra config in theme * update readme * update theme: width of page and padding * some more themeing * changed erroneous note * docs redirects first pass * tweaking * new pages + rest of redirects for old docs/ * brought in archive + done rewrites for devportal * cherry pick yana landingpage * tweaked landing page component * changed theme of mermaid diagram to match everything else * updated todo list * [DOCs]: Operators rework to next.js (#4930) * initialise operators guides v2 * new introduction page * add variables csv and page * add baseurl to allow short path * add sandbox page * added building from source page * add binary pages * add preliminary steps * clean preliminary steps dir * syntax edit * syntax edit * add configuration page * create new proxy configuration page * create new proxy configuration page * create bonding.mdx page * correct images path * syntax edit * add new validator setup page * add api setup page * add nyx configuration page * add nym node and maintenance pages * finish maintenance and add nymvisor conf page * add manual upgrade page * add nymvisor upgrade page * add performance testing page and dir * add node api check page * add explore nym scripts page * add testing pages * fix menu issue by moving snippets to coomponents * add all troubleshooting pages * add general faq page * add nym node faq page * add nyx faq page * revamp legal forum to community counsel and add all pages * rewire relative paths to new structure * simplify setup and remove lock file * syntax fix * rm package.json * re add package.json, rm package-lock.json * removed old books from commit * address review comments --------- Co-authored-by: mfahampshire <maxhampshire@pm.me> Co-authored-by: mx <33262279+mfahampshire@users.noreply.github.com> * tweak client links * also moved matrix images to correct place * Max/fix links new docs framework (#4989) * tweak client links * standardise images in public/ * old images move to public/archive * rename overview to more descriptive * links (#4990) * links * removed todos * updated todo list * minor themeing * operator redirects * pick yana's edits: remove specified callout theming * added todo comments for old ts sdk redirects * [new/docs/operators]: Create archive section - PR ready to merge (#5004) * [new-docs/operators] : Fix callout syntax (#5006) * fix callout syntax from color to type * correct callout from danger to warning * update footer * updated footer * finalised rewrites * tweaks to clients and reintroduced old examples page * update todo * Max/individual command autodocs (#5015) * auto commit generated command files * added to autodoc.sh: build all binaries before running * autodoc move individual command outputs to components * Max/individual command autodocs (#5018) * updated autodoc script * updated autodoc script for fix + reintroduced gitignore file for generated markdown * auto commit generated command files * auto commit generated command files * added command-outputs to autodoc script * fix merge conflicts * repush components * remove old docs dirs * auto commit generated command files * auto commit generated command files * updated messages paradigm with the standalone proxies * [NEW-DOCs/operators]: Command output, accordion, api scraping & all final tasks (#5026) * add custom scripts, create prebuild to import data to pages * update after latest prebuild * auto commit generated command files * add accordion component * add changbelog page * add node_api_check outputs * finish all command outputs * more accordions beautifications * finish accordion * PR ready to go * address review comments --------- Co-authored-by: mfahampshire <maxhampshire@pm.me> * Adjust padding * Fix responsive design * cherry pick yana landingpage flex update * reremove old docs * added dependencies to readme * pushing build attempt changes * fix merge errors, path errors, dump uselss dinosaurs - BUILT THE F*N DOCS w success * moved prebuild to its own script * generate timenow * auto commit generated command files * remove comment * auto commit generated command files * auto commit generated command files * auto commit generated command files * build from new configs * add mdx type as explicit dep * remove rc from version in package * change predev script * update readme with scripts * update general info * add license * auto commit generated command files * add updated components * removed old examples page for the moment * remove old list will reintroduce hidden behind gitignore for future * reintroduce todo list behind gitignore * added standalone tcpproxy binary info * nothing change for redeploy test * make build standalone * updated readme * working on new cd * remove export * updated ci/cd for docs * added ci script for dist * hide text on laptop wide screen * add pnpm to ci/cd * add pnpm version to ci/cd * add default dir to ci/cd * change path to script * update projct name ci * lint ci branch ignore * add basePath to next.config.js * update doc rewrites * revert basePath addition * update basePath * add mobile styles * fix responsive style * remove old ts sdk docs workflow * temp remove autodoc from workspace * update sidebar for clarity: crypto = cryptography * ignore documentation in pr-validation workflow --------- Co-authored-by: Yana <yanok87@users.noreply.github.com> Co-authored-by: import this <97586125+serinko@users.noreply.github.com> Co-authored-by: fmtabbara <fmtabbara@hotmail.co.uk>
7.7 KiB
Troubleshooting
Below are several common issues or questions you may have.
If you come across something that isn't explained here, PRs are welcome.
Verbose task client is being dropped logging
On client shutdown (expected)
If this is happening at the end of your code when disconnecting your client, this is fine; we just have a verbose client! When calling client.disconnect().await this is simply informing you that the client is shutting down.
On client shutdown / disconnect this is to be expected - this can be seen in many of the code examples as well. We use the nym_bin_common::logging import to set logging in our example code. This defaults to INFO level.
If you wish to quickly lower the verbosity of your client process logs when developing you can prepend your command with RUST_LOG=<LOGGING_LEVEL>.
If you want to run the builder.rs example with only WARN level logging and below:
cargo run --example builder
Becomes:
RUST_LOG=warn cargo run --example builder
You can also make the logging more verbose with:
RUST_LOG=debug cargo run --example builder
Not on client shutdown (unexpected)
If this is happening unexpectedly then you might be shutting your client process down too early. See the accidentally killing your client process below for possible explanations and how to fix this issue.
Accidentally killing your client process too early
If you are seeing either of the following errors when trying to run a client, specifically sending a message, then you may be accidentally killing your client process.
2023-11-02T10:31:03.930Z INFO TaskClient-BaseNymClient-real_traffic_controller-ack_control-action_controller > the task client is getting dropped
2023-11-02T10:31:04.625Z INFO TaskClient-BaseNymClient-received_messages_buffer-request_receiver > the task client is getting dropped
2023-11-02T10:31:04.626Z DEBUG nym_client_core::client::real_messages_control::acknowledgement_control::input_message_listener > InputMessageListener: Exiting
2023-11-02T10:31:04.626Z INFO TaskClient-BaseNymClient-real_traffic_controller-ack_control-input_message_listener > the task client is getting dropped
2023-11-02T10:31:04.626Z INFO TaskClient-BaseNymClient-real_traffic_controller-reply_control > the task client is getting dropped
2023-11-02T10:31:04.626Z DEBUG nym_client_core::client::real_messages_control > The reply controller has finished execution!
2023-11-02T10:31:04.626Z DEBUG nym_client_core::client::real_messages_control::acknowledgement_control > The input listener has finished execution!
2023-11-02T10:31:04.626Z INFO nym_task::manager > All registered tasks succesfully shutdown
2023-11-02T11:22:08.408Z ERROR TaskClient-BaseNymClient-topology_refresher > Assuming this means we should shutdown...
2023-11-02T11:22:08.408Z ERROR TaskClient-BaseNymClient-mix_traffic_controller > Polling shutdown failed: channel closed
2023-11-02T11:22:08.408Z INFO TaskClient-BaseNymClient-gateway_transceiver-child > the task client is getting dropped
2023-11-02T11:22:08.408Z ERROR TaskClient-BaseNymClient-mix_traffic_controller > Assuming this means we should shutdown...
thread 'tokio-runtime-worker' panicked at 'action control task has died: TrySendError { kind: Disconnected }', /home/.local/share/cargo/git/checkouts/nym-fbd2f6ea2e760da9/a800cba/common/client-core/src/client/real_messages_control/message_handler.rs:634:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2023-11-02T11:22:08.477Z INFO TaskClient-BaseNymClient-real_traffic_controller-ack_control-input_message_listener > the task client is getting dropped
2023-11-02T11:22:08.477Z ERROR TaskClient-BaseNymClient-real_traffic_controller-ack_control-input_message_listener > Polling shutdown failed: channel closed
2023-11-02T11:22:08.477Z ERROR TaskClient-BaseNymClient-real_traffic_controller-ack_control-input_message_listener > Assuming this means we should shutdown...
Using the following piece of code as an example:
use nym_sdk::mixnet::{MixnetClient, MixnetMessageSender, Recipient};
use clap::Parser;
#[derive(Debug, Clone, Parser)]
enum Opts {
Client {
recipient: Recipient
}
}
#[tokio::main]
async fn main() {
let opts: Opts = Parser::parse();
nym_bin_common::logging::setup_logging();
let mut nym_client = MixnetClient::connect_new().await.expect("Could not build Nym client");
match opts {
Opts::Client { recipient } => {
nym_client.send_plain_message(recipient, "some message string").await.expect("send failed");
}
}
}
This is a simplified snippet of code for sending a simple hardcoded message with the following command:
cargo run client <RECIPIENT_NYM_ADDRESS>
You might assume that send-ing your message would just work as nym_client.send_plain_message() is an async function; you might expect that the client will block until the message is actually sent into the mixnet, then shutdown.
However, this is not true.
This will only block until the message is put into client's internal queue. Therefore in the above example, the client is being shut down before the message is actually sent to the mixnet; after being placed in the client's internal queue, there is still work to be done under the hood, such as route encrypting the message and placing it amongst the stream of cover traffic.
The simple solution? Make sure the program/client stays active, either by calling sleep, or listening out for new messages. As sending a one-shot message without listening out for a response is likely not what you'll be doing, then you will be then awaiting a response (see the message helpers page for an example of this).
Furthermore, you should always manually disconnect your client with client.disconnect().await as seen in the code examples. This is important as your client is writing to a local DB and dealing with SURB storage.
Client receives empty messages when listening for response
If you are sending out a message, it makes sense for your client to then listen out for incoming messages; this would probably be the reply you get from the service you've sent a message to.
You might however be receiving messages without data attached to them / empty payloads. This is most likely because your client is receiving a message containing a SURB request - a SURB requesting more SURB packets to be sent to the service, in order for them to have enough packets (with a big enough overall payload) to split the entire response to your initial request across.
Whether the data of a SURB request being empty is a feature or a bug is to be decided - there is some discussion surrounding whether we can use SURB requests to send additional data to streamline the process of sending large replies across the mixnet.
You can find a few helper functions here to help deal with this issue in the meantime.
If you can think of a more succinct or different way of handling this do reach out - we're happy to hear other opinions