Closed GoogleCodeExporter closed 8 years ago
Also, 'isProduction' is false, we are not using production destination.
Original comment by aaron...@gmail.com
on 10 Dec 2011 at 7:20
How many device ids are there in your list?
And could you provide the full log output for your attempt? (or at least the
last 50 lines preceding the exception)
Thank you!
Original comment by sype...@gmail.com
on 10 Dec 2011 at 7:57
[deleted comment]
There is 1 deviceId in my list.
You can see above in my code I do the following:
Exception theProblem = notification.getException();
...
theProblem.printStackTrace();
The stack trace only yields:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:632)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.OutputStream.write(OutputStream.java:58)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:404)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:352)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:322)
at javapns.Push.sendPayload(Push.java:176)
at javapns.Push.alert(Push.java:47)
at com.omeda.mobile.APNSCommunicator.sendAPNSNotification(APNSCommunicator.java:101)
at com.omeda.mobile.APNSCommunicator.main(APNSCommunicator.java:72)
Its really wierd, because like I said outside my companys network things work
fine, but inside the network it errors out. Who/What would trigger a socket
connection to close abruptly ? Again, the 3 way handshake seems to look okay
(from what I am told) and I have wireshark sniffs available as well.
Original comment by aaron...@gmail.com
on 10 Dec 2011 at 10:39
I would like to see the log output from the library, not just the exception.
The exception tells just part of the story, so the full log can be quite useful
(because for now I can't tell what's wrong..). Thanks!
Original comment by sype...@gmail.com
on 10 Dec 2011 at 11:33
Where can I find these logs ?
Original comment by aaron...@gmail.com
on 10 Dec 2011 at 11:48
Please see the Troubleshooting wiki page on this site.
Original comment by sype...@gmail.com
on 10 Dec 2011 at 11:49
Please find attached, thanks so much, anything else I can get you please let me
know. I will make myself available.
Original comment by aaron...@gmail.com
on 11 Dec 2011 at 12:05
Attachments:
Would you like me to send you the logs for a successful submission as well
(Outside my companys network)?
Original comment by aaron...@gmail.com
on 11 Dec 2011 at 12:15
From what I see in the log, JavaPNS does try to recover from the
"java.net.SocketException: Connection reset, unexpected_message" error twice by
trying again and again to reconnect and stream the message to the Apple server.
Unfortunately, the same "unexpected_message" SSL error occurs at every
attempt, and JavaPNS eventually throws the exception because it reached the
maximum number of attempts configured.
I really can't help you any further, as it seems to be a problem involving your
network or security environment which breaks the comlink for some reason.
Could there be a proxy on your company's network which somehow intercepts SSL
connections and maybe doesn't like the trust strategy used between the library
and APNS? The fact that the library works outside of your network seems to be
hinting toward that posibility also.
Original comment by sype...@gmail.com
on 11 Dec 2011 at 12:17
Thanks!
I sort of thought the same thing, but often times its easy to say "Hey Systems
this is a firewall issue..", but if they can't fix it, then it leaves everyone
in no-mans land.
a couple questions:
I am really not familiar with SSL connections and sockets, etc. If you were me,
is there any explicit information from the logs I sent you that I could give
them to point them in the correct direction ?
What is this "enexpected_message" error for example, can I google
"unexpected_message SSL socket error" and get results, or do you think this is
something custom to my companys network ?
Is there anything you are seeing I can use to verify that this is DEFINITELY
happening on my companys side, ie we are closing the connection prematurely not
Apple?
If you were me what would you tell the systems department.. ?
Original comment by aaron...@gmail.com
on 11 Dec 2011 at 12:26
I'm no SSL expert, but the first thing I'd do is to provide your IT department
with a copy of the SSL log for an attempt that works outside of the network,
and one that does not work inside the network. In order to make it easier for
them to investigate the issue, I would probably exclude JavaPNS-specific log
entries from the logs I'd provide them (leaving only the log output generated
by Java's -Djavax.net.debug=all option.
If one attempt works outside of the network and one fails inside, they ought to
investigate it and provide a solution (or at least an explanation)..
Original comment by sype...@gmail.com
on 12 Dec 2011 at 3:56
[deleted comment]
Since your code works outside of your company network (hinting at a company
network issue), I would suggest we close this issue. Do you agree?
Original comment by sype...@gmail.com
on 13 Dec 2011 at 2:52
Bumping this issue.. May we close it?
Original comment by sype...@gmail.com
on 20 Dec 2011 at 3:43
Yes it ended up being a firewall issue.
Original comment by aaron...@gmail.com
on 20 Dec 2011 at 4:59
Excellent, thank you!
Closing.
Original comment by sype...@gmail.com
on 20 Dec 2011 at 5:54
Original issue reported on code.google.com by
aaron...@gmail.com
on 10 Dec 2011 at 7:11