Runs on OSX but not on Open Solaris

80 views
Skip to first unread message

seb

unread,
Jun 23, 2011, 12:07:03 PM6/23/11
to Java client for Apple Push Notification service (APNs)
Hi,

I have been trying your framework and on my local OSX maschine it runs
really fine. Your sample code (which is really easy) worked for me.
Unfortunately it fails on my Server (which is OpenSolaris) with the
following error.


Exception in thread "main" com.notnoop.exceptions.NetworkIOException:
java.net.ConnectException: Connection refused
at
com.notnoop.apns.internal.ApnsConnectionImpl.socket(ApnsConnectionImpl.java:
146)
at
com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:
160)
at
com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:
46)
at
com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:
52)
at
com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:
36)
at Pushtest.main(Pushtest.java:15)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:
351)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:
559)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:
360)
at
com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:
71)
at
com.notnoop.apns.internal.ApnsConnectionImpl.socket(ApnsConnectionImpl.java:
133)
... 5 more


Both machines have java version "1.6.0_24". I have tried to look at
the problem with "-Djavax.net.debug=all" and some more like -
Dsun.security.ssl.allowUnsafeRenegotiation=false -
Dsun.security.ssl.allowLegacyHelloMessages=true

I thought, problem might be with SSLSocketFactory and took a guess
that SSLContext sslc = SSLContext.getInstance("TLS"); might be be a
good point (but it was not. i have tried to change it to TLSv1 and
TLSv1.1)....


Do you have any idea?

Olivier Costet

unread,
Jul 4, 2011, 8:37:38 AM7/4/11
to java-apn...@googlegroups.com
Hi Seb,

I'd check the network/firewall if I were you.

Olivier.
--
GOOD-NIGHT, everybody ... Now I have to go administer FIRST-AID to my
pet LEISURE SUIT!!

Mahmood Ali

unread,
Jul 4, 2011, 10:22:21 AM7/4/11
to java-apn...@googlegroups.com
Greetings,

I'm so sorry for missing your email.

Like Olivier, my initial hypothesis is a broken firewall or a network
configuration issue. If you have python installed on the server, you
can try one the libraries mentioned in the this StackOverflow thread
[1]. Hopefully this exercise will localize the issue more and
determine if the issue is a library/JVM issue or a networking issue.

Please keep us posted and update us with your solution.

Regards,
Mahmood

[1] http://stackoverflow.com/questions/1172769/connecting-to-apns-for-iphone-using-python

Reply all
Reply to author
Forward
0 new messages