Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test failing since a few days ago: HttpTest::testSocketHttpsWorksWithValidCertificate Exception: Too many redirects (6) #11999

Closed
mattab opened this issue Sep 5, 2017 · 6 comments · Fixed by #12018
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.

Comments

@mattab
Copy link
Member

mattab commented Sep 5, 2017

The following test started failing a few days ago:

1) Piwik\Tests\Integration\HttpTest::testSocketHttpsWorksWithValidCertificate

Exception: Too many redirects (6)

No idea where this issue comes from?

(we discussed it may be the Location: https://xxx header is present causing the redirects. But wondering why this was not the case before.)

@mattab mattab added c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Sep 5, 2017
@mattab mattab added this to the 3.2.0 milestone Sep 5, 2017
@mneudert
Copy link
Member

mneudert commented Sep 5, 2017

I tried to connect manually to the domain using openssl s_client -connect and found that it does not react to the HTTP payload. That is also the case with piwik.org hosted in the same place.

Every other host I tried reacted in a different but expected way.

The odd thing is that using a PHP socket like the unit test does fails reproducible with redirects but a connection with curl from the command line works just fine. When receiving data there is a header I have not seen anywhere else:

Via: 1.1 alproxy

Could it perhaps be a hoster issue?

openssl divezone.net
> openssl s_client -connect divezone.net:443
CONNECTED(00000003)
...
SNIP CONNECTION INFORMATION
...
---
GET / HTTP/1.0


^C 
openssl google.com
> openssl s_client -connect google.com:443
CONNECTED(00000003)
...
SNIP CONNECTION INFORMATION
...
---
GET / HTTP/1.0

HTTP/1.0 302 Found

@mneudert
Copy link
Member

mneudert commented Sep 5, 2017

Additional fact:

openssl s_client -connect alwaysdata.com:443 (the hoster) works properly but does not send the alproxy-header. The domain blog.alwaysdata.com sends the header and does not communicate with openssl...

https://blog.alwaysdata.com/2016/10/27/introducing-our-new-reverse-proxy-alproxy-5/

@sgiehl
Copy link
Member

sgiehl commented Sep 10, 2017

@mneudert thanks for investigating. I will for now change the host to google.com.
@mattab If you would like to change that back to divezone.net, feel free to do so, as soon as it returns "expected" headers.

@mattab
Copy link
Member Author

mattab commented Sep 10, 2017

We need to troubleshoot the socket connection over SSL issue at some point to check whether there is a bug in the code? the test should ideally use Piwik.org as we most often connect to Piwik.org to download content and if this breaks, it could break the auto updater or Marketplace features. Moving to 3.2.0

@mattab mattab reopened this Sep 10, 2017
@mattab
Copy link
Member Author

mattab commented Sep 18, 2017

@mattab
Copy link
Member Author

mattab commented Sep 21, 2017

Fixed by @mneudert in #12074

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants