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
Developer
Posts: 95
Registered: ‎01-25-2010
My Device: 9530
Accepted Solution

XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

[ Edited ]

hi

 

 My system is running under proxy and i have confifured mds setting from Article Number: DB-00047.

 After this setting i am able to make http connection.

 i have downloaded XMPP open source code from this link. and i am trying to make socket connection with my gmail account by following way but it throw  net.rim.device.cldc.io.ippp.SocketBaseIOException:   Connection refused: exception but  when i add device side true it throw "java.io.IOException: Peer refused the connection".

 

final StreamConnection connection = (StreamConnection) Connector.open("socket://" + this.host + ":" + this.port, Connector.READ_WRITE);

 

i have also tried by adding deviceside="true" and "false" parameter but i got same result.please help where i am doing wrong or it is  still proxy problem that do not allow socket connection. Any thoughts or ideas is greatly appreciate.

 

Thank You.

 

 

Developer
Posts: 95
Registered: ‎01-25-2010
My Device: 9530

Re: XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

Any idea, comment will  really helpful.

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

Hi,

 

Could you try the SocketDemo as well as the HTTPDemo to connect to a few known servers, both using ";deviceside=false"? This will help to remove the third-party library as a possible cause and see if your network environment may be a contributing factor.

 

Let me know the results when you have them, being sure to include the full URLs used in either test.

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Posts: 95
Registered: ‎01-25-2010
My Device: 9530

Re: XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

[ Edited ]

Hi ,

thank you for reply.

I have tried  both demo using ";deviceside=false". I am able to run HTTPDemo using www.google.com.

but when tried sockte demo by using talk.google.com  it throw "net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect" exception at line  "exchange("Hello");". I

 

Thank You

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

Are you able to connect to any other Socket Servers (other than Google)? Have you also tried this from outside your environment?

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Posts: 95
Registered: ‎01-25-2010
My Device: 9530

Re: XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

[ Edited ]

I have also tried by chat.aim.com but same result.

Yes i have also tried to test same code from out side of my enviroment and its running fine.

 

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

If the same code is working outside of your environment then it would make your environment the likely point of failure, not the code or simulators.

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Posts: 95
Registered: ‎01-25-2010
My Device: 9530

Re: XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

[ Edited ]

hi,

 

 ok, so there is any other setting require for socket connection under proxy? because i am able to make http connection and my desktop's browser also open these links.

 

Thank You

 

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

The MDS-CS Simulator currently only allows proxies to be configured for straight HTTP connections.

 

Regards,

Garett
@garettBeuk
--
Goodbye everybody!
Developer
Posts: 95
Registered: ‎01-25-2010
My Device: 9530

Re: XMPP? net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection refused: connect

[ Edited ]

Thank you gbeukeboom for solving  issue.