n0-computer / n0-computer/iroh-docs

After shutting down iroh, when recreating iroh-doc and joining nodes using tickets, it shows “Lost connection to relay server.”

Open
#74 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
74
Forks
16
PR merge metrics
No merged PRs in 30d

Description

The issue reproduces when I shutdown an existing router, recreate it, and rejoin it with a remote ticket

it shows “Lost connection to relay server.”

Could cause synchronization data failure
#51

Thank you very much. Could you provide a solution?

env

iroh v0.94.0
iroh-gossip v0.94.0
iroh-blobs v0.94.0
iroh-doc v0.94.0

let client_path = client_src.to_string_lossy().into_owned();
let client_path1 = client_src1.to_string_lossy().into_owned();

// If you want to restart the client with a new connection, uncomment the following lines to stop the previous instance
// But it cause some issue
// ------------------------

let iroh_net = start_server(iroh_secret_key.clone(), client_path.clone()).await?;

iroh_net.router.shutdown().await?;
sleep(Duration::from_secs(1)).await;

let iroh_net1 = start_server(iroh_secret_key, client_path1).await?;

let mut tickets = std::collections::HashMap::new();
tickets.insert("node".to_string(), node_ticket.parse()?);
tickets.insert("folder".to_string(), folder_ticket.parse()?);
tickets.insert("resource".to_string(), resource_ticket.parse()?);
tickets.insert("resource1".to_string(), resource_ticket1.parse()?);
tickets.insert("resource2".to_string(), resource_ticket2.parse()?);
tickets.insert("resource3".to_string(), resource_ticket3.parse()?);
let store_state = create_files(&iroh_net1, Some(tickets)).await?;

I have uploaded a test project and upgrade V0.94.0
iroh-test

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked iroh-test project and reproduce the Rust sequence that shuts down the router, recreates it, and calls create_files with the ticket map on iroh v0.94.0. Read the referenced issue #51 while tracing the shutdown and relay behavior. Done means recreating and rejoining no longer reports “Lost connection to relay server” and synchronization succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
distributed-systems, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.