Opened 12 months ago

Closed 5 months ago

#2310 closed defect (fixed)

Better error message for Duplicate Client Destinations

Reported by: peekachoo Owned by:
Priority: minor Milestone: 0.9.38
Component: api/i2cp Version: 0.9.36
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

Bug: If two clients try to connect to the Router and listen to the same I2P Destination I2P throws a very confusing error.

If two clients try to connect to the same I2P Destination the I2P Router throws an error like:

java.io.IOException: net.i2p.client.I2PSessionException: [CLOSED I2PSessionMuxedImpl]: Cannot connect to the router on localhost:7654 and build tunnels
...
Caused by: net.i2p.client.I2PSessionException: [CLOSED I2PSessionMuxedImpl]: Cannot connect to the router on localhost:7654 and build tunnels
	at net.i2p.client.impl.I2PSessionImpl.connect(I2PSessionImpl.java:731)
	at net.i2p.client.streaming.impl.I2PSocketManagerFull.verifySession(I2PSocketManagerFull.java:513)
	at net.i2p.client.streaming.impl.I2PSocketManagerFull.connect(I2PSocketManagerFull.java:563)
	at com.bubblegumproject.fabric.network.i2p.feature.I2PRemoteHostConnection.start(I2PRemoteHostConnection.java:42)
	... 59 more
Caused by: java.io.IOException: Disconnected from router while waiting for tunnels
	at net.i2p.client.impl.I2PSessionImpl.connect(I2PSessionImpl.java:694)
	... 62 more

This is a very confusing error message that does not provide any information about the underlying error cause.

The actual error can be found in the router logs:

jvm 1    | CRIT  [CP Reader 72] 2p.router.client.ClientManager: Client attempted to register duplicate destination cukri2f6bffrhmqmcz5imsudz3xotbhl7ufflbxkoa3vaq4wnjjq.b32.i2p

The streaming libs should provide a clearer error message about what is happening. Ideally, a specific exception class, DuplicateClientDestinationException? should be thrown and provide information about the remote Destination and the local Destination that caused the error.

Subtickets

Change History (3)

comment:1 Changed 12 months ago by zzz

Component: unspecifiedapi/i2cp

comment:2 Changed 5 months ago by zzz

Milestone: undecided0.9.38

this was fixed in 5108ac09a063cddb8e8add07ace4f252f47bbfba to propagate the error message to the session listener, in 0.9.38

comment:3 Changed 5 months ago by zzz

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.