Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Reply
Regular Contributor
annuk
Posts: 82
Registered: ‎09-26-2012
My Carrier: NA

Re: IOException caught sending message to PPG URL address:

Hi,

 

If two messages are recieved simultaneously, the receiver won't work?

 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Carrier: Bell

Re: IOException caught sending message to PPG URL address:

Are you using the Push Service SDK or your own implementation? If the former, did you make any modifications to the SDK code?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Regular Contributor
mdicesare
Posts: 78
Registered: ‎04-28-2010
My Carrier: Rogers

Re: IOException caught sending message to PPG URL address:

Annuk, what do you mean specifically when you say "the receiver"?

Please use plain text.
Regular Contributor
annuk
Posts: 82
Registered: ‎09-26-2012
My Carrier: NA

Re: IOException caught sending message to PPG URL address:

Hi,

 

I am using the webworks sdk for recieving push notifications on the device.

On server i have done some slight modifications to the code.

 

I think I am using two different appids on two diff servers and both have different ports. Will let you know after testing.

 

Regards,

 

Annuk

Please use plain text.
Regular Contributor
annuk
Posts: 82
Registered: ‎09-26-2012
My Carrier: NA

Re: IOException caught sending message to PPG URL address:

Receiver means the client my app on the device.

 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Carrier: Bell

Re: IOException caught sending message to PPG URL address:

Whether the app can receive multiple pushes in close succession depends on how you coded it. Make sure to read the data then unblock so new data can be read.

 

You could also implement ACKs so the client can verify which pushes were received.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Regular Contributor
annuk
Posts: 82
Registered: ‎09-26-2012
My Carrier: NA

Re: IOException caught sending message to PPG URL address:

Hi Garett,

 

Thanks.

Actually i was using two different accounts for sending to the Push server. Both accounts had different ports assigned to me. Now its working fine.

 

Thanks for your time and help.

Can you please help me with this: http://supportforums.blackberry.com/t5/Native-Development/Simulator-10-0-0-9-not-running-under-VM-Wo...

 

I want to set up my environment for Blackberry10 development on linux but not able to do so.

 

Regards,

Annuk.

Please use plain text.
Regular Contributor
annuk
Posts: 82
Registered: ‎09-26-2012
My Carrier: NA

Re: SocketTimeoutException caught sending message to PPG URL address:

[ Edited ]

Hi Garett,

We moved to production account for sending pushes.

When we tried on the test environment, the account works fine and was able to send the messages.

 

But when I deployed my push initiator on the production environment,  it started giving me the Socket exception.

What could be the reason.

Please find the stack trace.

 

INFO 2013-02-01 18:56:00,992 [pool-76-thread-1] (?:?) (sendIndividualMessage) - Exception while sendIndividualMessage message..
net.rim.pushsdk.commons.PushSDKException: SocketTimeoutException caught sending message to PPG URL address: https://cpXXX.pushapi.na.blackberry.com/mss/PD_pushRequest
    at net.rim.pushsdk.pap.PapServiceImpl.sendToPpg(PapServiceImpl.java:424)
    at net.rim.pushsdk.pap.PapServiceImpl.pushToPpg(PapServiceImpl.java:387)
    at net.rim.pushsdk.pap.PapServiceImpl.push(PapServiceImpl.java:152)
    at com.annuk.sendblackberry.push.pushBlackberryNotifications(Unknown Source)
    at com.annuk.sendblackberry.push.sendIndividualMessage(Unknown Source)
    at com.annuk.sendblackberry.push.sendNotifications(Unknown Source)
    at com.annuk.sendblackberry.push.server.NotificationsSchedular.createMessageAndSendNotifications(Unknown Source)
    at com.annuk.sendblackberry.push.server.NotificationsSchedular$2.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    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 sun.net.NetworkClient.doConnect(NetworkClient.java:158)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConne...
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.jav...
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
    at net.rim.pushsdk.commons.http.HttpClientImpl.getUrlConnection(HttpClientImpl.java:256)
    at net.rim.pushsdk.commons.http.HttpClientImpl.transmitPOST(HttpClientImpl.java:82)
    at net.rim.pushsdk.pap.PapServiceImpl.sendToPpg(PapServiceImpl.java:407)
    ... 12 more
ERROR 2013-02-01 18:56:00,991 [pool-75-thread-1] (PapServiceImpl.java:158) (push) - PushSDKException caught:
net.rim.pushsdk.commons.PushSDKException: SocketTimeoutException caught sending message to PPG URL address: https://cpXXX.pushapi.na.blackberry.com/mss/PD_pushRequest
    at net.rim.pushsdk.pap.PapServiceImpl.sendToPpg(PapServiceImpl.java:424)
    at net.rim.pushsdk.pap.PapServiceImpl.pushToPpg(PapServiceImpl.java:387)
    at net.rim.pushsdk.pap.PapServiceImpl.push(PapServiceImpl.java:152)
    at com.annuk.sendblackberry.push.pushBlackberryNotifications(Unknown Source)
    at com.annuk.sendblackberry.push.sendIndividualMessage(Unknown Source)
    at com.annuk.sendblackberry.push.sendNotifications(Unknown Source)
    at com.annuk.sendblackberry.push.server.NotificationsSchedular.createMessageAndSendNotifications(Unknown Source)
    at com.annuk.sendblackberry.push.server.NotificationsSchedular$2.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    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 sun.net.NetworkClient.doConnect(NetworkClient.java:158)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConne...
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.jav...
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
    at net.rim.pushsdk.commons.http.HttpClientImpl.getUrlConnection(HttpClientImpl.java:256)
    at net.rim.pushsdk.commons.http.HttpClientImpl.transmitPOST(HttpClientImpl.java:82)
    at net.rim.pushsdk.pap.PapServiceImpl.sendToPpg(PapServiceImpl.java:407)
    ... 12 more

 Please help.

 

Regards,

Annuk

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Carrier: Bell

Re: SocketTimeoutException caught sending message to PPG URL address:

Hi Annuk,

 

Could you clarify "test" and "production" environments? Are these 2 separate servers you are running or are you referring to EVAL and PROD Push Services?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Regular Contributor
annuk
Posts: 82
Registered: ‎09-26-2012
My Carrier: NA

Re: SocketTimeoutException caught sending message to PPG URL address:

Hi Garett,

 

Thanks for your reply.

 

I am using two servers, test and production.

 

 

My Blackberry push PROD account works fine on test server, but when moved to production server it started giving me the SOCKETEXCEPTION. Could it be due to firewall blocking or some network issue?

Please use plain text.