Closed Therros2023 closed 1 year ago
hey @Therros2023,
this appears to be a problem similar to #40. Please see if those steps help you.
Hi @nitefood
Cheers - just did having a look. Updated brew
Update brew on the Mac: Exec command works in bash but not .zsh
bash-5.2$ exec 85<>/dev/tcp/whois.ripe.net/43
╭─────────────────────╮
│ ASN lookup for 5505 │
╰─────────────────────╯
AS Number ──> 5505
AS Name ──> VADAVO, ES
Organization ──> VADAVO SOLUCIONES SL (VDV-VLC-RED06 VDV-VLC-RED06 - CLIENTES TELECOM)
Abuse contact ──> abuse@vadavo.com
AS Reg. date ──> 2016-12-13 08:28:07
Peering @IXPs ──> DE-CIX Madrid: DE-CIX Madrid Peering LAN • ESPANIX Madrid Lower LAN
╭──────────────────────────────────────────╮
│ BGP informations for AS5505 (VADAVO, ES) │
╰──────────────────────────────────────────╯
Retrieving prefix allocations and announcements for AS550... (press CTRL-C to caRetrieving information for IPv6 prefix 1/1 (press CTRL-C to cancel)...Killed: 9
Still cannot do prefix retrival.
Update brew on the Mac: Exec command works in bash but not .zsh
Ok, that's to be expected since that's BASH specific (the asn
script itself is a BASH script, not a ZSH one)
Retrieving prefix allocations and announcements for AS550... (press CTRL-C to caRetrieving information for IPv6 prefix 1/1 (press CTRL-C to cancel)...Killed: 9
Still cannot do prefix retrival.
Can you try running the command as bash -x asn -v 5505 &> execution.log
, and afterwards attach execution.log
here in order to have more insight as to what's failing?
Done.
See Attached. execution.log
So it's indeed breaking in the exact spot where the script accesses the /dev/tcp
pseudodevice (i.e. the persistent whois connection).
At this point I'm inclined to think Homebrew's BASH package has an issue with this. The possible options that I can see are two:
Reinstall of homebrew bash was unsuccessful. Will try macports next.
Was looking around to see if there were traces of this error somewhere else, and this comment caught my eye. Not sure if this is really the case (furthermore they discuss ksh and not BASH), but the behavior looks consistent to what you're experiencing (and the explanation would be meaningful for BASH as well, since it suggests FD3 is "special" on MacOS). Closing FD 3 on MacOS apparently could trigger a SIGKILL, which is what you're experiencing in the end.
It's worth to test this idea by changing the code to use a FD other than 3. Please try the attached version that uses FD 6, and let me know. asn_fd6.txt
Retrieving prefix allocations and announcements for AS550... (press CTRL-C to caRetrieving information for IPv6 prefix 1/1 (press CTRL-C to cancel)...Killed: 9
Genius, that worked prefix retrieval is working again:
Good find with that post.
% asn 5505
╭─────────────────────╮
│ ASN lookup for 5505 │
╰─────────────────────╯
AS Number ──> 5505
AS Name ──> VADAVO, ES
Organization ──> VADAVO SOLUCIONES SL (VDV-VLC-RED06 VDV-VLC-RED06 - CLIENTES TELECOM)
Abuse contact ──> abuse@vadavo.com
AS Reg. date ──> 2016-12-13 08:28:07
Peering @IXPs ──> DE-CIX Madrid: DE-CIX Madrid Peering LAN • ESPANIX Madrid Lower LAN
╭──────────────────────────────────────────╮
│ BGP informations for AS5505 (VADAVO, ES) │
╰──────────────────────────────────────────╯
Retrieving prefix allocations and announcements for AS550... (press CTRL-C to ca IPv4 Prefixes ────> 8
IPv6 Prefixes ────> 1
BGP Neighbours ────> 39
╭──────────────────────────────────────────────╮
│ Peering informations for AS5505 (VADAVO, ES) │
╰──────────────────────────────────────────────╯
──────────────── Upstream Peers ────────────────
TWELVE99 (1299) HURRICANE (6939) COGENT-174 (174) MEER-AS (34549)
CORE-BACKBONE (33891) IP-MAX (25091) FIBERTELECOM-AS (41327) NEO-ASN (8218)
and more: 34927 3303 1239 35280 4455 60501 24482 13030 48348 9498 6057 8560
─────────────── Downstream Peers ───────────────
SAFORWIFI (207495) SVINT-ASN (200509) LUXUNIT (48952) SCS-AS (208248)
IUKANET (205086) S4N-AS (202054)
─────────────── Uncertain Peers ───────────────
EDGOO (47787) NETACTUATE (36236) STACLAR-CARRIER (34854) VORBOSS_AS (25160)
ONECOM-AS (51185) NL-MLAB (41047) Virtual-Technologies-Solutions-SA (37721) DELTA-TELECOM-AS (29049)
and more: 264479 212483 14840 39384 29680
╭─────────────────────────────────────────────────╮
│ Aggregated IP resources for AS5505 (VADAVO, ES) │
╰─────────────────────────────────────────────────╯
───── IPv4 ─────
185.123.204.0/22
185.210.225.0/24
185.210.226.0/24
185.210.227.0/24
188.130.247.0/24
188.130.254.0/24
───── IPv6 ─────
2a03:9320::/32
Awesome, will commit this fix later today and close the issue. Thanks for reporting!
Nah, thanks for taking the time - much appreciated.
Hi nitefood,
Mac seems to have an issue grabbing prefixes both IPv4 and v6:
Seems to be an issue with how the connection to ripe is made, maybe?