Lots of Sockets Are In Use By Turnserver With No Active Sessions

Recently one of us noticed that the process

1 21361 21361 21361 ?           -1 Ss     106   0:00 /usr/sbin/uuidd --socket-activation

Was generating lots of sockets of different kinds when no active meetings are in place:

sudo netstat --all --program | grep ‘2278’ | wc -l

tcp        0      0 reverse-ip:5349 0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 reverse-ip:5349 0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 localhost:5349          0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 localhost:5349          0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 localhost:5349          0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 reverse-ip:5349 0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 localhost:5349          0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 reverse-ip:5350 0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 reverse-ip:5350 0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 reverse-ip:5350 0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 localhost:5350          0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 localhost:5350          0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 localhost:5350          0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 reverse-ip:5350 0.0.0.0:*               LISTEN      2278/turnserver     
tcp        0      0 localhost:5350          0.0.0.0:*               LISTEN      2278/turnserver     
tcp6       0      0 localhost:5349          [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5349           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 localhost:5349          [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 localhost:5349          [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 localhost:5349          [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5349           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5349           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5349           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5349           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5349           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5349           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5349           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 localhost:5350          [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 localhost:5350          [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 localhost:5350          [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 localhost:5350          [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5350           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5350           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5350           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5350           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5350           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5350           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5350           [::]:*                  LISTEN      2278/turnserver     
tcp6       0      0 server:5350           [::]:*                  LISTEN      2278/turnserver     
sctp                server:5349                                   LISTEN      2278/turnserver     
sctp                server:5349                                   LISTEN      2278/turnserver     
sctp                server:5349                                   LISTEN      2278/turnserver     
sctp                server:5349                                   LISTEN      2278/turnserver     
sctp                server:5349                                   LISTEN      2278/turnserver     
sctp                server:5349                                   LISTEN      2278/turnserver     
sctp                server:5349                                   LISTEN      2278/turnserver     
sctp                localhost:5349                                  LISTEN      2278/turnserver     
sctp                localhost:5349                                  LISTEN      2278/turnserver     
sctp                localhost:5349                                  LISTEN      2278/turnserver     
sctp                reverse-ip:5349 LISTEN      2278/turnserver     
sctp                reverse-ip:5349 LISTEN      2278/turnserver     
sctp                reverse-ip:5349 LISTEN      2278/turnserver     
sctp                server:5349                                   LISTEN      2278/turnserver     
sctp                localhost:5349                                  LISTEN      2278/turnserver     
sctp                localhost:5349                                  LISTEN      2278/turnserver     
sctp                localhost:5349                                  LISTEN      2278/turnserver     
sctp                localhost:5349                                  LISTEN      2278/turnserver     
sctp                reverse-ip:5349 LISTEN      2278/turnserver     
sctp                localhost:5349                                  LISTEN      2278/turnserver     
sctp                server:5350                                   LISTEN      2278/turnserver     
sctp                server:5350                                   LISTEN      2278/turnserver     
sctp                server:5350                                   LISTEN      2278/turnserver     
sctp                server:5350                                   LISTEN      2278/turnserver     
sctp                server:5350                                   LISTEN      2278/turnserver     
sctp                server:5350                                   LISTEN      2278/turnserver     
sctp                server:5350                                   LISTEN      2278/turnserver     
sctp                server:5350                                   LISTEN      2278/turnserver     
sctp                localhost:5350                                  LISTEN      2278/turnserver     
sctp                localhost:5350                                  LISTEN      2278/turnserver     
sctp                localhost:5350                                  LISTEN      2278/turnserver     
sctp                reverse-ip:5350 LISTEN      2278/turnserver     
sctp                reverse-ip:5350 LISTEN      2278/turnserver     
sctp                reverse-ip:5350 LISTEN      2278/turnserver     
sctp                localhost:5350                                  LISTEN      2278/turnserver     
sctp                localhost:5350                                  LISTEN      2278/turnserver     
sctp                localhost:5350                                  LISTEN      2278/turnserver     
sctp                localhost:5350                                  LISTEN      2278/turnserver     
sctp                reverse-ip:5350 LISTEN      2278/turnserver     
sctp                localhost:5350                                  LISTEN      2278/turnserver     
udp        0      0 reverse-ip:3478 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:3478 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:3478 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:3478 0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:3478          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:3478          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:3478          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:3478          0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:3479 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:3479 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:3479 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:3479 0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:3479          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:3479          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:3479          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:3479          0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:5349 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:5349 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:5349 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:5349 0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:5349          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:5349          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:5349          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:5349          0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:5350 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:5350 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:5350 0.0.0.0:*                           2278/turnserver     
udp        0      0 reverse-ip:5350 0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:5350          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:5350          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:5350          0.0.0.0:*                           2278/turnserver     
udp        0      0 localhost:5350          0.0.0.0:*                           2278/turnserver     
udp6       0      0 localhost:3478          [::]:*                              2278/turnserver     
udp6       0      0 localhost:3478          [::]:*                              2278/turnserver     
udp6       0      0 localhost:3478          [::]:*                              2278/turnserver     
udp6       0      0 localhost:3478          [::]:*                              2278/turnserver     
udp6       0      0 server:3478           [::]:*                              2278/turnserver     
udp6       0      0 server:3478           [::]:*                              2278/turnserver     
udp6       0      0 server:3478           [::]:*                              2278/turnserver     
udp6       0      0 server:3478           [::]:*                              2278/turnserver     
udp6       0      0 server:3478           [::]:*                              2278/turnserver     
udp6       0      0 server:3478           [::]:*                              2278/turnserver     
udp6       0      0 server:3478           [::]:*                              2278/turnserver     
udp6       0      0 server:3478           [::]:*                              2278/turnserver     
udp6       0      0 localhost:3479          [::]:*                              2278/turnserver     
udp6       0      0 localhost:3479          [::]:*                              2278/turnserver     
udp6       0      0 localhost:3479          [::]:*                              2278/turnserver     
udp6       0      0 localhost:3479          [::]:*                              2278/turnserver     
udp6       0      0 server:3479           [::]:*                              2278/turnserver     
udp6       0      0 server:3479           [::]:*                              2278/turnserver     
udp6       0      0 server:3479           [::]:*                              2278/turnserver     
udp6       0      0 server:3479           [::]:*                              2278/turnserver     
udp6       0      0 server:3479           [::]:*                              2278/turnserver     
udp6       0      0 server:3479           [::]:*                              2278/turnserver     
udp6       0      0 server:3479           [::]:*                              2278/turnserver     
udp6       0      0 server:3479           [::]:*                              2278/turnserver     
udp6       0      0 localhost:5349          [::]:*                              2278/turnserver     
udp6       0      0 localhost:5349          [::]:*                              2278/turnserver     
udp6       0      0 localhost:5349          [::]:*                              2278/turnserver     
udp6       0      0 localhost:5349          [::]:*                              2278/turnserver     
udp6       0      0 server:5349           [::]:*                              2278/turnserver     
udp6       0      0 server:5349           [::]:*                              2278/turnserver     
udp6       0      0 server:5349           [::]:*                              2278/turnserver     
udp6       0      0 server:5349           [::]:*                              2278/turnserver     
udp6       0      0 server:5349           [::]:*                              2278/turnserver     
udp6       0      0 server:5349           [::]:*                              2278/turnserver     
udp6       0      0 server:5349           [::]:*                              2278/turnserver     
udp6       0      0 server:5349           [::]:*                              2278/turnserver     
udp6       0      0 localhost:5350          [::]:*                              2278/turnserver     
udp6       0      0 localhost:5350          [::]:*                              2278/turnserver     
udp6       0      0 localhost:5350          [::]:*                              2278/turnserver     
udp6       0      0 localhost:5350          [::]:*                              2278/turnserver     
udp6       0      0 server:5350           [::]:*                              2278/turnserver     
udp6       0      0 server:5350           [::]:*                              2278/turnserver     
udp6       0      0 server:5350           [::]:*                              2278/turnserver     
udp6       0      0 server:5350           [::]:*                              2278/turnserver     
udp6       0      0 server:5350           [::]:*                              2278/turnserver     
udp6       0      0 server:5350           [::]:*                              2278/turnserver     
udp6       0      0 server:5350           [::]:*                              2278/turnserver     
udp6       0      0 server:5350           [::]:*                              2278/turnserver     
unix  2      [ ]         DGRAM                    28399    2278/turnserver

We have three servers, two show this type of state, and one does not have the turnserver process active when no meetings are active.

There is a significant difference in their configuration, the two with this state have persistent rooms with preset passwords. I am less worried about this, but we were hoping for an acknowledgement that this would be expected behavior.

Config on the two machines: Persistent Passwords on Self Hosted Rooms

This is normal. These are the binded ports which are waiting (LISTEN) for incoming requests.

turnserver is very enthusiastic about listening on ports, by defaults if you ask it to listen on 3478 it will listens also on 3479, and so on. I have not seen this listening on sctp; a lot of these listen ports are certainly never used and unnecessary although as said it’s not an indication of hacking or anything, just of strange programming patterns.