Cable Trace not working in both directions
Deployment Type
Self-hosted
NetBox Version
4.0.6
Python Version
3.11
Steps to Reproduce
Create 1 patch-device with 1 front and 1 rear port.
Create 2 devices with 1 interface on each device. Connect both devices to their corresponding rear/front port.
Press the "trace cable" button to produce a result.
Expected Behavior
I am expecting both trace directions to show the same output. This is not the case.
I'm using a fresh docker environment to test this issue. I've observed this on another environment too.
Observed Behavior
The trace from both sides is giving a different output.
One shows the expected (full) result. The other shows only 1 out of 2 connected patch-cables.
@mat-vc Can you please check the steps to reproduce and maybe give a more in-depth step by step - I tried a scenario like you listed but can see the trace from both sides (see below):
This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
I am seeing this issue intermittently as well. Netbox 4.0.7 via netbox-docker.
I have a slightly more complex scenario where I have modelled two FOBOT Devices with Front and Rear ports, with "Switch" Device Interfaces connected to the FOBOT Front Ports and the FOBOT Rear Ports connected to each other:
Device [SWITCH1] -> interface -> Cable -> front-port -> device [FOBOT1] -> rear-port -> Cable -> rear-port -> device [FOBOT2] -> front-port -> Cable -> interface -> Device [SWITCH2]
Earlier when I was looking at the SWITCH1 interface list, it showed the nominated interface connected through to the far-end SWITCH2 interface (solving all the intermediate passive device connectivity), however looking at the SWITCH2 interface, it only showed the CableName and the Connected column was blank. Running Trace showed the same one-way results as @mat-vc was seeing (eg: a split after FOBOT2) - and this is when I searched on the cause of the split error message and found this GitHub Issue.
Docker (and thus netbox) has restarted during this time as my laptop was closed.
However, just now, I re-created @arthanson 's test scenario above on separate test devices with a simple back-to-back device in the middle, and trace worked in both directions for that scenario.
Now all of a sudden I can also see a bidirectional connection on my more complex scenario as well! So I'm not sure if that was the restart or something else that is causing it to trace both ways correctly.
My apologies for my late reply.
I have just deployed netbox-docker (4.0.8) on another fresh docker environment. So far, I've observed this issue on versions v3.7.4, 4.0.6, 4.0.7 and 4.0.8.
After testing a few cables it happened again. It only happens sometimes, I can't quiet put my finger on what specifically triggers it, to thow this error...
A few screenshots: Cables 1-2 and 3-4 are OK. Cable 5+6 throw the error only in 1 trace direction.
Trace directions:
Cable 1+2 (works)
Patchpanel used for cable 1-4. Positions are always 1. On both front & rear ports.
Patchpanel used for cable 5-6. Positions are dynamic but do match on front&rear for this device
Could the device template's position have anything to do with it?
Hi, I have the same problem now in version 4.2.4. I have 12 such lines. In 8 of the 12 lines, trace works both ways, while on 4 of them, it only works one way. I forced a trace recalculation in NetBox, and now only 4 out of 12 lines trace in both directions. Everything looks identical on the ones that work and those that don’t, so this is strange.
Hi all,
we have the same problem in version 4.2.6. (See #19148 ) Is there any progress with this issue ? Because no new information has been published here since Jul 30, 2024
Thanks a lot in advance for any "positive" reply ;-)
I'm worried I'll come across this error. I've made close to 100 cables now in a setup without meeting the bug though and a bit stumped as to what is causing this.
To one of you who have this bug, can you do provide an output similar to this so I can dig deeper: If the URL is "http://localhost/dcim/front-ports/61/trace/", change it to "http://localhost/api/dcim/front-ports/61/" and provide the output, of both ends. My thinking is that if its missing from the endpoint in the API its something to investigate on the api and backwards, if its present there its likely some error in the SVG generator and thats something to be investigated.
Thanks in advance!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
I'm new to Netbox but I think I just came across this issue myself. Fresh install of version 4.4.4.
API data for rear port:
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/rear-ports/1/",
"display_url": "http://docker1-adbe:5002/dcim/rear-ports/1/",
"display": "3",
"device": {
"id": 3,
"url": "http://docker1-adbe:5002/api/dcim/devices/3/",
"display": "p13",
"name": "p13",
"description": ""
},
"module": null,
"name": "3",
"label": "",
"type": {
"value": "8p8c",
"label": "8P8C"
},
"color": "",
"positions": 1,
"description": "",
"mark_connected": false,
"cable": {
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/cables/1/",
"display": "#1",
"label": "",
"description": ""
},
"cable_end": "B",
"link_peers": [
{
"id": 25,
"url": "http://docker1-adbe:5002/api/dcim/interfaces/25/",
"display": "GigabitEthernet0",
"device": {
"id": 2,
"url": "http://docker1-adbe:5002/api/dcim/devices/2/",
"display": "ap-adbe-academy-1",
"name": "ap-adbe-academy-1",
"description": ""
},
"name": "GigabitEthernet0",
"description": "",
"cable": {
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/cables/1/",
"display": "#1",
"label": "",
"description": ""
},
"_occupied": true
}
],
"link_peers_type": "dcim.interface",
"tags": [],
"custom_fields": {},
"created": "2025-10-22T12:58:44.919548Z",
"last_updated": "2025-10-22T13:43:57.549209Z",
"_occupied": true
}
API data for front port:
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/front-ports/1/",
"display_url": "http://docker1-adbe:5002/dcim/front-ports/1/",
"display": "3",
"device": {
"id": 3,
"url": "http://docker1-adbe:5002/api/dcim/devices/3/",
"display": "p13",
"name": "p13",
"description": ""
},
"module": null,
"name": "3",
"label": "",
"type": {
"value": "8p8c",
"label": "8P8C"
},
"color": "",
"rear_port": {
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/rear-ports/1/",
"display_url": "http://docker1-adbe:5002/dcim/rear-ports/1/",
"display": "3",
"name": "3",
"label": "",
"description": ""
},
"rear_port_position": 1,
"description": "",
"mark_connected": false,
"cable": {
"id": 5,
"url": "http://docker1-adbe:5002/api/dcim/cables/5/",
"display": "#5",
"label": "",
"description": ""
},
"cable_end": "B",
"link_peers": [
{
"id": 3,
"url": "http://docker1-adbe:5002/api/dcim/interfaces/3/",
"display": "GigabitEthernet1/0/3",
"device": {
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/devices/1/",
"display": "sw-adbe-academy-1",
"name": "sw-adbe-academy-1",
"description": ""
},
"name": "GigabitEthernet1/0/3",
"description": "",
"cable": {
"id": 5,
"url": "http://docker1-adbe:5002/api/dcim/cables/5/",
"display": "#5",
"label": "",
"description": ""
},
"_occupied": true
}
],
"link_peers_type": "dcim.interface",
"tags": [],
"custom_fields": {},
"created": "2025-10-22T12:59:25.763703Z",
"last_updated": "2025-10-22T13:23:29.929127Z",
"_occupied": true
}
I deleted the cable connections and redid it via Connections > Cables > Add:
API data rear port:
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/rear-ports/1/",
"display_url": "http://docker1-adbe:5002/dcim/rear-ports/1/",
"display": "3",
"device": {
"id": 3,
"url": "http://docker1-adbe:5002/api/dcim/devices/3/",
"display": "p13",
"name": "p13",
"description": ""
},
"module": null,
"name": "3",
"label": "",
"type": {
"value": "8p8c",
"label": "8P8C"
},
"color": "",
"positions": 1,
"description": "",
"mark_connected": false,
"cable": {
"id": 7,
"url": "http://docker1-adbe:5002/api/dcim/cables/7/",
"display": "#7",
"label": "",
"description": ""
},
"cable_end": "A",
"link_peers": [
{
"id": 25,
"url": "http://docker1-adbe:5002/api/dcim/interfaces/25/",
"display": "GigabitEthernet0",
"device": {
"id": 2,
"url": "http://docker1-adbe:5002/api/dcim/devices/2/",
"display": "ap-adbe-academy-1",
"name": "ap-adbe-academy-1",
"description": ""
},
"name": "GigabitEthernet0",
"description": "",
"cable": {
"id": 7,
"url": "http://docker1-adbe:5002/api/dcim/cables/7/",
"display": "#7",
"label": "",
"description": ""
},
"_occupied": true
}
],
"link_peers_type": "dcim.interface",
"tags": [],
"custom_fields": {},
"created": "2025-10-22T12:58:44.919548Z",
"last_updated": "2025-10-22T14:01:54.903059Z",
"_occupied": true
}
API data front port:
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/front-ports/1/",
"display_url": "http://docker1-adbe:5002/dcim/front-ports/1/",
"display": "3",
"device": {
"id": 3,
"url": "http://docker1-adbe:5002/api/dcim/devices/3/",
"display": "p13",
"name": "p13",
"description": ""
},
"module": null,
"name": "3",
"label": "",
"type": {
"value": "8p8c",
"label": "8P8C"
},
"color": "",
"rear_port": {
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/rear-ports/1/",
"display_url": "http://docker1-adbe:5002/dcim/rear-ports/1/",
"display": "3",
"name": "3",
"label": "",
"description": ""
},
"rear_port_position": 1,
"description": "",
"mark_connected": false,
"cable": {
"id": 6,
"url": "http://docker1-adbe:5002/api/dcim/cables/6/",
"display": "#6",
"label": "",
"description": ""
},
"cable_end": "B",
"link_peers": [
{
"id": 3,
"url": "http://docker1-adbe:5002/api/dcim/interfaces/3/",
"display": "GigabitEthernet1/0/3",
"device": {
"id": 1,
"url": "http://docker1-adbe:5002/api/dcim/devices/1/",
"display": "sw-adbe-academy-1",
"name": "sw-adbe-academy-1",
"description": ""
},
"name": "GigabitEthernet1/0/3",
"description": "",
"cable": {
"id": 6,
"url": "http://docker1-adbe:5002/api/dcim/cables/6/",
"display": "#6",
"label": "",
"description": ""
},
"_occupied": true
}
],
"link_peers_type": "dcim.interface",
"tags": [],
"custom_fields": {},
"created": "2025-10-22T12:59:25.763703Z",
"last_updated": "2025-10-22T14:01:05.667820Z",
"_occupied": true
}
I'm not sure what changed, if anything?