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

Java Development

Reply
New Developer
mailkishorev
Posts: 8
Registered: ‎06-27-2014
My Device: 9900,9860

BB OS 7 Push - Port [xxxxx] is unavailable

Hello Everyone,

 

I am currently implementing Push Notifications for Blackberry. I have already registered for Blackberry Push Evaluation and got the necessary credentials(push id, aapid, ppg url, etc). I have using the Simplified_BIS_Push_Sample provided by RIM only and I was able to receive the push notifications also. But from previous two weeks, I'm facing an issue only in BB OS 7(Working fine in BB10). When I try to listen for the port using the serversocketconnection for Push message, it is throwing an IOPortAlreadyBoundException : Port[xxxxx] is unavailable and hence registration itself fails. From the server side, the push will be sent but as the application is not at all listening in the port, it will not be able to receive any push notifications.

I tried with New Push Evaluation credentials and also with the sample app also but still no success. Any help regarding this is much appreciated.

Please use plain text.
Developer
simon_hain
Posts: 16,190
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: BB OS 7 Push - Port [xxxxx] is unavailable

welcome to the support forums.

you posted on the native forum, i have asked a mod to move the post to the bb java forums.

most likely you have already launched the app once on that session. it binds the port, and when you launch it again you get the "port already bound" exception.
i would suggest to use an alternate entry point to register the listener, or use the runtimestore to ensure that it is a singleton.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
New Developer
mailkishorev
Posts: 8
Registered: ‎06-27-2014
My Device: 9900,9860

Re: BB OS 7 Push - Port [xxxxx] is unavailable

Thanks to your quick reply Simon..

 

As I said earlier, It was working fine and I am using the alternate entry point to register also. But still no success. While it is trying to register itself I'm getting response like this :

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html><head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>ERROR: The requested URL could not be retrieved</title>

<style type="text/css"><!--

 /*

 Stylesheet for Squid Error pages

 Adapted from design by Free CSS Templates

 http://www.freecsstemplates.org

 Released for free under a Creative Commons Attribution 2.5 License

*/

 

/* Page basics */

* {

      font-family: verdana, sans-serif;

}

 

html body {

      margin: 0;

      padding: 0;

      background: #efefef;

      font-size: 12px;

      color: #1e1e1e;

}

 

/* Page displayed title area */

#titles {

      margin-left: 15px;

      padding: 10px;

      padding-left: 100px;

      background: url('http://www.squid-cache.org/Artwork/SN.png') no-repeat left;

}

 

/* initial title */

#titles h1 {

      color: #000000;

}

#titles h2 {

      color: #000000;

}

 

/* special event: FTP success page titles */

#titles ftpsuccess {

      background-color:#00ff00;

      width:100%;

}

 

/* Page displayed body content area */

#content {

      padding: 10px;

      background: #ffffff;

}

 

/* General text */

p {

}

 

/* error brief description */

#error p {

}

 

/* some data which may have caused the problem */

#data {

}

 

/* the error message received from the system or other software */

#sysmsg {

}

 

pre {

    font-family:sans-serif;

}

 

/* special event: FTP / Gopher directory listing */

#dirmsg {

    font-family: courier;

    color: black;

    font-size: 10pt;

}

#dirlisting {

    margin-left: 2%;

    margin-right: 2%;

}

#dirlisting tr.entry td.icon,td.filename,td.size,td.date {

    border-bottom: groove;

}

#dirlisting td.size {

    width: 50px;

    text-align: right;

    padding-right: 5px;

}

 

/* horizontal lines */

hr {

      margin: 0;

}

 

/* page displayed footer area */

#footer {

      font-size: 9px;

      padding-left: 10px;

}

 

 

body

:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }

:lang(he) { direction: rtl; float: right; }

 --></style>

</head><body id=ERR_READ_ERROR>

<div id="titles">

<h1>ERROR</h1>

<h2>The requested URL could not be retrieved</h2>

</div>

<hr>

 

<div id="content">

<p>The following error was encountered while trying to retrieve the URL: <a href="http://cpxxxx.pushapi.eval.blackberry.com/mss/PD_subReg?">http://cpxxxx.pushapi.eval.blackberry.com/...

 

<blockquote id="error">

<p><b>Read Error</b></p>

</blockquote>

 

<p id="sysmsg">The system returned: <i>(104) Connection reset by peer</i></p>

 

<p>An error condition occurred while reading data from the network. Please retry your request.</p>

 

<p>Your cache administrator is <a href="mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_READ_ERROR&amp;body=CacheHost%3A%20pmds164%0D%0AErrPage%3A%20ERR_READ_ERROR%0D%0AErr%3A%20(104)%20Connection%20reset%20by%20peer%0D%0ATimeStamp%3A%20Fri,%2027%20Jun%202014%2009%3A40%3A23%20GMT%0D%0A%0D%0AClientIP%3A%20127.0.0.1%0D%0AServerIP%3A%20206.53.155.184%0D%0A%0D%0AHTTP%20Request%3A%0D%0AGET%20%2Fmss%2FPD_subReg%3Fserviceid%3Dxxxx-603478eDD8t6M41afr972182h9a164989s0%26osversion%3D7.0.0.296%26model%3D9860%20HTTP%2F1.1%0ARim-device-guid%3A%20GPMDSEU01%0D%0AHost%3A%20cpxxxx.pushapi.eval.blackberry.com%0D%0ARim-device-id%3A%2028630bf7%0D%0AVia%3A%20BISB_3.5.1.96%0D%0AAccept%3A%20*%2F*%0D%0AConnection%3A%20close%0D%0A%0D%0A%0D%0A">webmaster</a>.</p>

<br>

</div>

 

<hr>

<div id="footer">

<p>Generated Fri, 27 Jun 2014 09:40:23 GMT by pmds164 (squid/3.1.16)</p>

<!-- ERR_READ_ERROR -->

</div>

</body></html>

 

 

As you can see from the response, it is saying "Error : The requested URL could not be retrieved". I was getting rc 200 as response previously. I think my problem is very much similar to this 

http://supportforums.blackberry.com/t5/BlackBerry-Push-Development/Push-registration-stopped-working....

Please use plain text.
Developer
simon_hain
Posts: 16,190
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: BB OS 7 Push - Port [xxxxx] is unavailable

you would have to contact BlackBerry directly if the push eval URL does not work, that issue is not related to the "port already in use".
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
New Developer
mailkishorev
Posts: 8
Registered: ‎06-27-2014
My Device: 9900,9860

Re: BB OS 7 Push - Push Evaluation Credentials not working - Connection reset by peer

[ Edited ]

I have mailed BlackberryPushServices and logged an issue in Blackberry JIRA regarding Push eval credentials not working but still got no repsonse. Can u guide what to do next ?

Please use plain text.
Developer
simon_hain
Posts: 16,190
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: BB OS 7 Push - Push Evaluation Credentials not working - Connection reset by peer

i'll escalate the issue internally
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.