gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.5k stars 552 forks source link

[Bug]: mq docker logs are filled with useless logging #2677

Open saket424 opened 12 months ago

saket424 commented 12 months ago

Contact Details

asetlur13@gmail.com

What happened?

The mq docker logs are rolling in this kinda stuff. How do we suppress this message

1700315983: Client c5e851b7-b421-495c-940f-c8057e5f7351 closed its connection. 1700315986: Client 0ef4f9e4-b3c0-4a24-bbe9-a139e1282694 closed its connection. 1700315986: Client 39660c8f-ac15-46fb-b7d7-132be684d14b closed its connection. 1700315986: Client 39660c8f-ac15-46fb-b7d7-132be684d14b closed its connection. 1700315987: Client 0ef4f9e4-b3c0-4a24-bbe9-a139e1282694 closed its connection. 1700315987: Client 4696272c-e211-4a29-90f6-ed6892172c20 closed its connection. 1700315988: Client 4696272c-e211-4a29-90f6-ed6892172c20 closed its connection. 1700315988: Client c5e851b7-b421-495c-940f-c8057e5f7351 closed its connection. 1700315988: Client 46195bc8-2e97-41a7-a757-21426f5f880a closed its connection. 1700315988: Client c5e851b7-b421-495c-940f-c8057e5f7351 closed its connection. 1700315990: Client 46195bc8-2e97-41a7-a757-21426f5f880a closed its connection. 1700315991: Client 39660c8f-ac15-46fb-b7d7-132be684d14b closed its connection. 1700315991: Client 0ef4f9e4-b3c0-4a24-bbe9-a139e1282694 closed its connection. 1700315991: Client 39660c8f-ac15-46fb-b7d7-132be684d14b closed its connection.

Version

v0.21.1

What OS are you using?

Linux

Relevant log output

See above

Contributing guidelines

pernetz commented 11 months ago

Contact Details

lucas@eicloud.berlin

What happened? Same finding within my mq logs. Interestingly it refers only a single client ID throughout the log file.

1700559340: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559340: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559344: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559344: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559349: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559349: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559353: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559353: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559357: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559358: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559362: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection. 1700559362: Client 02fe243d-f11c-43d5-9abd-a5012ec8332c closed its connection.

Version v0.21.2

What OS are you using? Linux

eddiewang commented 11 months ago

experiencing this as well - did any of you manage to debug the root cause?

saket424 commented 9 months ago

I upgraded to v0.22.0 and am still seeing stale connections that fill up the mq log. Not sure why the stale connections continue to be logged every 4-5 seconds even after a clean start of mq

REPOSITORY TAG IMAGE ID CREATED SIZE gravitl/netmaker-ui v0.22.0 4665bc70ba25 17 hours ago 52.9MB gravitl/netmaker v0.22.0 809850c249d8 17 hours ago 20.8MB portainer/portainer-ce latest 7536f6a42542 2 months ago 294MB eclipse-mosquitto 2.0.15-openssl e94a611cbcdf 5 months ago 8.88MB gravitl/turnserver v1.0.0 54f634c6010e 8 months ago 13.5MB coredns/coredns 1.10.1 ead0a4a53df8 11 months ago 53.6MB caddy 2.6.2 006d393a4e6a 15 months ago 46.8MB

root@pve-mlionm:~# docker logs mq Starting MQ... 1705573539: mosquitto version 2.0.15 starting 1705573539: Config loaded from /mosquitto/config/mosquitto.conf. 1705573539: Opening websockets listen socket on port 8883. 1705573539: Opening websockets listen socket on port 1883. 1705573539: mosquitto version 2.0.15 running 1705573539: New client connected from xxx.23.233.120:0 as f9eb9a81-8d8d-4765-97c5-bfa3be5895f5 (p2, c1, k10, u'netmaker'). 1705573539: New client connected from xxx.245.79.249:0 as e2570696-2107-4df6-86cf-880ff7bee0d5 (p2, c1, k10, u'netmaker'). 1705573540: New client connected from xxx.216.247.16:0 as 5e10713b-8012-4dde-b6da-bde62951afbb (p2, c1, k10, u'netmaker'). 1705573540: Client 79b3db54-1c15-409f-867c-5a01da344d84 closed its connection. 1705573540: New client connected from xxx.59.200.108:0 as d95cd3bf-2e60-4d70-8700-3f6c800e2a8a (p2, c1, k10, u'netmaker'). 1705573540: Client 79b3db54-1c15-409f-867c-5a01da344d84 closed its connection. 1705573540: New client connected from xxx.7.45.130:0 as 25ac4d7e-79a9-464e-9e70-f063845af247 (p2, c1, k10, u'netmaker'). 1705573544: Client 79b3db54-1c15-409f-867c-5a01da344d84 closed its connection. 1705573544: Client 79b3db54-1c15-409f-867c-5a01da344d84 closed its connection. 1705573545: New client connected from ::ffff:172.20.0.2:54488 as KD3I57RRRVSPCT4YXKHAXQJ (p2, c1, k60, u'netmaker'). 1705573548: Client 79b3db54-1c15-409f-867c-5a01da344d84 closed its connection. 1705573548: Client 79b3db54-1c15-409f-867c-5a01da344d84 closed its connection. 1705573553: Client 79b3db54-1c15-409f-867c-5a01da344d84 closed its connection. 1705573553: Client 79b3db54-1c15-409f-867c-5a01da344d84 closed its connection.

Aceix commented 9 months ago

to adjust the mq logging, drop into a shell and edit the mosquitto config file, then restart

Perform these on your server:

  1. docker exec -it mq /bin/sh
  2. vi /mosquitto/config/mosquitto.conf
  3. add/edit this line log_type error, warning, notice, information
  4. Save and quit
  5. Restart container: docker restart mq

(Step 3) Change the list of log types to exclude/include those you want to log. Available types are: debug error warning notice information subscribe unsubscribe websockets none all