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

Unable to connect: tls://gateway.push.apple.com:2195 #174

Open
BadChoice opened this issue May 12, 2017 · 15 comments
Open

Unable to connect: tls://gateway.push.apple.com:2195 #174

BadChoice opened this issue May 12, 2017 · 15 comments

Comments

@BadChoice
Copy link

[ZendService\Apple\Exception\RuntimeException]
Unable to connect: tls://gateway.push.apple.com:2195: 2 (stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error)

@GotFly
Copy link

GotFly commented May 23, 2017

Same error

@HrBayat
Copy link

HrBayat commented Jun 7, 2017

Same error on ubuntu 16

@tvillafane
Copy link

I just solved this; my dev certificate had expired. I suggest using fastlane pem to renew your cert. I had spent half a day on this and fixed it in 15 minutes when I decided to just renew all of my certs.

@BadChoice
Copy link
Author

Thank you @tvillafane it worked for me, didn't know about fastlane and it really speeds up the process

@martinhschei
Copy link

Same error using Homestead.

Unable to connect: tls://gateway.sandbox.push.apple.com:2195: 2 (stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error)

Will check certificates and report back.

@martinhschei
Copy link

The certificate that i use is valid.

It seems like it's not enough to give the path to the certificate in the config. In addition the certificate needs to be installed on the server it seems.

I will do that and report back.

@tvillafane
Copy link

Yes, your cert has to live on your server.

@martinhschei
Copy link

"Has to live"....as in "installed on the server", yes?

@martinhschei
Copy link

it's of course located on the server, with the correct chmod.

@martinhschei
Copy link

any other suggestions?

@nrb1238
Copy link

nrb1238 commented Mar 15, 2018

@martinhschei
Did you fixed this issue? if yes then Please help me out how to fix it?

@martinhschei
Copy link

turns out that those that had made the certificate had made an error.

the certificate was valid (not expired), but it was merged in a way that made it fail the authentication on the push server.

with the correct certificate it works fine.

@nrb1238
Copy link

nrb1238 commented Mar 15, 2018

@martinhschei
Thank you for reply
Can you please provide the steps to create the correct certificate
Now I am generating the p12 and then convert to pem from terminal as below command
"openssl pkcs12 -in Certificates.p12 -out Certificates.pem -nodes -clcerts"

is this correct way? Please help me out

@martinhschei
Copy link

Do you get any error messages?

I did not generate the certificate myself, i just used it in a application.

Here is how to do it:
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html#//apple_ref/doc/uid/TP40008194-CH8-SW1

@AymenBouein
Copy link

Unable to connect: tls://gateway.push.apple.com:2195: 2 (stream_socket_client(): Unable to set local cert chain file `Certif/ainayatiPush12.p12'; Check that your cafile/capath settings include details of your certificate and its issuer)

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

No branches or pull requests

7 participants