cURL error 7: Failed to connect to ***** upon running a functional test method on codeception #6651
Unanswered
roman-yakimkin
asked this question in
Q&A
Replies: 1 comment
-
Sometimes you may see this error using PhpBrowser module. Please note the 443 port which is mentioned there. It means that request goes by HTTPS protocol. HTTPS is a secure protocol and by default curl tries to verify the host, but it can be problematic for testing. There are 2 curl options which should disabled in order to make such requests pass. This is how you can do that in PhpBrowser config:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone.
Now I'm working on a monolith on PHP + YII and encountered with a problem.
Specifically, I took a job ticket, made it and some tests failed upon deployment. The testing engine is CodeCeption.
To debug these tests, I set up their execution in PHPStorm.
But when I try to run Functional tests that contains commands sending requests to web-server, for example, send GET, the execution catches exception and shows errors
failure message: cURL error 7: Failed to connect to my-monolith.local port 443: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html):
The monolith is in docker containers, is external port is 8443, whereas internal port is 443.
If I run tests inside docker containers via console, they work without these exceptions, but in case of running in PHPStorm, there are errors.
Could you clarify me or even surmise, what settings I could watch and fix?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions