Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
K
kb
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • granite
  • kb
  • Wiki
    • Business_doc
  • maxwell常见错误处理

Last edited by fanzx Jan 22, 2024
Page history
This is an old version of this page. You can view the most recent version or browse the history.

maxwell常见错误处理

maxwell常见错误处理

通用

如果maxwell挂掉太长时间,positions表中记录的对应binlog文件已经被清理掉,可以去相应的实例上面show binary logs;查看存在的binlog文件信息,将positions表中对应实例的binlog_file字段改为最早的文件名,binlog_position改为0,然后启动maxwell。
注意:记录下maxwell挂掉的时间和启动后生成的第一天信息的update_time时间,然后手动更新监控的mysql表中对应区间的数据产生binlog,找回丢失数据。
update bdp_company.company_contact_details set update_time = update_time + INTERVAL 1 SECOND where update_time between '2022-03-25 01:03:12' and '2022-03-25 10:18:00';

ERROR Maxwell - Maxwell couldn't find the requested binlog, exiting...

原因:一般出现在关闭maxwell一段时间后启动maxwell时,由于记录的binlog文件已被自动删除;有时当很大批量的binlog日志写入时maxwell会缓存下来处理不过来的binlog至文件系统,而当其处理完文件系统的缓存后由于binlog存储空间不足记录的原始位置的binlog文件已被删除,也会出现这个错误
处理方法:调整binlog的存储空间和删除模式,手动修改maxwell的元数据库中的positions表中对应client_id的binlog_file和binlog_position的值
update maxwell.positions set binlog_file = 'mysql-bin.005302',binlog_position = 0 where client_id = 'bdp-rds-003.mysql.rds.aliyuncs.com';

java.lang.RuntimeException: Couldn't find database mysql

原因:账户没有mysql库的访问权限,上游修改了mysql库里的表
处理方法:最优方法是给maxwell使用的用户对应的权限;临时的方法是在maxwell的元数据库中的tables表中插入对应的表的信息,注意对应的database_id
例如:
INSERT INTO maxwell.tables (id, schema_id, database_id, name, charset, pk) VALUES (727, 1092, 54, 'user', 'utf8', 'Host,User');

com.github.shyiko.mysql.binlog.network.ServerException: Could not find first log file name in binary log index file

原因:reset master或者binlog文件更名导致找不到记录的binlog文件等
处理方法:手动修正positions表中对应实例的binlog信息,或者清空/删除maxwell库重建
Clone repository
  • README
  • basic_guidelines
  • basic_guidelines
    • basic_guidelines
    • dev_guide
    • project_build
    • 开发流程
  • best_practice
  • best_practice
    • AlterTable
    • RDS
    • azkaban
    • create_table
    • design
    • elasticsearch
    • elasticsearch
      • ES运维
    • logstash
View All Pages