0

I have a device that is sending data to my server every minute. (No DNS is runnig). when I start my device, I am getting a warning message.

[Warning] IP address '192.168.xx.xxx' could not be resolved: the host is not known.

then every minute I am getting following warning in my mysql log file. (of course new connection number every minute. this is one sample)

2019-05-15 11:12:00 840 [Warning] Aborted connection 840 to db: 'unconnected' user: 'root' host: '192.168.xx.xx' (Got an error reading communication packets).

Eventhough there is this warning, But my device is still posting data into mysql server every minute.

I don't know why this warning says db: 'unconnected'? Any suggestions. (I am using static IPs)

master_yoda
  • 111
  • 1
  • 2
  • Seems like your client doesn't close the connection properly. For the first warning: https://serverfault.com/questions/393862/mysql-warning-ip-address-could-not-be-resolved – Lenniey Aug 26 '19 at 10:20
  • i noticed following warnings as well. `[ERROR] mysqld.exe: Table '.\mysql\user' is marked as crashed and should be repaired` `[Warning] Checking table: '.\mysql\user'` `[ERROR] mysql.user: 1 client is using or hasn't closed the table properly` `[ERROR] mysqld.exe: Table '.\mysql\event' is marked as crashed and should be repaired` `[Warning] Checking table: '.\mysql\event'` '[ERROR] mysql.event: 1 client is using or hasn't closed the table properly` – master_yoda Aug 26 '19 at 10:30
  • ...which should answer your question. You have to cleanly close the connection from your 'device'. – Lenniey Aug 26 '19 at 10:32
  • @sunny_old_days - A crash led to those ERRORs. You should run `CHECK TABLE` and `REPAIR TABLE` on those tables. – Rick James Aug 26 '19 at 19:10

1 Answers1

0

Below are reasons for such errors.

1. The client connected successfully but terminated improperly (and may relate to not closing the connection properly)
2. The client slept for longer than the defined wait_timeout or interactive_timeout seconds (which ends up causing the connection to sleep for wait_timeout seconds and then the connection gets forcibly closed by the MySQL server)
3. The client terminated abnormally or exceeded the max_allowed_packet for queries

Hope this will help.

asktyagi
  • 2,401
  • 1
  • 5
  • 19