发表文章

[Ruby] Aws::EC2 describe_host_reservations-NotImplementedError Aws::EC2 describe_host_reservations --> NotImplementedError[aws-sdk-ruby]

tomalok 2017-10-9 27

正在尝试从 EC2 中检索专用主机预留..。

#!/usr/bin/env ruby

require'aws-sdk'

begin
  =Aws::EC2::Client.new(region:'us-west-2')
  puts ec2.methods.include?(:describe_host_reservations)
  = ec2.describe_host_reservations
  puts r.host_reservation_set
rescueNotImplementedError => e
  STDERR"#{e.class} - #{e.message}"
  STDERR.puts e.backtrace.join("\n")
  1
end

结果..。

~ $ bundle exec ./test.rb
true
NotImplementedError - NotImplementedError
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser/frame.rb:148:in `child_frame'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser/stack.rb:18:in `start_element'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb:22:in `start_element_namespace'
./vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.0/lib/nokogiri/xml/sax/parser.rb:110:in `parse_with'
./vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.0/lib/nokogiri/xml/sax/parser.rb:110:in `parse_memory'
./vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.0/lib/nokogiri/xml/sax/parser.rb:83:in `parse'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb:13:in `parse'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser.rb:44:in `parse'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/protocols/ec2.rb:15:in `parse_xml'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/query/handler.rb:29:in `block in call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/response.rb:45:in `block in on'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/http/response.rb:139:in `block in on_success'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/http/response.rb:166:in `block in listener'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/http/response.rb:130:in `on_done'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/http/response.rb:137:in `on_success'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/response.rb:44:in `on'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/response.rb:53:in `on_success'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/query/handler.rb:27:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/user_agent.rb:12:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/plugins/endpoint.rb:41:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/param_validator.rb:21:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/plugins/response_target.rb:21:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/request.rb:70:in `send_request'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
./test.rb:8:in `<top (required)>'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `load'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:27:in `run'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli.rb:360:in `exec'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli.rb:20:in `dispatch'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli.rb:10:in `start'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/exe/bundle:35:in `block in <top (required)>'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/exe/bundle:27:in `<top (required)>'
/usr/bin/bundle:22:in `load'
/usr/bin/bundle:22:in `<main>'
原文:

Attempting to retrieve dedicated host reservations from EC2...

#!/usr/bin/env ruby

require 'aws-sdk'

begin
  ec2 = Aws::EC2::Client.new(region: 'us-west-2')
  puts ec2.methods.include?(:describe_host_reservations)
  r = ec2.describe_host_reservations
  puts r.host_reservation_set
rescue NotImplementedError => e
  STDERR.puts "#{e.class} - #{e.message}"
  STDERR.puts e.backtrace.join("\n")
  exit 1
end

...results in...

~ $ bundle exec ./test.rb
true
NotImplementedError - NotImplementedError
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser/frame.rb:148:in `child_frame'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser/stack.rb:18:in `start_element'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb:22:in `start_element_namespace'
./vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.0/lib/nokogiri/xml/sax/parser.rb:110:in `parse_with'
./vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.0/lib/nokogiri/xml/sax/parser.rb:110:in `parse_memory'
./vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.0/lib/nokogiri/xml/sax/parser.rb:83:in `parse'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb:13:in `parse'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/xml/parser.rb:44:in `parse'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/protocols/ec2.rb:15:in `parse_xml'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/query/handler.rb:29:in `block in call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/response.rb:45:in `block in on'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/http/response.rb:139:in `block in on_success'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/http/response.rb:166:in `block in listener'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/http/response.rb:130:in `on_done'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/http/response.rb:137:in `on_success'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/response.rb:44:in `on'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/response.rb:53:in `on_success'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/query/handler.rb:27:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/user_agent.rb:12:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/plugins/endpoint.rb:41:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/param_validator.rb:21:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/plugins/response_target.rb:21:in `call'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/request.rb:70:in `send_request'
./vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-2.10.24/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
./test.rb:8:in `<top (required)>'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `load'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:27:in `run'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli.rb:360:in `exec'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli.rb:20:in `dispatch'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/cli.rb:10:in `start'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/exe/bundle:35:in `block in <top (required)>'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.15.0/exe/bundle:27:in `<top (required)>'
/usr/bin/bundle:22:in `load'
/usr/bin/bundle:22:in `<main>'
相关推荐
最新评论 (13)
awood45 2017-10-9
1

在您的示例中, 能否显示 r.inspect 的输出?我不能复制这个问题。

原文:

In your example, could you show me the output of r.inspect? I can't replicate this issue.

tomalok 2017-10-9
2

r永远不会得到设置, 因为 ec2.describe_host_reservations 失败 (解析 XML 响应的东西?

FWIW aws-cli 发现我们的预订很好..。

~ $ aws ec2 describe-host-reservations --region us-west-2
{
    "HostReservationSet": [
        {
            "Count": 1,
            "End": "2018-02-23T16:47:07Z",
            "HourlyPrice": "1.791",
            "InstanceFamily": "m4",
            "OfferingId": "hro-00000000000000000",
            "PaymentOption": "NoUpfront",
            "State": "active",
            "HostIdSet": [
                "h-00000000000000000"
            ],
            "Start": "2017-02-23T16:47:07Z",
            "HostReservationId": "hr-00000000000000000",
            "UpfrontPrice": "0.000",
            "Duration": 31536000
        },
        {
            "Count": 1,
            "End": "2018-02-23T16:47:24Z",
            "HourlyPrice": "1.791",
            "InstanceFamily": "m4",
            "OfferingId": "hro-00000000000000",
            "PaymentOption": "NoUpfront",
            "State": "active",
            "HostIdSet": [
                "h-00000000000000000"
            ],
            "Start": "2017-02-23T16:47:24Z",
            "HostReservationId": "hr-00000000000000000",
            "UpfrontPrice": "0.000",
            "Duration": 31536000
        }
    ]
}
原文:

r never gets set, because ec2.describe_host_reservations is failing (something with parsing the XML response?)

FWIW aws-cli finds our reservations just fine...

~ $ aws ec2 describe-host-reservations --region us-west-2
{
    "HostReservationSet": [
        {
            "Count": 1,
            "End": "2018-02-23T16:47:07Z",
            "HourlyPrice": "1.791",
            "InstanceFamily": "m4",
            "OfferingId": "hro-00000000000000000",
            "PaymentOption": "NoUpfront",
            "State": "active",
            "HostIdSet": [
                "h-00000000000000000"
            ],
            "Start": "2017-02-23T16:47:07Z",
            "HostReservationId": "hr-00000000000000000",
            "UpfrontPrice": "0.000",
            "Duration": 31536000
        },
        {
            "Count": 1,
            "End": "2018-02-23T16:47:24Z",
            "HourlyPrice": "1.791",
            "InstanceFamily": "m4",
            "OfferingId": "hro-00000000000000",
            "PaymentOption": "NoUpfront",
            "State": "active",
            "HostIdSet": [
                "h-00000000000000000"
            ],
            "Start": "2017-02-23T16:47:24Z",
            "HostReservationId": "hr-00000000000000000",
            "UpfrontPrice": "0.000",
            "Duration": 31536000
        }
    ]
}
awood45 2017-10-9
3

您是否可以尝试运行以下内容, 以便我们可以尝试调试您收到的响应?

=Aws::EC2::Client.new(region:'us-west-2'http_wire_trace:true)
ec2.describe_host_reservations

随意去除任何敏感的东西, 但看到服务返回将有助于我们确定任何问题可能会说谎。

原文:

Could you try running the following, so we can try to debug the response you're getting?

ec2 = Aws::EC2::Client.new(region: 'us-west-2', http_wire_trace: true)
ec2.describe_host_reservations

Feel free to strip anything sensitive out, but seeing what the service is returning will help us pin down where any issue may lie.

tomalok 2017-10-9
4

XXX= 剥离的 id 等。

opening connection to ec2.us-west-2.amazonaws.com:443...
opened
starting SSL for ec2.us-west-2.amazonaws.com:443...
SSL established
<- "POST / HTTP/1.1\r\nContent-Type: application/x-www-form-urlencoded; charset=utf-8\r\nAccept-Encoding: \r\nUser-Agent: aws-sdk-ruby2/2.10.24 ruby/2.4.1 x86_64-linux-musl\r\nX-Amz-Date: 20170814T171717Z\r\nHost: ec2.us-west-2.amazonaws.com\r\nX-Amz-Content-Sha256: XXX\r\nAuthorization: AWS4-HMAC-SHA256 Credential=XXX/20170814/us-west-2/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=XXX\r\nContent-Length: 50\r\nAccept: */*\r\n\r\n"
-> "HTTP/1.1 200 OK\r\n"
-> "Content-Type: text/xml;charset=UTF-8\r\n"
-> "Transfer-Encoding: chunked\r\n"
-> "Vary: Accept-Encoding\r\n"
-> "Date: Mon, 14 Aug 2017 17:20:24 GMT\r\n"
-> "Server: AmazonEC2\r\n"
-> "\r\n"
-> "625\r\n"
reading 1573 bytes...
-> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<DescribeHostReservationsResponse xmlns=\"http://ec2.amazonaws.com/doc/2016-11-15/\">\n    <requestId>XXX</requestId>\n    <hostReservationSet>\n        <item>\n            <upfrontPrice>0.000</upfrontPrice>\n            <count>1</count>\n            <start>2017-02-23T16:47:07Z</start>\n            <instanceFamily>m4</instanceFamily>\n            <offeringId>hro-XXX</offeringId>\n            <duration>31536000</duration>\n            <paymentOption>NoUpfront</paymentOption>\n            <end>2018-02-23T16:47:07Z</end>\n            <state>active</state>\n            <hostReservationId>hr-XXX</hostReservationId>\n            <hourlyPrice>1.791</hourlyPrice>\n            <hostIdSet>\n                <item>h-XXX</item>\n            </hostIdSet>\n        </item>\n        <item>\n            <upfrontPrice>0.000</upfrontPrice>\n            <count>1</count>\n            <start>2017-02-23T16:47:24Z</start>\n            <instanceFamily>m4</instanceFamily>\n            <offeringId>hro-XXX</offeringId>\n            <duration>31536000</duration>\n            <paymentOption>NoUpfront</paymentOption>\n            <end>2018-02-23T16:47:24Z</end>\n            <state>active</state>\n            <hostReservationId>hr-XXX</hostReservationId>\n            <hourlyPrice>1.791</hourlyPrice>\n            <hostIdSet>\n                <item>h-XXX</item>\n            </hostIdSet>\n        </item>\n    </hostReservationSet>\n</DescribeHostReservationsResponse>"
read 1573 bytes
reading 2 bytes...
-> "\r\n"
read 2 bytes
-> "0\r\n"
-> "\r\n"
Conn keep-alive
NotImplementedError - NotImplementedError

(FWIW, describe_host_reservations 是当前唯一有问题的方法, describe_hostsdescribe_instancesdescribe_reserved_instances 等都工作正常。

原文:

XXX = stripped IDs, etc.

opening connection to ec2.us-west-2.amazonaws.com:443...
opened
starting SSL for ec2.us-west-2.amazonaws.com:443...
SSL established
<- "POST / HTTP/1.1\r\nContent-Type: application/x-www-form-urlencoded; charset=utf-8\r\nAccept-Encoding: \r\nUser-Agent: aws-sdk-ruby2/2.10.24 ruby/2.4.1 x86_64-linux-musl\r\nX-Amz-Date: 20170814T171717Z\r\nHost: ec2.us-west-2.amazonaws.com\r\nX-Amz-Content-Sha256: XXX\r\nAuthorization: AWS4-HMAC-SHA256 Credential=XXX/20170814/us-west-2/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=XXX\r\nContent-Length: 50\r\nAccept: */*\r\n\r\n"
-> "HTTP/1.1 200 OK\r\n"
-> "Content-Type: text/xml;charset=UTF-8\r\n"
-> "Transfer-Encoding: chunked\r\n"
-> "Vary: Accept-Encoding\r\n"
-> "Date: Mon, 14 Aug 2017 17:20:24 GMT\r\n"
-> "Server: AmazonEC2\r\n"
-> "\r\n"
-> "625\r\n"
reading 1573 bytes...
-> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<DescribeHostReservationsResponse xmlns=\"http://ec2.amazonaws.com/doc/2016-11-15/\">\n    <requestId>XXX</requestId>\n    <hostReservationSet>\n        <item>\n            <upfrontPrice>0.000</upfrontPrice>\n            <count>1</count>\n            <start>2017-02-23T16:47:07Z</start>\n            <instanceFamily>m4</instanceFamily>\n            <offeringId>hro-XXX</offeringId>\n            <duration>31536000</duration>\n            <paymentOption>NoUpfront</paymentOption>\n            <end>2018-02-23T16:47:07Z</end>\n            <state>active</state>\n            <hostReservationId>hr-XXX</hostReservationId>\n            <hourlyPrice>1.791</hourlyPrice>\n            <hostIdSet>\n                <item>h-XXX</item>\n            </hostIdSet>\n        </item>\n        <item>\n            <upfrontPrice>0.000</upfrontPrice>\n            <count>1</count>\n            <start>2017-02-23T16:47:24Z</start>\n            <instanceFamily>m4</instanceFamily>\n            <offeringId>hro-XXX</offeringId>\n            <duration>31536000</duration>\n            <paymentOption>NoUpfront</paymentOption>\n            <end>2018-02-23T16:47:24Z</end>\n            <state>active</state>\n            <hostReservationId>hr-XXX</hostReservationId>\n            <hourlyPrice>1.791</hourlyPrice>\n            <hostIdSet>\n                <item>h-XXX</item>\n            </hostIdSet>\n        </item>\n    </hostReservationSet>\n</DescribeHostReservationsResponse>"
read 1573 bytes
reading 2 bytes...
-> "\r\n"
read 2 bytes
-> "0\r\n"
-> "\r\n"
Conn keep-alive
NotImplementedError - NotImplementedError

(FWIW, describe_host_reservations is currently the only method I'm having trouble with -- describe_hosts, describe_instances, describe_reserved_instances, etc. are all working fine.)

awood45 2017-10-9
5

实际上, 请求 ID 将是超级有用的 (并且是请求所独有的), 以防我们需要让服务团队参与进来。我们不需要其他的 id如果您愿意, 也可以将请求 ID 发送给alexwood@amazon.com alexwood@amazon. com

原文:

Actually the request ID would be super useful (and are unique to the request), in case we need to involve the service team. We don't need any of the other IDs. If you prefer, you can email the request ID to alexwood@amazon.com as well.

tomalok 2017-10-9
6

给你发电子邮件 RequestID, 亚历克斯..。

原文:

emailing you the RequestID, Alex...

tomalok 2017-10-9
7

请确认收到 RequestID。

原文:

...please confirm receipt of RequestID.

awood45 2017-10-9
8

是的, 我有。想看看我是否能重现这个问题。

原文:

Yes, I have it. Looking to see if I can reproduce the issue.

awood45 2017-10-9
9

另一个问题是, 您是否在一个线程环境中运行此代码?

原文:

Another question that came up - are you running this code in a threaded environment?

awood45 2017-10-9
10

此外, 您还可以提供完整的 Gemfile.lock 吗?想知道您正在使用哪个 XML 解析器。

原文:

Additionally, can you provide your full Gemfile.lock? Wondering which XML parser you are using.

tomalok 2017-10-9
11

此 (讨论) 线程顶部的脚本不是线程的。 因此, 线程不应该在发挥 (目前)。

根据回溯, nokogiri 1.8.0 出现, 但这里是整个 Gemfile.lock , 无论如何..。

GEM
  remote: https://rubygems.org/
  specs:
    actionpack (5.1.3)
      actionview (= 5.1.3)
      activesupport (= 5.1.3)
      rack (~> 2.0)
      rack-test (~> 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.1.3)
      activesupport (= 5.1.3)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activemodel (5.1.3)
      activesupport (= 5.1.3)
    activerecord (5.1.3)
      activemodel (= 5.1.3)
      activesupport (= 5.1.3)
      arel (~> 8.0)
    activesupport (5.1.3)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    arel (8.0.0)
    aws-sdk (2.10.28)
      aws-sdk-resources (= 2.10.28)
    aws-sdk-core (2.10.28)
      aws-sigv4 (~> 1.0)
      jmespath (~> 1.0)
    aws-sdk-resources (2.10.28)
      aws-sdk-core (= 2.10.28)
    aws-sigv4 (1.0.1)
    bigdecimal (1.3.2)
    builder (3.2.3)
    closure_tree (6.6.0)
      activerecord (>= 4.1.0)
      with_advisory_lock (>= 3.0.0)
    concurrent-ruby (1.0.5)
    erubi (1.6.1)
    httpclient (2.8.3)
    i18n (0.8.6)
    jmespath (1.3.1)
    json (2.1.0)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    method_source (0.8.2)
    mini_portile2 (2.2.0)
    minitest (5.10.3)
    mustermann (1.0.0)
    mysql2 (0.4.8)
    nokogiri (1.8.0)
      mini_portile2 (~> 2.2.0)
    pg (0.21.0)
    rack (2.0.3)
    rack-protection (2.0.0)
      rack
    rack-test (0.6.3)
      rack (>= 1.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    railties (5.1.3)
      actionpack (= 5.1.3)
      activesupport (= 5.1.3)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (12.0.0)
    retries (0.0.5)
    sinatra (2.0.0)
      mustermann (~> 1.0)
      rack (~> 2.0)
      rack-protection (= 2.0.0)
      tilt (~> 2.0)
    sinatra-activerecord (2.0.13)
      activerecord (>= 3.2)
      sinatra (>= 1.0)
    standalone_migrations (5.2.3)
      activerecord (>= 4.2.7, < 5.2.0)
      railties (>= 4.2.7, < 5.2.0)
      rake (>= 10.0)
    thor (0.19.4)
    thread_safe (0.3.6)
    tilt (2.0.8)
    trollop (2.1.2)
    tzinfo (1.2.3)
      thread_safe (~> 0.1)
    vault (0.10.1)
    with_advisory_lock (3.1.0)
      activerecord (>= 3.2)
      thread_safe

PLATFORMS
  ruby

DEPENDENCIES
  aws-sdk
  bigdecimal
  closure_tree
  httpclient
  json
  mysql2 (>= 0.4.0)
  pg
  retries
  sinatra
  sinatra-activerecord
  standalone_migrations
  trollop
  vault

BUNDLED WITH
   1.15.0
原文:

The script at the top of this (discussion) thread is not threaded. So, threading shouldn't be in play (at the moment).

Per the backtrace, nokogiri 1.8.0 appears, but here's the whole Gemfile.lock, anyways...

GEM
  remote: https://rubygems.org/
  specs:
    actionpack (5.1.3)
      actionview (= 5.1.3)
      activesupport (= 5.1.3)
      rack (~> 2.0)
      rack-test (~> 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.1.3)
      activesupport (= 5.1.3)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activemodel (5.1.3)
      activesupport (= 5.1.3)
    activerecord (5.1.3)
      activemodel (= 5.1.3)
      activesupport (= 5.1.3)
      arel (~> 8.0)
    activesupport (5.1.3)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    arel (8.0.0)
    aws-sdk (2.10.28)
      aws-sdk-resources (= 2.10.28)
    aws-sdk-core (2.10.28)
      aws-sigv4 (~> 1.0)
      jmespath (~> 1.0)
    aws-sdk-resources (2.10.28)
      aws-sdk-core (= 2.10.28)
    aws-sigv4 (1.0.1)
    bigdecimal (1.3.2)
    builder (3.2.3)
    closure_tree (6.6.0)
      activerecord (>= 4.1.0)
      with_advisory_lock (>= 3.0.0)
    concurrent-ruby (1.0.5)
    erubi (1.6.1)
    httpclient (2.8.3)
    i18n (0.8.6)
    jmespath (1.3.1)
    json (2.1.0)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    method_source (0.8.2)
    mini_portile2 (2.2.0)
    minitest (5.10.3)
    mustermann (1.0.0)
    mysql2 (0.4.8)
    nokogiri (1.8.0)
      mini_portile2 (~> 2.2.0)
    pg (0.21.0)
    rack (2.0.3)
    rack-protection (2.0.0)
      rack
    rack-test (0.6.3)
      rack (>= 1.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    railties (5.1.3)
      actionpack (= 5.1.3)
      activesupport (= 5.1.3)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (12.0.0)
    retries (0.0.5)
    sinatra (2.0.0)
      mustermann (~> 1.0)
      rack (~> 2.0)
      rack-protection (= 2.0.0)
      tilt (~> 2.0)
    sinatra-activerecord (2.0.13)
      activerecord (>= 3.2)
      sinatra (>= 1.0)
    standalone_migrations (5.2.3)
      activerecord (>= 4.2.7, < 5.2.0)
      railties (>= 4.2.7, < 5.2.0)
      rake (>= 10.0)
    thor (0.19.4)
    thread_safe (0.3.6)
    tilt (2.0.8)
    trollop (2.1.2)
    tzinfo (1.2.3)
      thread_safe (~> 0.1)
    vault (0.10.1)
    with_advisory_lock (3.1.0)
      activerecord (>= 3.2)
      thread_safe

PLATFORMS
  ruby

DEPENDENCIES
  aws-sdk
  bigdecimal
  closure_tree
  httpclient
  json
  mysql2 (>= 0.4.0)
  pg
  retries
  sinatra
  sinatra-activerecord
  standalone_migrations
  trollop
  vault

BUNDLED WITH
   1.15.0
tomalok 2017-10-9
12

这似乎是工作的 v3 SDK 的罚款。

原文:

This appears to be working fine with v3 of the SDK.

awood45 2017-10-9
13

大!这可能会让人相信一些 autoload 问题正在发生, 因为一旦 V3's 的大变革就完全取消了。感谢您的更新!

原文:

Great! That would potentially lend some credence to the idea that some autoload issues were taking place, since once of V3's big changes is to cut that off entirely. Thanks for the update!

返回
发表文章
tomalok
文章数
1
评论数
6
注册排名
60720