dani-garcia / vaultwarden

Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs
GNU Affero General Public License v3.0
36.78k stars 1.79k forks source link

Error in Mariadb logs, What does it mean? #605

Closed BobWs closed 3 years ago

BobWs commented 5 years ago

Hi,

Any idea what this error message mean:

`2019-09-05 22:35:18 42 [Warning] Aborted connection 42 to db: 'bitwarden' user: 'bitwarden' host: '172.17.0.4' (Got an error reading communication packets) stderr

I'm getting it with the bitwardenrs-myslq server and mariadb latest

mikey242 commented 5 years ago

I'm not sure if this is related but I get a similar error when restarting my server:

Aborted connection 1359 to db: 'bitwarden' user: 'bitwarden' host: '172.30.0.3' (Got timeout reading communication packets)

It's easily remedied by just restarting the mysql database.

BobWs commented 5 years ago

I'm not sure if this is related but I get a similar error when restarting my server:

Aborted connection 1359 to db: 'bitwarden' user: 'bitwarden' host: '172.30.0.3' (Got timeout reading communication packets)

It's easily remedied by just restarting the mysql database.

Thanks! Look indeed similar. I will give it a try, restarting the mariadb database.

BobWs commented 4 years ago

Error messages still there, they disappear when restarting mariadb but after a while it returns.

dearekaelle commented 4 years ago

after migrating my sqlite to mariadb, I am having the same issue.

BobWs commented 4 years ago

The Error is still there. Restating doesn't it just a short term solution

dani-garcia commented 4 years ago

Does this cause any problems? It seems only a warning according to the message, maybe diesel doesn't close the connections correctly before dropping them.

dearekaelle commented 4 years ago

I have not noticed any functional issues or otherwise. bitwarden_rs with all the apps seems to be working well despite the warnings in the db logs.

BobWs commented 4 years ago

No issues as far as I can see. Just a warning in the log

random-issue commented 4 years ago

From the bitwarden_rs perspective it looks like it's performing just fine. But it does look like whatever is managing db connections is closing them incorrectly. I haven't had much time to dig into where in bitwarden_rs code this is taking place, if it is diesel, but some information I found (some are older than others, but it seems the first point from the first article would match): https://www.percona.com/blog/2016/05/16/mysql-got-an-error-reading-communication-packet-errors/ https://stackoverflow.com/q/23689803 https://dev.mysql.com/doc/refman/8.0/en/communication-errors.html

BlackDex commented 3 years ago

It would also be a good check to see if there are many sleeping connections for example. It could also very well be an issue with the network (docker overlay/proxy). Or some mysql/mariadb tweaks which could be done to tweak this.

BlackDex commented 3 years ago

Please reopen if this persist

andreymal commented 2 years ago

@BlackDex @dani-garcia it's still present with 1.23.1

Even if everything works fine, these messages are a little annoying because they are red :)

vaultwarden-warn

fgionghi commented 1 year ago

I have the same error, I'm not able to solve this and it's affecting vaultwarden functionality: I can not restore a db backup, I cannot register new users, but I can create a new item correctly. I tried to set some parameters to high values to testing: --max_connections=1000 --interactive-timeout=31536000 --wait-timeout=31536000 and in the config file: [mysqld] max_allowed_packet=800M innodb_log_buffer_size = 60M innodb_log_file_size = 5000M

Keep having the same error message (2023-06-07 12:57:15 2517 [Warning] Aborted connection 2517 to db: 'vaultwarden' user: 'vaultwarden' host: '10.193.4.80' (Got an error reading communication packets))

I'm on kuberntes and using bitnami/mariadb:10.11.2-debian-11-r9 as db and vaultwarden/server:1.28.1

KhangCoffee commented 1 month ago

I also had the same problem with zabbix when changing the path from /var/lib/mysql to /home/lib/mysql. If I switch back to /var/lib/mysql it works fine again. 1q

BlackDex commented 1 month ago

That might be either systemd which has some path protections in the services. Or other auditing tools like SELinux or apparmor.