[tor-bugs] #31551 [Core Tor/Stem]: ss command is no longer supported by /usr/share/doc/stem-1.7.1/_static/example/relay_connections.py

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Aug 28 21:20:56 UTC 2019


#31551: ss command is no longer supported by
/usr/share/doc/stem-1.7.1/_static/example/relay_connections.py
--------------------------+-------------------------------
 Reporter:  toralf        |          Owner:  atagar
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Component:  Core Tor/Stem
  Version:  Tor: 0.4.1.5  |       Severity:  Normal
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+-------------------------------
 I do get :
 {{{
 # for p in 9051 29051 ; do python
 /usr/share/doc/stem-1.7.1/_static/example/relay_connections.py --ctrlport
 $p --resolver ss; done
  0.4.1.5   uptime: 3-01:35:39   flags: Fast, Running, Stable, V2Dir, Valid

 +------------------------------+------+------+
 | Type                         | IPv4 | IPv6 |
 +------------------------------+------+------+
 | Inbound to our ORPort        |    0 |    1 |
 +------------------------------+------+------+
 | Total                        |    0 |    1 |
 +------------------------------+------+------+

  0.4.1.5   uptime: 3-01:36:37   flags: Fast, Running, Stable, V2Dir, Valid

 Traceback (most recent call last):
   File "/usr/share/doc/stem-1.7.1/_static/example/relay_connections.py",
 line 130, in <module>
     main()
   File "/usr/share/doc/stem-1.7.1/_static/example/relay_connections.py",
 line 66, in main
     for conn in get_connections(resolver = args.resolver, process_pid =
 pid):
   File "/usr/lib64/python3.6/site-packages/stem/util/connection.py", line
 300, in get_connections
     raise IOError('No results found using: %s' % resolver_command)
 OSError: No results found using: ss -nptu
 }}}
 at a hardened stable Gentoo Linux with  kernel 5.2.10 and sys-
 apps/iproute2-4.19.0-r1 (provides "ss"), but th ecomamdn itself prints :
 {{{
 mr-fox ~ # ss -nptu | head
 Netid   State         Recv-Q    Send-Q                   Local
 Address:Port                                             Peer Address:Port
 tcp     ESTAB         0         0
 5.9.158.75:39658
 51.77.52.216:443                         users:(("tor",pid=2365,fd=4313))
 tcp     ESTAB         0         0
 5.9.158.75:9001
 52.14.166.220:51466                       users:(("tor",pid=2397,fd=5105))
 tcp     ESTAB         0         1057
 5.9.158.75:46379
 158.174.255.235:4430
 users:(("tor",pid=2365,fd=4663))
 tcp     ESTAB         0         0                           5.9.158.75:443
 82.35.159.254:57674                       users:(("tor",pid=2365,fd=3870))
 tcp     ESTAB         0         0
 5.9.158.75:35005
 94.16.113.67:9001                        users:(("tor",pid=2365,fd=4975))
 tcp     ESTAB         0         0
 5.9.158.75:36837
 88.3.139.225:48998                       users:(("tor",pid=2365,fd=6473))
 tcp     ESTAB         0         0
 5.9.158.75:44183
 82.118.21.60:9001                        users:(("tor",pid=2365,fd=720))
 tcp     ESTAB         0         0
 5.9.158.75:36997
 50.7.115.67:443                         users:(("tor",pid=2397,fd=1543))
 tcp     ESTAB         1571      1057
 5.9.158.75:9001
 46.165.250.224:34639
 users:(("tor",pid=2397,fd=2352))
 }}}
 All other 3 resolvers are fine and do print something like
 {{{
 # for p in 9051 29051 ; do python
 /usr/share/doc/stem-1.7.1/_static/example/relay_connections.py --ctrlport
 $p; done
  0.4.1.5   uptime: 3-01:51:38   flags: Fast, Running, Stable, V2Dir, Valid

 +------------------------------+------+------+
 | Type                         | IPv4 | IPv6 |
 +------------------------------+------+------+
 | Inbound to our ORPort        | 2267 |    1 |
 | Inbound to our DirPort       |    3 |    0 |
 | Inbound to our ControlPort   |    1 |    0 |
 | Outbound to a relay          | 3965 |    0 |
 | Outbound uncategorized       |   12 |    0 |
 +------------------------------+------+------+
 | Total                        | 6248 |    1 |
 +------------------------------+------+------+

  0.4.1.5   uptime: 3-01:51:40   flags: Fast, Running, Stable, V2Dir, Valid

 +------------------------------+------+------+
 | Type                         | IPv4 | IPv6 |
 +------------------------------+------+------+
 | Inbound to our ORPort        | 1629 |    2 |
 | Inbound to our ControlPort   |    1 |    0 |
 | Outbound to a relay          | 4083 |    0 |
 | Outbound uncategorized       |   12 |    0 |
 +------------------------------+------+------+
 | Total                        | 5725 |    2 |
 +------------------------------+------+------+
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31551>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list