Connection timed out

Description

I’m regularly getting the “Connection timed out” error.

Repository

This was in other projects too, but I didn’t find, sorry.

CI/CD

Cirrus CI.

Uploader

Ruby’s codecov via simplecov.

Commit SHAs

Codecov YAML

There is no.

Codecov Output

Finished in 0.60875 seconds (files took 0.48776 seconds to load)
32 examples, 0 failures
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _\`|/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                               Ruby-0.1.19
x>
 No CI provider detected.
==>
 Gzipping contents
==>
 Uploading reports
    url:   https://codecov.io
    query: token=secret&flags&branch=enable_all_new_rubocop_cops&commit=4dc8cbab523ad41d89106bed22e778810aadd5e3
-> 
 Uploading to Codecov
https://codecov.io//upload/v2?token=secret&flags&branch=enable_all_new_rubocop_cops&commit=4dc8cbab523ad41d89106bed22e778810aadd5e3
Error uploading coverage reports to Codecov. Sorry
Failed to open TCP connection to codecov.io:443 (Connection timed out - connect(2) for "codecov.io" port 443)
/usr/local/bundle/gems/codecov-0.1.19/lib/codecov.rb:384:in `format': undefined method `body' for nil:NilClass (NoMethodError)
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov/result.rb:49:in `format!'
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov/configuration.rb:196:in `block in at_exit'
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov.rb:214:in `run_exit_tasks!'
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov.rb:202:in `at_exit_behavior'
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov/defaults.rb:27:in `block in <top (required)>'

Steps to Reproduce

Just upload.

Expected behavior: Successful upload.

Actual behavior: “Connection timed out” error.

Flakiness? Sometimes.

Another PR in the same repository, 2 tasks:

Another repository, without PR, commit to the master:

Hi @AlexWayfer, thanks for opening this up. We are currently working on updating some pieces of the Ruby uploader. I’ll update this thread when we push the next minor update, which hopefully will alleviate this issue.

1 Like

We’re experiencing the same error with codecov-bash uploader.

@vgrigoruk can you supply a build URL for this? Also, are you seeing this intermittently or all the time?

The same fail with codecov version 0.2.0: Cirrus CI

It’s a sever-side error, for your information. Or network-related.

@tom unfortunately, there is no public build URL available, as we’re using Buildkite CI with a private github repository.

It looks like https://codecov.io/env could not be downloaded sometimes. To reproduce the issue, simply run curl -s -S https://codecov.io/env in a loop for 5-10 times and you’ll get the following error:

curl: (7) Failed to connect to codecov.io port 443: Operation timed out

1 Like

Based on response headers from curl -v https://codecov.io/env, it looks like both scripts (/env & /bash) are served by nginx. I’m wondering why don’t use use CDN to distribute them?

2 Likes

@vgrigoruk, thanks for the suggestion, we are actively working to push these scripts to CDN. This should greatly help with the connection issues here.

1 Like

@AlexWayfer, we have released 0.2.1 which should give better indications of what is going wrong here.

@AlexWayfer, are you still running into issues? I see you closed this issue.

Yes.

It’s the issue about format, please look more closely. There is an HTML response instead of JSON, so we were getting unexpected token.

But this thread, issue, is about Connection timed out error. This is network error, server-sided too, but another type of.

We are also experiencing timeouts at uploading. We are using the bash uploader from Github actions. It’s intermittent but quite frequent (5 to 10 times a day).

(Can’t provide a URL as it is a private repo, but contact me if you need more info.)

Hi @mtrias, could you DM me your Codecov output?

Sure thing. I tried to DM you here and got an error though “Sorry, new users can only put 7 links in a post”. Of course my output is full of URLs… Should I use an email instead?

1 Like

@mtrias apologies for that, I have DMed you.

@AlexWayfer, I released a new version of the gem, would you be able to try that out?

Thank you. Yes, on this weekend.

1 Like