AWS DMS遇到 Error : no handler found for uri

问题描述:

当我按照文档[1]配置AWS DMS 目标端为OpenSearch, 并进行数据迁移的时候,我遇到了如下报错:

00015696: 2024-07-31T03:26:57 [TARGET_LOAD     ]E:  Elasticsearch:FAILED SourceTable:test TargetIndex:test Operation:INSERT_ENTRY
RecordPKKey:15 RecordPKID:E629FA6598D732768F7C726B4B621285F9C3B85303900AA912017DB7617D8BDBES HttpCode:400 ESErrorResponse: 
{"error":"no handler found for uri [/test/doc/E629FA6598D732768F7C726B4B621285F9C3B85303900AA912017DB7617D8BDB] and method [PUT]"} [1026400]  (elasticsearch_utils.c:668)

我检查了跟文档中的描述没什么问题,那么为什么我会遇到这个报错呢?

分析过程 及 解决方案:

1. 首先,从报错[TARGET_LOAD] 部分就可以看到,整个任务在Fullload阶段就失败了,连Index都没创建出来,根本没到CDC阶段。

**2.**我们看到这个failure信息是这样:/test/doc, 这边给了我们启示:

我们在Endpoint Settings里加了这样一项:useNewMappingType=true

这个设置在文档[2]中有提及:

UseNewMappingType

Set this option to true for DMS to migrate documentation using the documentation type _doc. OpenSearch and an Elasticsearch cluster only support the _doc documentation type in versions 7. x and later. The default value is false.

Type: Boolean

所以其实是因为我们的目标端OpenSearch/ElasticSearch版本高于7.*, 所以DMS在查数据的时候,必须插入为/test/_doc, 而不是/test/doc.

在加上这个设置以后,问题迎刃而解。

参考文档:

[1] 使用 Amazon OpenSearch Service 集群作为 Amazon Database Migration Service 的目标 - Amazon 数据库迁移服务

[2] ElasticsearchSettings - Amazon Database Migration Service

相关推荐
攻城狮的梦8 分钟前
redis集群模式连接
数据库·redis·缓存
标贝科技41 分钟前
ChatGPT对话训练数据采集渠道有哪些
数据库·人工智能·机器学习·chatgpt
乌啼霜满天2491 小时前
如何将MySQL卸载干净(win11)
数据库·mysql
2的n次方_1 小时前
掌握Spring Boot数据库集成:用JPA和Hibernate构建高效数据交互与版本控制
数据库·spring boot·hibernate
NaZiMeKiY2 小时前
SQLServer数据分页
数据库·sql·sqlserver
Python私教2 小时前
Python国产新 ORM 框架 fastzdp_sqlmodel 快速入门教程
java·数据库·python
孟章豪2 小时前
SQL Server全方位指南:从入门到高级详解
数据库
数分大拿的Statham2 小时前
PostgreSQL中的regexp_split_to_table函数详解,拆分字段为多行
大数据·数据库·postgresql·数据分析·数据清洗
mqiqe2 小时前
PostgreSQL主备环境配置
数据库·postgresql
码爸2 小时前
java 执行es中的sql
java·sql·elasticsearch