processone / eturnal

STUN / TURN standalone server
https://eturnal.net
Apache License 2.0
237 stars 22 forks source link

Crash report on log #33

Closed matiaslopezd closed 1 year ago

matiaslopezd commented 2 years ago

Hi @weiss! I see a crash report on the log file after executing the turnutils with the command:

turnutils -t -v -u 1663742530 -w XXXXXXXXXXXXXXXXXXXXX -p 80 -x myturn.example.com

eturnal.log

2022-09-21 03:55:58.497067+00:00 [info] Accepting long-term STUN/TURN authentication [TCP, session kt62aprd74lw, user 1663742530, client XXX.XX.XXX.XX:10328>
2022-09-21 03:55:58.671491+00:00 [info] Connection reset by peer [TCP, session 4bnpkrxknf23, user 1663742530, client XXX.XX.XXX.XX:10328]
2022-09-21 03:55:58.671622+00:00 [info] Cannot determine transport protocol: closed
2022-09-21 03:55:58.671834+00:00 [notice] Cannot start connection: closed [TCP|TLS, session g6yxbtgvyzvd]
2022-09-21 03:55:58.671770+00:00 [error] CRASH REPORT:
  crasher:
    initial call: stun:init/1
    pid: <0.507.0>
    registered_name: []
    exception exit: closed
      in function  p1_fsm:init_it/6 (p1_fsm.erl, line 386)
    ancestors: [stun_tmp_sup,stun_sup,<0.473.0>]
    message_queue_len: 0
    messages: []
    links: [<0.478.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 28
    reductions: 1041
  neighbours:
2022-09-21 03:55:58.672469+00:00 [info] Connection reset by peer [TCP, session kt62aprd74lw, user 1663742530, client XXX.XX.XXX.XX:10330]

eturnal.yml

listen:
    -
      ip: "::"
      port: 80
      transport: udp
    -
     ip: "::"
     port: 80
     transport: auto
    -
      ip: "::"
      port: 443
      transport: tls

What I'm doing wrong?

licaon-kter commented 2 years ago

OS? eturnal version? How did you install?

matiaslopezd commented 2 years ago

@licaon-kter on Ubuntu 22 TLS with systemd to control the service, using the latest 10.0.1.

More info about my installation: https://github.com/processone/eturnal/issues/32

weiss commented 2 years ago

What I'm doing wrong?

Nothing, that's a little bug which is triggered when transport: auto is used: If the client closes the connection while eturnal is still trying to figure out whether or not it's TLS-encrypted, that ugly message is logged. (The actual behavior is fine, so you can just ignore it.)

I'll fix the logging, thanks.