This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

https -- connects fine on windows / error on unix

 
Mike Ev
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recently I had been struggling with some code to get a https connection to work. It was coming up with an error that no trusted certificates could be found. I resolved that thanks to some feedback and sites but i've encountered a new problem -- I'm working on the program on Windows and putting into a unix server to be run. This worked fine initially with no problems, then the server changed from http to https, so I had to implement some changes to deal with this -- now however, even though it works fine on windows when put on unix, it throws up this error

java.net.ConnectException: Connection refused

here's the code..


Any ideas why unix isnt liking this? Thanks a lot
 
Richard Waldicott
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Connection refused" indicates that a socket connection could not even be established. This sounds like a possible firewall or routing issue. Try connecting manually from the UNIX box from the shell using the following command

telnet hostname 443

this assumes that 443 is the port your HTTPS is running on. If you can't establish a connection then there is something going on with our firewall, or the hostname just can't be accessed from the UNIX box. Also try a ping.

e.g.

ping hostname
 
Mike Ev
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi thanks for the reply. I logged on to the unix server, and used
telnet thehostname 7777
and it seemed to connect ok. I then typed 'ls' and this happened:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>501 Method Not Implemented</TITLE>
</HEAD><BODY>
<H1>Method Not Implemented</H1>
ls to /index.html not supported.<P>
Invalid method in request ls<P>
<HR>
<ADDRESS>Oracle-Application-Server-10g/10.1.2.2.0 Oracle-HTTP-Server Server at [thehostname] 443</ADDRESS>
</BODY></HTML>
Connection closed by foreign host.


[thehostname] was the correct hostname. I'm not familiar with telnet so perhaps that's fine. When typing telnet hostname 443 that has 'connection refused'... a little confused why 443 is appearing in the display above.

In the java program, i put a to show what port the url is (on windows), and its coming up as 7777 still so i would assume thats correct. Wonder why windows can do with this and unix cant. Not that it should matter but the program when on unix is on the same server the url is on.

Any more suggestions?
Thanks

Oh and using ping seems to work fine, receives several packets.

[ June 12, 2007: Message edited by: Mike Ev ]
[ June 12, 2007: Message edited by: Mike Ev ]
 
Mike Ev
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just bumping.. any suggestions at all?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic