nxtrace / NTrace-core

NextTrace, an open source visual route tracking CLI tool
https://www.nxtrace.org
GNU General Public License v3.0
5.62k stars 333 forks source link

panic with dn42 flag #234

Open marek22k opened 5 months ago

marek22k commented 5 months ago

Hello,

I have installed nexttrace via AUR (nexttrace package with updated version) and when I run it with --dn42 a panic appears:

$ nexttrace --disable-mpls --dn42 fd5c:3e37:2666:ea01::71
NextTrace v1.2.9  f96c3e5
IP Geo Data Provider: DN42
traceroute to fd5c:3e37:2666:ea01::71, 30 hops max, 52 bytes packets
panic: open ./geofeed.csv: no such file or directory

goroutine 18 [running]:
github.com/nxtrace/NTrace-core/dn42.GetGeoFeed({0xc0001e60c0, 0x16})
    github.com/nxtrace/NTrace-core/dn42/geofeed.go:26 +0x12d
github.com/nxtrace/NTrace-core/ipgeo.DN42({0xc0001e60c0, 0x2b}, 0xc000088c38?, {0x5e99c577be10?, 0x75a3f0dfe5b8?}, 0x8?)
    github.com/nxtrace/NTrace-core/ipgeo/dn42.go:30 +0xde
github.com/nxtrace/NTrace-core/trace.(*Hop).fetchIPData(0xc0001f8000, {{0x0, 0x0}, 0x1, 0x1e, 0x3, 0x12, 0x3b9aca00, {0xc0000150e0, 0x10, ...}, ...})
    github.com/nxtrace/NTrace-core/trace/trace.go:149 +0x1c5
github.com/nxtrace/NTrace-core/trace.(*ICMPTracerv6).send(0xc00010c160, 0x1)
    github.com/nxtrace/NTrace-core/trace/icmp_ipv6.go:320 +0xa27
created by github.com/nxtrace/NTrace-core/trace.(*ICMPTracerv6).Execute in goroutine 1
    github.com/nxtrace/NTrace-core/trace/icmp_ipv6.go:94 +0x645
$ nexttrace --version
NextTrace v1.2.9  f96c3e5
NextTrace Sponsored by
· DMIT.io
· Misaka.io
· Saltyfish.io
(Listed in no particular order)

NextTrace CopyRight
Honorary Founder: Leo
Project Chair: Tso
Core-Developer: Leo, Vincent, zhshch, Tso
Infra Maintainer: Tso

Furthermore, without MPLS deactivated, so much output appears that I can no longer see it on the console: log.txt Should I make a separate bug report for this?

fkx4-p commented 4 months ago

Note: This is just a temporary translation of the Chinese version of README. I do not guarantee the accuracy.

Tracing using DN42 mode requires additional settings. When you first run NT with DN42 mode, NT will generate a file named nt_config.yaml, you can specify the location of the two files.

GeoFeed:

For geofeed.csv the format is:

IP_CDIR,LtdCode,ISO3166-2,CityName,ASN,IPWhois

For example:

58.215.96.0/20,CN,CN-JS,Wuxi,23650,CHINANET-JS

If you have a CIDR for backbone, you can just leave the geo location info empty, like so:

202.97.0.0/16,,,4134,CHINANET-BACKBONE

PTR

For ptr.csv the format is:

IATA_CODE,LtdCode,RegionName,CityName

For example for LAX, US:

LAX,US,California,Los Anegles

NT can automatically match the city names in the CSV, for example, if your PTR record has losangeles in it, you only need to add the above record to make it function normally.