-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL plugin: received error partial write #5055
Comments
Although mariadb and mysql are similar, they are not identical. I would not expect flawless upgrades with such large version (and server) changes. You can configure your influx output to write to a different database/retention policy or drop the old data so the new fields will be correct |
Thanks for the recommendation, I was not 100% sure what would be a good workaround. I just wanted to let you know about this in case you plan compatibility with MariaDB as well. I will update the ticket with information regarding the newest MariaDB version, maybe its useful for others as well. |
I think since it is the same plugin it should send data with the same type. Let's research why this is happening and we can make a better determination if a fix is appropriate. |
I executed
|
I know this plugin makes multiple measurements, is it still complaining |
Yes, it complains only on mysql and field ssl_ctx_verify_depth, which has a very high (unusual/not integer ?) value, as you can see in the file output above. https://mariadb.com/kb/en/library/ssltls-status-variables/#ssl_ctx_verify_depth |
Might be worth turning off Telegraf for a minute and making sure it is deleted on the InfluxDB side by trying to add it back in manually:
Unless Telegraf is emitting this field multiple times with differing types then it should have conflicts anymore, unless it has not been removed from InfluxDB completely. BTW the value is the maximum unsigned 64-bit integer. |
Maybe I don't understand that completely, but didn't you mention above, that the plugin outputs the field always with the same type (integer). If so, then there sould be an 'i' in the end of the value, isn't it ? Or does the plugin figure the data types dynamically (depending on DB variant or version) ? As I understood InfluxDB cannot write to fields with differing datatypes in the same shard. I don't understand the differing values in the DB. Also I found this error in the logs (MariaDB 10.3 slave):
Here on MySQL and MariaDB the variable in the DB is a string. Why does the plugin try to output an integer ? |
Also I stopped all telegraf mysql inputs and dropped the measurement again and waited a minute. Then I started telegraf on the MariaDB-Master and get the same error. So I guess there must be something setting up the field as integer and later the plugin tries to send float. Maybe something like this interfering here ? I have IDB 1.6.4 Starting with not existing measurement mysql:
After that the measurement mysql exists but
|
I have experienced this issue where measurements are not dropped immediately myself as well, but I'm not sure exactly how to convince it to drop the measurement. It usually clears up for me after a few minutes, or perhaps after restarting InfluxDB, but here is the related issue: influxdata/influxdb#9694. It sounds like perhaps it is fixed in 1.7. Until that insert statement works the measurement is still not removed, so focus on that first. You will have to run |
Hi Daniel, |
Perhaps the plugin isn't strict enough and guesses the type. If a non-decimal number came through first, it would set the type as an integer in influx, but if a float came through it would guess that type and fail to insert. 🤔 |
Thats what it seems to me as well. I mean, dropping the measurement only helps, when the plugin/telegraf will send always the same field types in the future. But I use the plugin only for a couple of weeks on 2 different DB versions and what I see is that it sends different field types in at least 2 different cases. I don't really understand the code entirely, so how is it designed to be ? Must the plugin/telegraf always output the same field types or does the plugin "detect/discover" the field types and send dynamically depending on detection? Thats what seems to be the main question here. |
Also I described above that I have the case where the field type differs on 2 differnt hosts with the same DB version (MariaDB 10.3, have_openssl), what should not happen ? So maybe we can track this down, why the plugin thinks this field is integer on one host and string on the other ? |
In the case where you have 2 hosts with the same DB version but the field type is different what are the versions of Telegraf involved? |
1.10.0~a50fb5a2-0 (I tested because of memory leak) and 1.9.0-1 (latest) My third host (Ubuntu 14.04, MySQL 5.6, telegraf 1.9+1.10, now downgraded to telegraf 1.8.3) showed this before I downgraded: |
I ran into this issue on two of my servers with Running telegraf 1.8.3 |
received error partial write: field type conflict: input field "wsrep_local_index" on measurement "mysql" is type integer, already exists as type float dropped=2; discarding points Telegraf 1.12.6 |
received error partial write: field type conflict: input field "wsrep_local_send_queue_avg" on measurement "mysql" is type integer, already exists as type float dropped=1; discarding points
|
Wsrep is not fully supported by the Telegraf's MySQL plugin. I created an extended version of it here: https://github.com/go-extras/telegraf-mysql-wsrep |
Awesome @denisvmedia! I opened a PR #8219 to add it this plugin to our external plugins list. Let me know if you don't want us to list it.
|
@sjwang90 sure, you can list it. I was just thinking if I could provide a PR for the original plugin. What do you think, is it worth of doing or we keep it as an external plugin? |
Okay yeah it may be better to open a PR with the wsrep changes to the original plugin. I think a lot of people could use this feature. |
Fixes influxdata#8319, influxdata#5711, influxdata#5055, influxdata#7421 See influxdata#5529, influxdata#6624 This could be easily extended to fix influxdata#6671 as well
Fixes influxdata#8319, influxdata#5711, influxdata#5055, influxdata#7421 See influxdata#5529, influxdata#6624 This could be easily extended to fix influxdata#6671 as well
Hey @bolek2000, has your issue been resolved with #9403? And @debu99 @nbari @pprkut: Since #9401, numbers that are too big for int are parsed automatically as uint now. This probably applies to these variables:
There could technically be field type conflicts between int and uint now. However, if uint support isn't explicitly enabled, uints are capped to max int in the influx serializer. Another case is wsrep_local_send_queue_avg, which should be parsed as float according to https://galeracluster.com/library/documentation/galera-status-variables.html#wsrep-local-send-queue-avg The best solution is to add variables to this mapping, so they always have the same time. Edit: After reading the TokuDB Docs, I don't think these variable values are correct. This would be a buffer size in the exabytes. This is probably an integer underflow, e.g. uint = 0, uint - 1 = 18446744073709551615, so an error in TokuDB. You could ignore the field values as a quick fix. |
Just got the issue when upgrading from telegraf 1.20.2 to 1.20.4
And I use metrics v2 for a while now.
|
I've just been running into this issue. I have two docker containers running When restarting and therefore upgrading one of the containers to
I get this error:
Here is the mysql-part of my
The other container is still running with
and "only" logs
I have downgraded the "damaged" container to
so both containers have What is the way to fix this both? I am ready to upgrade the telegraf images to the newest (and fixed) tag. But I think I have to delete some stuff in the influxdb first. (Actually, this is |
I think the issue is the automatic type guessing of the mysql plugin. Please use the converter processor to enforce the datatypes you expect. |
Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you! |
Having Telegraf on both MariaDB and Mysql into the same InfluxDB measurement, i resolved it using the converter processor like that:
|
Relevant telegraf.conf:
System info:
Telegraf 1.9, Ubuntu 18.04, MariaDB 10.3
Steps to reproduce:
A couple of weeks ago I activated the mysql plugin the first time on an Ubuntu 14.04 host with MySQL 5.6.33 and telegraf 1.8 with the config above.
Then I eneabled the same config on the new host with newer versions.
Expected behavior:
no error messages
Actual behavior:
2018-11-28T20:51:40Z E! [outputs.influxdb]: when writing to [https://idb.example.com:8082]: received error partial write: field type conflict: input field "ssl_ctx_verify_depth" on measurement "mysql" is type float, already exists as type integer dropped=1; discarding points
The text was updated successfully, but these errors were encountered: