-
Notifications
You must be signed in to change notification settings - Fork 366
Error While Trying To Establish a Connection on SSL HTTPS #181
Comments
As said in #179 (comment), please catch the exception and dump the It should pinpoint you the error on why it couldn't connect your to the server. BTW, IIUC, you are trying to make a ssl connection on a insecured port. Don't you have another port that is open for ssl ? |
I am using port 443 for the ssl connection. Should I try using it instead of port 3000? Is this also maybe one of the reason i cant make a connection? |
Probably, give it a try. :} |
Okay Thanks. I am really new to sockets and ssl connections. I will give it try and give you a feedback. |
Hello @Taluu , Thank you |
AFAIK, I think it's a problem on your node server. I think you're serving through http (not https) on the port 3000, and the port 443 is not listened by your node server but your http server (which can be different). You also cannot (AFAIK) serve both secured and unsecured connections on the same port. So you should configure your node server to deliver a https connection on another port (or through the 3000). |
I run into this issue, solved by : Must use context "http" not "ssl" in $protocol = true === $this->url['secured'] ? 'http' : 'http'; |
Care to make a PR ? |
yes... I'll try later but with a proper code because because this lines is useless |
yes, but not in 3.3.1 |
Yep just saw, that's why I deleted my comment. :} I think there was an error at some point that needed the ssl context for ssl connections instead of https, but using the |
Socket connect is ok (+ HEADERS working) in dev-master I'll try to investigate later... |
@lorenzyannick any news in your investigation? I have the same error |
After passing $context parameter I fixed my situation.
|
I'm having the same issue, the options you provide @daryn-k works. |
Hello Good Day!
I have a problem establishing a connection server with my ssl certificate.
"An error occurred while trying to establish a connection to the server"
I have this code :
And now I checked one of the tickets here like passing this $options:
But still I can't establish any connection.
If I am sending an http request it is working and it listens to port 3000 just fine.
But when I changed the connection to https I am getting that error.
Hope you can help me.
Thanks is advance.
The text was updated successfully, but these errors were encountered: