cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
1097
Views
0
Helpful
2
Replies

Exception:java.net.ConnectException: Connection refused: connect

davidblair
Level 1
Level 1

So there's this IP phone, see...actually a couple of them...they don't like my servlet sending http requests to them.

Here's one of my logs for today to one of them.

Start Paging: May 13, 2005 1:32:36 PM

PP401-Opened: 172.29.1.103

Start Push: 172.29.1.103 at 0

Finish Push: 172.29.1.103 at 219

Start Paging: May 13, 2005 1:48:11 PM

PP401-Opened: 172.29.1.103

Start Push: 172.29.1.103 at 0

Finish Push: 172.29.1.103 at 1250

Exception:java.net.ConnectException: Connection refused: connect

First push good, second push bad...and it's ittermittent on when it wants to refuse.

I was wondering if any of the other java programmers have run into this, if there's a way to fix it, or if it's a fluke I can get past by using Jtapi's Terminal.sendData() instead of a httpURLConnection directly to the phone?

DB

2 Replies 2

aaronw.ca
Level 5
Level 5

You could try sendData. sendData doesn't have to authenticate before sending (because jtapi is already authenticated), which might help.

How close apart are the two requests? What is the phone returning, an errorcode?

How close apart are the two requests?

16 minutes by the log...so no race condition or security violation there.

What is the phone returning, an errorcode?

I pulled this snippet from the java forums:

"Connection refused means you connected to a server but there was no server listening on the port you used."

Maybe my IP address is getting malformed sometimes? I'll have to re-check my code and test that possibility...

On the flip side, all servers were shutdown and reset on Friday (midwest storms) and the logs on Saturday looked beautiful...no errors at all.

My next build of this app will be using Terminal.sendData for the push, so that's good to know about the authentication, thanks Aaron!