I am upgrading filebeat from version 1.0.0 to 6.2.3. I have the process just about ready to go against a group of machines, but filebeat 6.2.3 fails to start with the full error:
Exiting: Could not start registrar: Error loading state: Error decoding states: json: cannot unmarshal object into Go value of type []file.State
Reading through the discussions on here it seems like the consensus was to delete the registry file and try again. That works in starting the service, but is that a safe procedure to do? Is there another option?
Deleting the registry file means filebeat will have to restart all over. The registry file keeps the file states, like last lines being read. If this file is removed, all old logs will be published again.
Filebeat 1.0.0 is EOL for quite some time. But if you want to migrate, you will have to use 5.0 first. The registry format has changed between 1.x and 5.x, but on first start of 5.0, the file will be converted. Using the new file, you can upgrade to 6.x.
If you can life with old logs being published again, just deleting the registry file is the easier option here.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.