Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T04:14:30Zhttps://gitlab.torproject.org/legacy/trac/-/issues/10579arm crashes when it connects to relay with ExitPolicy reject62020-06-13T04:14:30ZTracarm crashes when it connects to relay with ExitPolicy reject6When I connect arm to a relay with a ipv6 exit policy line in torrc like
ExitPolicy reject6 [c234:5678:a001:5d::136]:22
arm crashes with the following backtrace:
File "/usr/share/arm/starter.py", line 578, in <module>
cli.controll...When I connect arm to a relay with a ipv6 exit policy line in torrc like
ExitPolicy reject6 [c234:5678:a001:5d::136]:22
arm crashes with the following backtrace:
File "/usr/share/arm/starter.py", line 578, in <module>
cli.controller.startTorMonitor(time.time() - initTime)
File "/usr/share/arm/cli/controller.py", line 700, in startTorMonitor
curses.wrapper(drawTorMonitor, startTime)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/share/arm/cli/controller.py", line 801, in drawTorMonitor
isKeystrokeConsumed = panelImpl.handleKey(key)
File "/usr/share/arm/cli/headerPanel.py", line 180, in handleKey
torTools.getConn().init(torctlConn)
File "/usr/share/arm/util/torTools.py", line 670, in init
self._exitPolicyChecker = self.getExitPolicy()
File "/usr/share/arm/util/torTools.py", line 1345, in getExitPolicy
result = ExitPolicy(entry, result)
File "/usr/share/arm/util/torTools.py", line 2611, in __init__
self.ipAddressBin += "".join([str((int(octet) >> y) & 1) for y in range(7, -1, -1)])
ValueError: invalid literal for int() with base 10: '[c234'
**Trac**:
**Username**: torlandDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/10702arm tells users to "sudo -u debian-tor arm", which lets arm read tor's keys2020-06-13T04:14:45ZRoger Dingledinearm tells users to "sudo -u debian-tor arm", which lets arm read tor's keysin config/strings.cfg:
```
msg.setup.arm_is_running_as_root Arm is currently running with root permissions. This isn't a good idea, nor should it be necessary. Try starting arm with "sudo -u {tor_user} arm" instead.
```
Telling the user...in config/strings.cfg:
```
msg.setup.arm_is_running_as_root Arm is currently running with root permissions. This isn't a good idea, nor should it be necessary. Try starting arm with "sudo -u {tor_user} arm" instead.
```
Telling the user to run arm as the tor user exposes all of /var/lib/tor/ to arm, which is probably more than needed and likely more than expected.
At least on debian, the right answer is "sudo adduser $USER debian-tor" and then run arm as the normal user (after logout/login as needed). See #10700 for where this topic came up.Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/24382I resized my terminal window and nyx crashed.2020-06-13T07:52:52ZTracI resized my terminal window and nyx crashed.I resized my terminal window and nyx crashed. Here is the traceback.
```
Traceback (most recent call last):
File "/usr/local/bin/nyx", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/nyx/__i...I resized my terminal window and nyx crashed. Here is the traceback.
```
Traceback (most recent call last):
File "/usr/local/bin/nyx", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/local/lib/python3.5/dist-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/nyx/starter.py", line 118, in main
nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
File "/usr/local/lib/python3.5/dist-packages/nyx/curses.py", line 217, in start
curses.wrapper(_wrapper)
File "/usr/lib/python3.5/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.5/dist-packages/nyx/curses.py", line 215, in _wrapper
function()
File "/usr/local/lib/python3.5/dist-packages/nyx/__init__.py", line 245, in draw_loop
interface.redraw(force = not key.is_null())
File "/usr/local/lib/python3.5/dist-packages/nyx/__init__.py", line 716, in redraw
panel.redraw(force = force, top = occupied)
File "/usr/local/lib/python3.5/dist-packages/nyx/panel/__init__.py", line 175, in redraw
self._last_draw_size = nyx.curses.draw(self._draw, top = self._top, height = self.get_height(), draw_if_resized = draw_dimension)
File "/usr/local/lib/python3.5/dist-packages/nyx/curses.py", line 740, in draw
curses_subwindow = CURSES_SCREEN.subwin(subwindow_height, subwindow_width, top, left)
_curses.error: curses function returned NULL
```
**Trac**:
**Username**: DbryrtfbcbhgfDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/27350Nyx -d ignores supplied file name2020-06-13T08:11:26ZtraumschuleNyx -d ignores supplied file nameThanks for this nice tool!
Running nyx from git without arguments destroys the interface with stem debug messages. One needs to
```
$ ./run_nyx 2>nyx.log
```
The offered -d option seems to fail reliably:
```
$ ./run_nyx -d nyx.log
Trace...Thanks for this nice tool!
Running nyx from git without arguments destroys the interface with stem debug messages. One needs to
```
$ ./run_nyx 2>nyx.log
```
The offered -d option seems to fail reliably:
```
$ ./run_nyx -d nyx.log
Traceback (most recent call last):
File "./run_nyx", line 14, in <module>
nyx.main()
File "nyx/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/lib/python2.7/dist-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "nyx/nyx/starter.py", line 67, in main
_setup_debug_logging(args)
File "nyx/nyx/starter.py", line 135, in _setup_debug_logging
os.makedirs(debug_dir)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 2] No such file or directory: ''
```
The packaged version says
```
$ nyx -d nyx.log
Unable to write to our debug log file (nyx.log): No such file or directory
$ nyx --version
nyx version 2.0.4 (released November 5, 2017)
```Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/25890add instructions for running nyx safely to the FAQ2020-06-13T09:02:50ZRoger Dingledineadd instructions for running nyx safely to the FAQOn the tor-relay-debian page, we used to tell people how to configure arm/nyx safely: see item 13 on
https://web.archive.org/web/20171019233402/https://www.torproject.org/docs/tor-relay-debian
The trick is to add your user to the debian-...On the tor-relay-debian page, we used to tell people how to configure arm/nyx safely: see item 13 on
https://web.archive.org/web/20171019233402/https://www.torproject.org/docs/tor-relay-debian
The trick is to add your user to the debian-tor group, not to sudo your nyx to run as the debian-tor user.
We seem to have dropped those instructions when we migrated to the wiki page at https://trac.torproject.org/projects/tor/wiki/TorRelayGuide
I noticed just now because I was trying to help another arm/nyx user on #tor, who was doing it the wrong way (presumably because they were following old instructions from somewhere else, like the old arm documentation).Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32552stem says "dictionary keys changed during iteration" with python 3.82020-06-13T10:53:34Zcypherpunksstem says "dictionary keys changed during iteration" with python 3.8Every single time I try to connect to for from Nyx I get
`Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/stem/connection.py", line 370...Every single time I try to connect to for from Nyx I get
`Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/stem/connection.py", line 370, in _connect_auth authenticate(control_socket, password, chroot_path) File "/usr/lib/python3.8/site-packages/stem/connection.py", line 625, in authenticate raise auth_exc stem.connection.MissingPassword: no passphrase provided During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/nyx", line 11, in <module> load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')() File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 176, in main nyx.starter.main() File "/usr/lib/python3.8/site-packages/stem/util/conf.py", line 289, in wrapped return func(*args, config = config, **kwargs) File "/usr/lib/python3.8/site-packages/nyx/starter.py", line 90, in main controller = init_controller( File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 325, in init_controller TOR_CONTROLLER = stem.connection.connect(*args, **kwargs) File "/usr/lib/python3.8/site-packages/stem/connection.py", line 291, in connect return _connect_auth(control_connection, password, password_prompt, chroot_path, controller) File "/usr/lib/python3.8/site-packages/stem/connection.py", line 404, in _connect_auth return _connect_auth(control_socket, password, password_prompt, chroot_path, controller) File "/usr/lib/python3.8/site-packages/stem/connection.py", line 375, in _connect_auth return controller(control_socket, is_authenticated = True) File "/usr/lib/python3.8/site-packages/stem/control.py", line 1057, in __init__ super(Controller, self).__init__(control_socket, is_authenticated) File "/usr/lib/python3.8/site-packages/stem/control.py", line 585, in __init__ self._post_authentication() File "/usr/lib/python3.8/site-packages/stem/control.py", line 3902, in _post_authentication owning_pid = self.get_conf('__OwningControllerProcess', None) File "/usr/lib/python3.8/site-packages/stem/control.py", line 2170, in get_conf entries = self.get_conf_map(param, default, multiple) File "/usr/lib/python3.8/site-packages/stem/control.py", line 2273, in get_conf_map for key in reply: RuntimeError: dictionary keys changed during iteration`
Using Arch Linux on a headless server, python 3.8.0b4. Tried both cookie and password authentication methods. Controlport is 9051, inaccessible from outside (firewall set up to allow any internal connections to any port)Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32566nyx not starting2020-06-13T10:55:20Zcypherpunksnyx not startingNyx is not starting up after providing the control port password it reports:
```
% nyx
Tor controller password:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 370, in _connect_auth
...Nyx is not starting up after providing the control port password it reports:
```
% nyx
Tor controller password:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 370, in _connect_auth
authenticate(control_socket, password, chroot_path)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 625, in authenticate
raise auth_exc
stem.connection.MissingPassword: no passphrase provided
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/bin/nyx", line 11, in <module>
load_entry_point('nyx==2.1.0', 'console_scripts', 'nyx')()
File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 176, in main
nyx.starter.main()
File "/usr/lib/python3.8/site-packages/stem/util/conf.py", line 289, in wrapped
return func(*args, config = config, **kwargs)
File "/usr/lib/python3.8/site-packages/nyx/starter.py", line 90, in main
controller = init_controller(
File "/usr/lib/python3.8/site-packages/nyx/__init__.py", line 325, in init_controller
TOR_CONTROLLER = stem.connection.connect(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 291, in connect
return _connect_auth(control_connection, password, password_prompt, chroot_path, controller)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 404, in _connect_auth
return _connect_auth(control_socket, password, password_prompt, chroot_path, controller)
File "/usr/lib/python3.8/site-packages/stem/connection.py", line 375, in _connect_auth
return controller(control_socket, is_authenticated = True)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 1057, in __init__
super(Controller, self).__init__(control_socket, is_authenticated)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 585, in __init__
self._post_authentication()
File "/usr/lib/python3.8/site-packages/stem/control.py", line 3902, in _post_authentication
owning_pid = self.get_conf('__OwningControllerProcess', None)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 2170, in get_conf
entries = self.get_conf_map(param, default, multiple)
File "/usr/lib/python3.8/site-packages/stem/control.py", line 2273, in get_conf_map
for key in reply:
RuntimeError: dictionary keys changed during iteration
```
If the wrong password is provided I get the usual answer:
```
% nyx
Tor controller password:
Incorrect password
```
These are the used software versions
```
% python --version
Python 3.8.0
```
```
% nyx --version
nyx version 2.1.0 (released January 12, 2019)
```
```
% uname -a
Linux archarm 4.19.84-1-ARCH #1 SMP PREEMPT Thu Nov 21 00:50:40 UTC 2019 armv7l GNU/Linux
```
I also get the same error with archlinux x86_64 (kernel 5.3.12) with the same python and nyx versionsDamian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/4237arm warning when used with tor master2020-06-13T14:13:49ZSebastian Hahnarm warning when used with tor masterwhen used with current master, arm prints this warning:
```
[ARM_WARN] The torrc differ from what tor's using. You can issue a sighup to reload the torrc values by pressing x.
- configuration value is missing from the torrc: DirReqSt...when used with current master, arm prints this warning:
```
[ARM_WARN] The torrc differ from what tor's using. You can issue a sighup to reload the torrc values by pressing x.
- configuration value is missing from the torrc: DirReqStat
```}
Also there's a typo here, it should be "The torrc differS from what" I think.Damian JohnsonDamian Johnsonhttps://gitlab.torproject.org/legacy/trac/-/issues/5265arm dies on "day is out of range for month"2020-06-13T14:45:07Zcypherpunksarm dies on "day is out of range for month"Leap year related?
```
$ arm
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/arm/starter.py", line 543, in <module>
cli.controller.startTorMonitor(time.time() - initTime)
File "/usr/local/lib/pyth...Leap year related?
```
$ arm
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/arm/starter.py", line 543, in <module>
cli.controller.startTorMonitor(time.time() - initTime)
File "/usr/local/lib/python2.7/site-packages/arm/cli/controller.py", line 683, in startTorMonitor
curses.wrapper(drawTorMonitor, startTime)
File "/usr/local/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python2.7/site-packages/arm/cli/controller.py", line 703, in drawTorMonitor
initController(stdscr, startTime)
File "/usr/local/lib/python2.7/site-packages/arm/cli/controller.py", line 86, in initController
firstPagePanels.append(cli.logPanel.LogPanel(stdscr, expandedEvents, config))
File "/usr/local/lib/python2.7/site-packages/arm/cli/logPanel.py", line 645, in __init__
self.reprepopulateEvents()
File "/usr/local/lib/python2.7/site-packages/arm/cli/logPanel.py", line 689, in reprepopulateEvents
torEventBacklog = getLogFileEntries(setRunlevels, readLimit, addLimit, self._config)
File "/usr/local/lib/python2.7/site-packages/arm/cli/logPanel.py", line 305, in getLogFileEntries
eventTimeComp = list(time.strptime(timestamp, "%b %d %H:%M:%S"))
File "/usr/local/lib/python2.7/_strptime.py", line 454, in _strptime_time
return _strptime(data_string, format)[0]
File "/usr/local/lib/python2.7/_strptime.py", line 440, in _strptime
datetime_date(year, 1, 1).toordinal() + 1
ValueError: day is out of range for month
$ date
Wed Feb 29 01:02:38 UTC 2012
```
Above log is from FreeBSD with arm from ports, also dying on my Linux box.Damian JohnsonDamian Johnson