Opened 6 years ago

Closed 3 years ago

#8473 closed defect (worksforme)

zero connections treated as a socket listing error

Reported by: ultramage Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Nyx Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

If I connect arm to my client-only tor node that's been idle for some time and has no connections open, arm gets confused and thinks there's a socket listing problem.

[ARM_NOTICE] Unable to query connections with sockstat (bsd), trying procstat (bsd)
[ARM_NOTICE] Unable to query connections with procstat (bsd), trying lsof
[ARM_NOTICE] We were unable to use any of your system's resolvers to get tor's connections. This is fine, but means that the connections page will be empty. This is usually permissions related so if you would like to fix this then run arm with the same user as tor (ie, "sudo -u <tor user> arm").

Child Tickets

Change History (3)

comment:1 Changed 6 years ago by atagar

Usually the controller's connection itself would account for one, but you're right. When tor is inactive *and* you're using a control socket we'll have zero connections. However, I'm unfortunately at a loss for a better thing to check... :/

comment:2 Changed 6 years ago by ultramage

Oh. I kinda hoped it would be possible to distinguish sockstat not having any tor entries and sockstat completely failing... but I guess what you do is parsing the output, so it could also be seen as a parsing failure :/

Only other thing I can think of is asking tor for the current connection count over the control connection, and if it's 0 then don't bother polling the system. But that hinges on there being an API like that.

comment:3 Changed 3 years ago by atagar

Resolution: worksforme
Severity: Normal
Status: newclosed

Cleaning up old tickets. Nyx is undergoing a rewrite, if this is still relevant then feel free to reopen.

Note: See TracTickets for help on using tickets.