云服务器内容精选

  • 错误码 调用接口出错后,将不会返回结果数据。调用方可根据每个接口对应的错误码来定位错误原因。 当调用出错时,HTTP请求返回一个HTTP状态码。返回的消息体中是具体的错误编码及错误描述信息。 当您调用API时,如果遇到“APIGW”开头的错误码,请参见API网关错误码进行处理。 状态码 错误码 错误信息 描述 解决方案 400 DAS.200002 Frequent requests. 请求频繁。 请稍后再试。 400 DAS.200100 The parameter is invalid. 参数错误。 请检查参数是否正确。 400 DAS.200101 The start_at parameter is invalid. start_at参数错误。 请检查参数是否正确。 400 DAS.200102 The end_at parameter is invalid. end_at参数错误。 请检查参数是否正确。 400 DAS.200103 The offset parameter is invalid. offset参数错误。 请检查参数是否正确。 400 DAS.200104 The limit parameter is invalid. limit参数错误。 请检查参数是否正确。 400 DAS.200105 The order parameter is invalid. order参数错误。 请检查参数是否正确。 400 DAS.200106 The order_by parameter is invalid. order_by参数错误。 请检查参数是否正确。 400 DAS.200107 The datastore_type is invalid. datastore_type参数错误。 请检查参数是否正确。 400 DAS.200108 The database value is invalid! database参数错误。 请检查参数是否正确。 400 DAS.200109 The script value is invalid! script参数错误。 请检查参数是否正确。 400 DAS.200110 The lock_status value is invalid! lock_status参数无效。 请检查参数是否正确。 400 DAS.200111 The lock_type value is invalid! lock_type参数错误。 请检查参数是否正确。 400 DAS.200112 The db_user_id value is invalid! db_user_id参数错误。 请检查参数是否正确。 400 DAS.200113 The project_id parameter is invalid. project_id参数错误。 请检查参数是否正确。 400 DAS.200114 The instance_id parameter is invalid. instance_id参数错误。 请检查参数是否正确。 400 DAS.200115 The parameter of DeleteProcess is invalid! 查杀会话参数错误。 请检查参数是否正确。 400 DAS.200116 The type parameter is invalid. type参数错误。 请检查参数是否正确。 400 DAS.200117 The status parameter is invalid. status参数错误 请检查参数是否正确。 400 DAS.200118 The retention_days parameter is invalid. retention_days参数错误 请检查参数是否正确。 400 DAS.200119 The object_type parameter is invalid. object_type参数错误。 请检查参数是否正确。 400 DAS.200120 This API is only available for paid instances. 该API仅对付费实例可用。 请购买云DBA收费版并将当前实例设置为付费实例。 400 DAS.200121 The marker is only valid for three minutes. If the expiration time is exceeded, please re export. marker仅三分钟内有效,如超过有效时间,请重新导出。 请重新导出。 400 DAS.220002 Failed to connect to the database. 连接数据库异常。 请确认实例是否正常,数据库用户名和密码是否正确。 400 DAS.220003 The database user does not exist. 数据库用户不存在。 请检查参数是否正确。 400 DAS.220004 The database user already exists. 数据库用户已存在。 请检查数据库用户是否已经存在。 400 DAS.220029 Failed to operate the SQL limit switch. 操作SQL限流开关失败。 请根据error_msg提供的具体信息进行处理。 400 DAS.220030 Failed to operate the SQL limit rules. 操作SQL限流规则失败。 请根据error_msg提供的具体信息进行处理。 403 DAS.200050 Invalid token. token不合法。 请检查token是否正确,或者重新获取token后再试。 403 DAS.200051 Authentication failed. 鉴权失败。 请检查是否有权限。 500 DAS.200001 Internal service error. 内部服务异常。 请联系客服处理。 500 DAS.200003 Internal service invoking error. 内部服务调用异常。 请联系客服处理。 500 DAS.220005 Failed to kill process. kill会话失败。 请根据error_msg提供的具体信息进行处理。 500 DAS.220006 Failed to Query Metadata Locks. 查询元数据锁失败。 请根据error_msg提供的具体信息进行处理。 500 DAS.220007 Failed to query InnoDB locks. 查询InnoDB锁等待失败。 请根据error_msg提供的具体信息进行处理。 500 DAS.220008 Failed to query process list. 查询实例会话失败。 请根据error_msg提供的具体信息进行处理。 500 DAS.220009 Failed to query SQL execution plan. 查询SQL执行计划失败。 请根据error_msg提供的具体信息进行处理。 500 DAS.220010 Failed to list slow query logs. 获取慢SQL明细失败。 请根据error_msg提供的具体信息进行处理。 500 DAS.220011 Failed to list SQL statements. 获取全量SQL失败 请根据error_msg提供的具体信息进行处理。 500 DAS.220012 Failed to enable/disable DAS SQL explorer. 开启/关闭DAS收集全量SQL失败 请重试。 500 DAS.220013 Failed to enable/disable DAS Slow Query Log. 开启/关闭DAS收集慢日志失败 请重试。 500 DAS.220014 Failed to query the status. 查询开关开启状态失败 请根据error_msg提供的具体信息进行处理。 500 DAS.220015 Failed to query space analysis data. 查询空间分析数据失败。 请根据error_msg提供的具体信息进行处理。 500 DAS.220016 Failed to execute the space analysis task. 执行空间分析任务失败。 请检查此实例是否已经录入数据库账号。 500 DAS.220017 The switch is not enabled. DAS收集日志的开关未打开。 请打开开关。 500 DAS.220065 Failed to turn on/off the DAS transaction switch. DAS开启/关闭历史事务开关失败。 请根据error_msg提供的具体信息进行处理。 500 DAS.220066 Failed to query the DAS historical transaction switch. DAS查询历史事务开关状态失败。 请根据error_msg提供的具体信息进行处理。 500 DAS.220067 Failed to query the DAS historical transaction list. DAS查询历史事务列表失败。 请根据error_msg提供的具体信息进行处理。 父主题: 附录
  • 华为云配置信息说明 VPN网关IP:11.11.11.11 VPC子网:192.168.10.0/24,192.168.20.0/24 客户侧网关IP:22.22.22.22 客户侧子网:172.16.10.0/24,172.16.20.0/24,172.16.30.0/24 协商策略详情: 一阶段策略(IKE Policy) 认证算法(Authentication Algorithm): sha2-256 加密算法(Encryption Algorithm): aes-128 版本(Version): v2 DH算法(DH Algorithm ): group14 生命周期(Life Cycle): 86400 二阶段策略(IPsec Policy) 传输协议(Transfer Protocol): esp 认证算法(Authentication Algorithm): sha2-256 加密算法(Encryption Algorithm): aes-128 完美前向安全(PFS):DH-group14 生命周期(Life Cycle): 86400
  • 客户侧设备组网与基础配置假设 假定客户侧基础网络配置如下: 内网接口:GigabitEthernet1/0/0 所属zone为Trust,接口IP为10.0.0.1/30。 预进行加密传输的子网为172.16.10.0/24,172.16.20.0/24,172.16.30.0/24,所属zone为Trust。 外网接口:GigabitEthernet1/0/1 所属zone为Untrust,接口IP为22.22.22.22/24。 缺省路由:目标网段0.0.0.0/0 出接口GE1/0/1,下一跳为GE1/0/1的网关IP为22.22.22.1。 安全策略:Trust访问Untrust,源地址、目标地址及服务均为any,动作放行。 NAT策略:源地址为内网网段,目标地址为ANY,动作为EasyIP,即转换为接口IP。 基础配置命令行示意如下: interface GigabitEthernet1/0/0 ip address 10.0.0.1 255.255.255.252 # interface GigabitEthernet1/0/1 ip address 22.22.22.22 255.255.255.0 # ip route-static 0.0.0.0 0.0.0.0 22.22.22.1 ip route-static 172.16.10.0 255.255.255.0 10.0.0.2 ip route-static 172.16.20.0 255.255.255.0 10.0.0.2 ip route-static 172.16.30.0 255.255.255.0 10.0.0.2 # firewall zone trust set priority 85 import interface GigabitEthernet1/0/0 # firewall zone untrust set priority 5 import interface GigabitEthernet1/0/1 # ip address-set Customer-subnet172.16.10.0/24 type object address 0 172.16.10.0 mask 24 # ip address-set Customer-subnet172.16.20.0/24 type object address 0 172.16.20.0 mask 24 # ip address-set Customer-subnet172.16.30.0/24 type object address 0 172.16.30.0 mask 24 # security-policy rule name Policy-Internet policy logging session logging source-zone trust destination-zone untrust action permit # nat-policy rule name Snat_Internet source-zone trust egress-interface GigabitEthernet1/0/1 action nat easy-ip
  • IPsec配置指引 WEB页面VPN配置过程说明: 登录设备WEB管理界面,在导航栏中选择“网络 > IPsec”,选择新建IPsec策略。 基本配置:命名策略,选择出接口为本端接口,本端地址为出接口公网IP,对端地址为华为云VPN网关IP,认证方式选择预共享密钥,密钥信息与华为云配置一致,本端ID及对端ID均选择IP地址。 待加密数据流:新建配置,源地址为客户侧子网网段,目标地址为华为云子网网段,多条子网请分开填写,填写的条目数为两端子网数量的乘积,协议选择any,动作允许。 安全提议:IKE参数与IPsec参数与华为云配置一致,注意IKE版本只勾选与华为云匹配的选项,推荐开启周期性DPD检测。 安全策略:添加客户侧私网网段与华为云私网网段互访的安全策略,服务为ANY,动作允许,推荐置顶这两条安全策略规则。 NAT策略:添加源地址为客户侧私网网段,目标为华为云私网网段动作为不做转换的nat规则,并将该规则置顶。 安全策略中需要添加本地公网IP与华为云网关IP的互访规则,协议为UDP的500、4500和IP协议ESP与AH,确保协商流和加密流数据正常传输。 不可以将公网IP的协商流进行NAT转发,必须确保本地公网IP访问华为云的流量不被NAT。 确保访问目标子网的路由指向公网出接口下一跳。 待加密数据流的网段请填写真实IP和掩码,请勿调用地址对象。 若客户侧网络存在多出口时,请确保客户侧访问华为云VPN网关IP及私网网段从建立连接的公网出口流出,推荐使用静态路由配置选择出口网络。 命令行配置说明: #增加地址对象 ip address-set HWCloud_subnet192.168.10.0/24 type object address 0 192.168.10.0 mask 24 # ip address-set HWCloud_subnet192.168.20.0/24 type object address 0 192.168.20.0 mask 24 #配置一阶段提议,ike v1与ike v2的配置方式相同,ikev1使用认证、加密,ikev2使用加密、完整性、prf ike proposal 100 authentication-algorithm sha2-256 encryption-algorithm aes-128 authentication-method pre-share integrity-algorithm hmac-sha2-256 prf hmac-sha2-256 dh group14 sa duration 86400 #配置对等体,指定版本,调用一阶段提议(undo version 2时需要配置exchange-mode参数) ike peer IKE-PEER undo version 1 pre-shared-key ****** ike-proposal 100 remote-address 11.11.11.11 dpd type periodic #配置感兴趣流 acl number 3999 rule 0 permit ip source 172.16.10.0 0.0.0.255 destination 192.168.10.0 0.0.0.255 rule 1 permit ip source 172.16.20.0 0.0.0.255 destination 192.168.10.0 0.0.0.255 rule 2 permit ip source 172.16.30.0 0.0.0.255 destination 192.168.10.0 0.0.0.255 rule 4 permit ip source 172.16.10.0 0.0.0.255 destination 192.168.20.0 0.0.0.255 rule 5 permit ip source 172.16.20.0 0.0.0.255 destination 192.168.20.0 0.0.0.255 rule 6 permit ip source 172.16.30.0 0.0.0.255 destination 192.168.20.0 0.0.0.255 #配置二阶段提议 IPsec proposal IPsec-PH2 transform esp encapsulation-mode tunnel esp authentication-algorithm sha2-256 esp encryption-algorithm aes-128 #配置IPsec policy,调用ike peer、二阶段提议、ACL,注意PFS配置 IPsec policy IPsec-HW 1 isakmp proposal IPsec-PH2 security acl 3999 ike-peer IKE-PEER tunnel local 22.22.22.22 pfs dh-group14 sa duration time-based 3600 #全局配置,设定TCP分片大小 firewall tcp-mss 1300 #IPsec policy 绑定接口 interface GigabitEthernet1/0/1 ip address B.B.B.Y 255.255.255.0 IPsec apply policy IPsec-HW # security-policy rule name IPsec-OUT policy logging session logging source-zone trust destination-zone untrust source-address address-set Customer-subnet172.16.10.0/24 source-address address-set Customer-subnet172.16.20.0/24 source-address address-set Customer-subnet172.16.30.0/24 destination-address address-set HWCloud_subnet192.168.10.0/24 destination-address address-set HWCloud_subnet192.168.20.0/24 action permit rule name IPsec-IN policy logging session logging source-zone untrust destination-zone trust source-address address-set HWCloud_subnet192.168.10.0/24 source-address address-set HWCloud_subnet192.168.20.0/24 destination-address address-set Customer-subnet172.16.10.0/24 destination-address address-set Customer-subnet172.16.20.0/24 destination-address address-set Customer-subnet172.16.30.0/24 action permit rule name IPsec-NEG-pass logging enable counting enable source-ip 11.11.11.11 255.255.255.255 source-ip 22.22.22.22 255.255.255.255 destination-ip 11.11.11.11 255.255.255.255 destination-ip 22.22.22.22 255.255.255.255 action permit rule name Policy-Internet …… # nat policy rule name IPsec_NONAT description IPsec_NONAT source-zone trust destination-zone untrust source-address address-set Customer-subnet172.16.10.0/24 source-address address-set Customer-subnet172.16.20.0/24 source-address address-set Customer-subnet172.16.30.0/24 destination-address address-set HWCloud_subnet192.168.10.0/24 destination-address address-set HWCloud_subnet192.168.20.0/24 action no-nat rule name Snat_Internet …… #路由配置,访问华为云子网路由由公网接口流出 ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet1/0/1 22.22.22.1
  • position_3d 定义:笛卡尔(XYZ)坐标系中的三维位置(position)。 用途:设置坐标系中的三维位置,用于构成xyz_point。 参数:参数如下表 表1 position_3d参数 Parameter Type Mandatory Description x length yes position on the x-axis y length yes position on the y-axis z length yes position on the z-axis 代码样例 my_position: position_3d with: keep(it.x == 150.0m) keep(it.y == 200.0m) keep(it.z == 0.0m)
  • pose_3d 定义:三维空间的复合位置,包含位置点(odr_point或position_3d或road_point)和方向(orientation_3d)两个参数 用途:设置实体的初始位置(assign_init_speed动作)、目标位置(acquire_position动作) 参数:参数如下表 表6 pose_3d参数 Parameter Type Mandatory Description xyz_point xyz_point no a pose in space specified in Cartesian (XYZ) coordinates odr_point odr_point no a point expressed in ASAM OpenDRIVE coordinates road_point road_point no a point on route network specified in S-T coordinates orientation orientation_3d no three-dimensional orientation xyz_point、odr_point和road_point必须设置且仅设置一个,用以提供位置信息。 orientation非必选项,当不设置orientation时,对应roll、pitch、yaw均为0时的方向。 使用xyz_point、设置orientation my_xyz: xyz_point = map.create_xyz_point(x: 150.0m, y: 200.0m ,z: 0.0m) m_orientation: orientation_3d with: keep(it.roll == 0.0rad) keep(it.pitch == 0.0rad) keep(it.yaw == 1.57rad) my_pose: pose_3d with: keep(it.xyz_point == my_xyz) keep(it.orientation == m_orientation) 使用odr_point、不设置orientation my_odr: odr_point = map.create_odr_point(road_id: '1',lane_id:'-2',s: 3.0m, t: 0.0m) my_pose: pose_3d with: keep(it.odr_point == my_odr) 使用road_point、不设置orientation my_road: road_point with keep(it.road_id == '1') keep(it.s == 5.0m) keep(it.t == 0.0m) my_pose: pose_3d with: keep(it.road_point == my_road)
  • road_point 定义:路网s-t坐标系中的特定位置点(point)。 用途:设置实体位置,用于构成pose_3d。 参数:参数如下表 表3 road_point参数 Parameter Type Mandatory Description road_id string yes identifier for the road in which this point is located s length yes Coordinate along the s-axis of the corresponding road t length yes Coordinate along the t-axis of the corresponding road keep创建 my_road: road_point with keep(it.road_id == '1') keep(it.s == 5.0m) keep(it.t == 0.0m) create创建 my_point: road_point = map.create_road_point(road_id: '1', s: 5.0m, t: 0.0m)
  • odr_point 定义:ASAM OpenDRIVE坐标系中的位置点(point)。 用途:设置实体位置,用于构成pose_3d。 参数:参数如下表 表4 odr_point参数 Parameter Type Mandatory Description road_id string yes ASAM OpenDRIVE identifier for the road lane_id string yes ASAM OpenDRIVE identifier for the lane s length yes Coordinate along the ASAM OpenDRIVE s-axis t length yes Coordinate along the ASAM OpenDRIVE t-axis, the t-coordinate is measured from the lane centerline keep创建 my_odr: odr_point with: keep(it.road_id == '1') keep(it.lane_id == '-2') keep(it.s == 3.0m) keep(it.t == 0.0m) create创建 my_odr: odr_point = map.create_odr_point(road_id: '1',lane_id:'-2',s: 3.0m, t: 0.0m)
  • xyz_point 定义:笛卡尔(XYZ)坐标系中的特定位置点(point)。 用途:设置实体位置,用于构成pose_3d。 参数:参数如下表 表2 xyz_point参数 Parameter Type Mandatory Description position position_3d yes Position in Cartesian (XYZ) coordinates keep创建 my_pos: position_3d with: keep(it.x == 150.0m) keep(it.y == 200.0m) keep(it.z == 0.0m) my_xyz: xyz_point with: keep(it.position == my_pos) create创建 my_xyz: xyz_point = map.create_xyz_point(x: 150.0m, y: 200.0m ,z: 0.0m)
  • orientation_3d 定义:由Tait–Bryan角度的三个参数roll(横滚角,围绕x轴的角度)、pitch(俯仰角,围绕y轴的角度)和yaw(偏航角,围绕z轴的角度)定义的三维角度。 用途:设置实体的朝向角度、用于构成pose_3d。 参数:参数如下表 表5 orientation_3d参数 Parameter Type Mandatory Description roll angle yes rotation angle around the x-axis pitch angle yes rotation angle around the y-axis yaw angle yes rotation angle around the z-axis 根据ISO 8855的定义,角度旋转的顺序是:首先进行yaw(围绕z轴)、接着pitch(围绕新y轴),最后roll(围绕新x轴)。 当实体的朝向与road0的方向相同时,无需设置orientation_3d。 angle的单位一般为rad(弧度)而非degree(角度),rad = degree*pi/180,1rad约等于57.3度(详见scalar units中的angle units一节)。 与road 0的方向相反(相差180°) m_orientation: orientation_3d with: keep(it.roll == 0.0rad) keep(it.pitch == 0.0rad) keep(it.yaw == 3.14rad)
  • Scalar Units Units单位详解: speed units SPEED_UNIT = { "meter_per_second": 1.0, "mps": 1.0, "kilometer_per_hour": 0.277777778, "kmph": 0.277777778, "kph": 0.277777778, "mile_per_hour": 0.447038889, "mph": 0.447038889, "miph": 0.447038889, "mmph": 0.000000278, "millimeter_per_hour": 0.000000278 } acceleration units ACCELERATION_UNIT = { "meter_per_sec_sqr": 1.0, "mpsps": 1.0, "mpss": 1.0, "kilometer_per_hour_per_sec": 0.5270462769, "kmphps": 0.5270462769, "mile_per_hour_per_sec": 0.6686096686, "miphps": 0.6686096686 } length units LENGTH_UNIT = { "nanometer": 0.000000001, "nm": 0.000000001, "micrometer": 0.000001, "millimeter": 0.001, "mm": 0.001, "centimeter": 0.01, "cm": 0.01, "meter": 1.0, "m": 1.0, "kilometer": 1000.0, "km": 1000.0, "inch": 0.0254, "feet": 0.3048, "mile": 1609.344, "mi": 1609.344 } time units TIME_UNIT = { "millisecond": 0.001, "ms": 0.001, "second": 1.0, "sec": 1.0, "s": 1.0, "minute": 60.0, "min": 60.0, "hour": 3600.0, "h": 3600.0 } angle units ANGLE_UNIT = { "degree": 57.295779513, "deg": 57.295779513, "radian": 1.0, "rad": 1.0 } 父主题: 附录(Appendix)
  • 地区/国家代码对照表 计费大区 地区/国家 代码 AP1 亚太1区 中国香港 HK 中国澳门 MO 中国台湾 TW 日本 JP 韩国 KR AP2 亚太2区 泰国 TH 印度尼西亚 ID 菲律宾 PH 马来西亚 MY 新加坡 SG 柬埔寨 KH 老挝 LA 越南 VN AP3 亚太3区 印度 IN 澳大利亚 AU 孟加拉 BD MEAA 中东非洲 沙特阿拉伯 SA 伊拉克 IQ 阿联酋 AE 科威特 KW 卡塔尔 QA 阿曼 OM 巴林 BH 阿塞拜疆 AZ 土耳其 TR 南非 ZA 埃及 EG 加纳 GH 肯尼亚 KE 尼日利亚 NG SA 南美 阿根廷 AR 巴西 BR 智利 CL 哥伦比亚 CO 墨西哥 MX 秘鲁 PE EU 欧洲 哈萨克斯坦 KZ 蒙古国 MN 乌兹别克斯坦 UZ 保加利亚 BG 白俄罗斯 BY 西班牙 ES 法国 FR 英国 GB 德国 DE 希腊 GR 爱尔兰 IE 意大利 IT 荷兰 NL 波兰 PL 罗马尼亚 RO 俄罗斯 RU 瑞典 SE 父主题: 附录
  • 调用API获取项目ID 项目ID可以通过调用查询指定条件下的项目列表API获取。 获取项目ID的接口为“GET https://{Endpoint}/v3/projects”,其中{Endpoint}为 IAM 的终端节点。接口的认证鉴权请参见认证鉴权章节。 响应示例如下,其中projects下的“id”即为项目ID。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 { "projects": [ { "domain_id": "65382450e8f64ac0870cd180d14e684b", "is_domain": false, "parent_id": "65382450e8f64ac0870cd180d14e684b", "name": "project_name", "description": "", "links": { "next": null, "previous": null, "self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99" }, "id": "a4a5d4098fb4474fa22cd05f897d6b99", "enabled": true } ], "links": { "next": null, "previous": null, "self": "https://www.example.com/v3/projects" } }
  • 状态码 状态码如表1所示。 表1 状态码 状态码 编码 错误码说明 100 Continue 继续请求。 这个临时响应用来通知客户端,它的部分请求已经被服务器接收,且仍未被拒绝。 101 Switching Protocols 切换协议。只能切换到更高级的协议。 例如,切换到HTTP的新版本协议。 200 OK 接口调用成功 201 Created 创建类的请求完全成功。 202 Accepted 已经接受请求,但未处理完成。 203 Non-Authoritative Information 非授权信息,请求成功。 204 NoContent 请求完全成功,同时HTTP响应不包含响应体。 在响应OPTIONS方法的HTTP请求时返回此状态码。 205 Reset Content 重置内容,服务器处理成功。 206 Partial Content 服务器成功处理了部分GET请求。 300 Multiple Choices 多种选择。请求的资源可包括多个位置,相应可返回一个资源特征与地址的列表用于用户终端(例如:浏览器)选择。 301 Moved Permanently 永久移动,请求的资源已被永久的移动到新的URI,返回信息会包括新的URI。 302 Found 资源被临时移动。 303 See Other 查看其它地址。 使用GET和POST请求查看。 304 Not Modified 所请求的资源未修改,服务器返回此状态码时,不会返回任何资源。 305 Use Proxy 所请求的资源必须通过代理访问。 306 Unused 已经被废弃的HTTP状态码。 400 BadRequest 非法请求。 建议直接修改该请求,不要重试该请求。 401 Unauthorized 在客户端提供认证信息后,返回该状态码,表明服务端指出客户端所提供的认证信息不正确或非法。 402 Payment Required 保留请求。 403 Forbidden 请求被拒绝访问。 返回该状态码,表明请求能够到达服务端,且服务端能够理解用户请求,但是拒绝做更多的事情,因为该请求被设置为拒绝访问,建议直接修改该请求,不要重试该请求。 404 NotFound 所请求的资源不存在。 建议直接修改该请求,不要重试该请求。 405 MethodNotAllowed 请求中带有该资源不支持的方法。 建议直接修改该请求,不要重试该请求。 406 Not Acceptable 服务器无法根据客户端请求的内容特性完成请求。 407 Proxy Authentication Required 请求要求代理的身份认证,与401类似,但请求者应当使用代理进行授权。 408 Request Time-out 服务器等候请求时发生超时。 客户端可以随时再次提交该请求而无需进行任何更改。 409 Conflict 服务器在完成请求时发生冲突。 返回该状态码,表明客户端尝试创建的资源已经存在,或者由于冲突请求的更新操作不能被完成。 410 Gone 客户端请求的资源已经不存在。 返回该状态码,表明请求的资源已被永久删除。 411 Length Required 服务器无法处理客户端发送的不带Content-Length的请求信息。 412 Precondition Failed 未满足前提条件,服务器未满足请求者在请求中设置的其中一个前提条件。 413 Request Entity Too Large 由于请求的实体过大,服务器无法处理,因此拒绝请求。为防止客户端的连续请求,服务器可能会关闭连接。如果只是服务器暂时无法处理,则会包含一个Retry-After的响应信息。 414 Request-URI Too Large 请求的URI过长(URI通常为网址),服务器无法处理。 415 Unsupported Media Type 服务器无法处理请求附带的媒体格式。 416 Requested range not satisfiable 客户端请求的范围无效。 417 Expectation Failed 服务器无法满足Expect的请求头信息。 422 UnprocessableEntity 请求格式正确,但是由于含有语义错误,无法响应。 429 TooManyRequests 表明请求超出了客户端访问频率的限制或者服务端接收到多于它能处理的请求。建议客户端读取相应的Retry-After首部,然后等待该首部指出的时间后再重试。 500 InternalServerError 表明服务端能被请求访问到,但是不能理解用户的请求。 501 Not Implemented 服务器不支持请求的功能,无法完成请求。 502 Bad Gateway 充当网关或代理的服务器,从远端服务器接收到了一个无效的请求。 503 ServiceUnavailable 被请求的服务无效。 建议直接修改该请求,不要重试该请求。 504 ServerTimeout 请求在给定的时间内无法完成。客户端仅在为请求指定超时(Timeout)参数时会得到该响应。 505 HTTP Version not supported 服务器不支持请求的HTTP协议的版本,无法完成处理。 父主题: 附录
  • 注意事项 DATABASE LINK特性只在A兼容版本下可以使用。 DATABASE LINK连接的远端数据库仅支持503.1及之后版本。 用户需要保证本地和远端数据库的兼容性参数DBCOMPATIBILITY和GUC参数behavior_compat_options、a_format_dev_version、a_format_version取值一致。 DATABASE LINK连接开启session时会设置如下GUC参数。 set search_path=pg_catalog, '$user', 'public'; set datestyle=ISO; set intervalstyle=postgres; set extra_float_digits=3; 其他参数为远端设置的参数,远端参数与本地参数不同时,可能会出现数据显示格式不一致等情况,使用时应尽量保证远端与本地参数相同。 使用前置准备:使用gs_guc在pg_hba.conf文件中添加白名单允许客户端连接。 示例:gs_guc reload -I all -N all -Z datanode -h "host all all 192.168.11.11/32 sha256" 详细配置参数信息参考gs_guc客户端认证策略设置。 创建DATABASE LINK权限需要使用GRANT语法赋予,新建用户默认无权限,系统管理员拥有权限。详见GRANT相关说明。 使用DATABASE LINK对远端表操作时,会在本地创建与远端对应的Schema,若本地不存在该表的元数据信息,会将元数据信息写入本地系统表中,此时会使用7级锁保证写入的一致性,持续到事务结束放锁,删除DATABASE LINK时会将相应的元数据信息删除。 使用DATABASE LINK时在本地创建的表仅用于存储远端表的元数据信息,无法通过\d或pg_get_tabledef函数查询到表结构。 如果业务中有长事务首次使用dblink操作远端对象,会持续持锁直到事务结束,其他首次使用dblink的事务会被阻塞。可通过一条快速执行的语句先对要使用的远端对象做查询操作使其元数据落盘来规避这种情况,如 "select * from t1@dblink where 1=2;"。另外,远端表结构发生变化时本地要更新存储的元数据信息,也会有类似情况。 如果本地与远端字符集不同,可能会出现无法转换的报错,报错信息为远端返回报错。当本地数据库字符编码为gb18030_2022时,发送到远端会被转换为gb18030。因此,若本地数据库的字符集为GB18030_2022时,远程数据库字符集只能是GB18030或GB18030_2022。 在本地创建与远端对应的SCHEMA时会使用“USERNAME(私有DATABASE LINK才有)#远端SCHEMA@DBLINK名”做为SCHEMA名,名称长度上限为63。 当赋予用户创建DATABASE LINK权限时,相当于许可用户使用服务端DATABASE的IP对远端进行访问。若不希望有此效果,应不要使用GRANT对用户赋权。