Skip to content

Conversation

@katsyoshi
Copy link
Contributor

Occurred error Seahorse::Client::NetworkingError at wrapbox initializing.

I add rescue from this error.

@katsyoshi katsyoshi requested a review from abicky January 26, 2021 08:37
@abicky
Copy link
Contributor

abicky commented Jan 28, 2021

When you fix some errors, can you give us more information such as a stack trace like below? Such information helps us a lot to know the background of PRs and review changes.

#<Thread:0x0000557d886a27b8 /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:23 run> terminated with exception (report_on_exception is true):
/opt/ruby/lib/ruby/2.7.0/net/http.rb:960:in `initialize': execution expired (Seahorse::Client::NetworkingError)
	from /opt/ruby/lib/ruby/2.7.0/net/http.rb:960:in `open'
	from /opt/ruby/lib/ruby/2.7.0/net/http.rb:960:in `block in connect'
	from /opt/ruby/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
	from /opt/ruby/lib/ruby/2.7.0/net/http.rb:958:in `connect'
	from /opt/ruby/lib/ruby/2.7.0/net/http.rb:943:in `do_start'
	from /opt/ruby/lib/ruby/2.7.0/net/http.rb:938:in `start'
	from /opt/ruby/lib/ruby/2.7.0/delegate.rb:83:in `method_missing'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/net_http/connection_pool.rb:300:in `start_session'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/net_http/connection_pool.rb:99:in `session_for'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/net_http/handler.rb:123:in `session'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/net_http/handler.rb:75:in `transmit'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/net_http/handler.rb:49:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/plugins/content_length.rb:17:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/plugins/request_callback.rb:85:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/json/error_handler.rb:10:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/signature_v4.rb:68:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/transfer_encoding.rb:26:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:12:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:348:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:382:in `retry_request'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:370:in `retry_if_possible'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:359:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:382:in `retry_request'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:370:in `retry_if_possible'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:359:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:382:in `retry_request'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:370:in `retry_if_possible'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/retry_errors.rb:359:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/http_checksum.rb:18:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/endpoint_pattern.rb:31:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/json/handler.rb:13:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/user_agent.rb:13:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/endpoint_discovery.rb:80:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/plugins/endpoint.rb:47:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/param_validator.rb:26:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/plugins/raise_response_errors.rb:16:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:22:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/idempotency_token.rb:19:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/param_converter.rb:26:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/plugins/request_callback.rb:71:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/aws-sdk-core/plugins/response_paging.rb:12:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/plugins/response_target.rb:24:in `call'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-core-3.109.1/lib/seahorse/client/request.rb:72:in `send_request'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/aws-sdk-ecs-1.70.0/lib/aws-sdk-ecs/client.rb:3676:in `describe_tasks'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:90:in `block (3 levels) in update_described_results'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:89:in `each'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:89:in `each_slice'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:89:in `block (2 levels) in update_described_results'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:86:in `synchronize'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:86:in `block in update_described_results'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:85:in `loop'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:85:in `update_described_results'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:23:in `block in initialize'
#<Thread:0x0000557d896b2fb8 /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:185 run> terminated with exception (report_on_exception is true):
/opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:45:in `rescue in wait_task_running': Wrapbox::Runner::Ecs::TaskWaiter::WaitTimeout (Wrapbox::Runner::Ecs::TaskWaiter::WaitTimeout)
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:27:in `wait_task_running'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:382:in `wait_task_running'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:316:in `create_task'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:228:in `run_task'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:188:in `block (2 levels) in run_cmd'
/opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:75:in `sleep': execution expired (Timeout::Error)
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:75:in `wait'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:75:in `block in describe_task'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:73:in `synchronize'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:73:in `describe_task'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:30:in `block (2 levels) in wait_task_running'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:29:in `loop'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:29:in `block in wait_task_running'
	from /opt/ruby/lib/ruby/2.7.0/timeout.rb:110:in `timeout'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:28:in `wait_task_running'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:382:in `wait_task_running'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:316:in `create_task'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:228:in `run_task'
	from /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:188:in `block (2 levels) in run_cmd'
bundler: failed to load command: wrapbox (/opt/ruby/lib/ruby/gems/2.7.0/bin/wrapbox)
Wrapbox::Runner::Ecs::TaskWaiter::WaitTimeout: Wrapbox::Runner::Ecs::TaskWaiter::WaitTimeout
  /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:45:in `rescue in wait_task_running'
  /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs/task_waiter.rb:27:in `wait_task_running'
  /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:382:in `wait_task_running'
  /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:316:in `create_task'
  /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:228:in `run_task'
  /opt/ruby/lib/ruby/gems/2.7.0/bundler/gems/wrapbox-81101218835d/lib/wrapbox/runner/ecs.rb:188:in `block (2 levels) in run_cmd'

end

@cv.broadcast
rescue Seahorse::Client::NetworkingError => e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the following code is simpler and better:

rescue Aws::ECS::Errors::ThrottlingException, Seahorse::Client::NetworkingError => e
  Wrapbox.logger.warn("Failed to describe tasks: #{e} (#{e.class})")
end

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants