Hello,
im trying to enable prometheus metrics, and... something goes
wrong:
torrc:
MetricsPort 9166
MetricsPortPolicy accept *
after tor restart in logs:
Tor[15368]: Opening Metrics listener on 127.0.0.1:9166
Tor[15368]: Could not bind to 127.0.0.1:9166: Address already in
use. Is Tor already running?
-- before restart, no one listen on this port, as `ss | grep
:9166` can say.
there is also backtrace in logs:
Tor[15368]: connection_finished_flushing(): Bug: got unexpected
conn type 20. (on Tor 0.4.5.6 )
Tor[15368]: tor_bug_occurred_(): Bug:
../src/core/mainloop/connection.c:5192:
connection_finished_flushing: This line should not have been
reached. (Future instances of this warning will be silenced.) (on
Tor 0.4.5.6 )
Tor[15368]: Bug: Tor 0.4.5.6: Line unexpectedly reached at
connection_finished_flushing at
../src/core/mainloop/connection.c:5192. Stack trace: (on Tor
0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(log_backtrace_impl+0x58)
[0x557b52648428] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(tor_bug_occurred_+0x16a)
[0x557b526537aa] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(+0x189355) [0x557b526e3355] (on
Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(connection_handle_write+0x4c8)
[0x557b526ed3b8] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(+0x69a2e) [0x557b525c3a2e] (on
Tor 0.4.5.6 )
Tor[15368]: Bug:
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x6a0)
[0x7ff21468a5a0] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(do_main_loop+0x105)
[0x557b525c4f15] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(tor_run_main+0x9bd)
[0x557b525bf41d] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(tor_main+0x3a) [0x557b525bd22a]
(on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(main+0x19) [0x557b525bcda9] (on
Tor 0.4.5.6 )
Tor[15368]: Bug:
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)
[0x7ff212ede2e1] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(_start+0x2a) [0x557b525bcdfa]
(on Tor 0.4.5.6 )
Tor[15368]: conn_write_callback(): Bug: unhandled error on write
for Metrics connection (fd 2496); removing (on Tor 0.4.5.6 )
Tor[15368]: tor_bug_occurred_(): Bug:
../src/core/mainloop/mainloop.c:932: conn_write_callback: This
line should not have been reached. (Future instances of this
warning will be silenced.) (on Tor 0.4.5.6 )
Tor[15368]: Bug: Tor 0.4.5.6: Line unexpectedly reached at
conn_write_callback at ../src/core/mainloop/mainloop.c:932. Stack
trace: (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(log_backtrace_impl+0x58)
[0x557b52648428] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(tor_bug_occurred_+0x16a)
[0x557b526537aa] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(+0x69b9f) [0x557b525c3b9f] (on
Tor 0.4.5.6 )
Tor[15368]: Bug:
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x6a0)
[0x7ff21468a5a0] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(do_main_loop+0x105)
[0x557b525c4f15] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(tor_run_main+0x9bd)
[0x557b525bf41d] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(tor_main+0x3a) [0x557b525bd22a]
(on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(main+0x19) [0x557b525bcda9] (on
Tor 0.4.5.6 )
Tor[15368]: Bug:
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)
[0x7ff212ede2e1] (on Tor 0.4.5.6 )
Tor[15368]: Bug: /usr/bin/tor(_start+0x2a) [0x557b525bcdfa]
(on Tor 0.4.5.6 )