• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error : java.net.ConnectException: Connection refused

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I tried connecting a remote Unix server using Java code.I gave my remote IP address and my system IP address for the connection purpose.I am getting an exception like java.net.ConnectException: Connection refused

Herewith i furnished my code as well.Kindly guide me to connect to the remote host.

 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You do know we have other forums here as well, right? I quote myself from 10 days ago in your previous thread:

Rob Spoor wrote:I've read your post but I can't find any user interface related code in there, not even in the imports. Please CarefullyChooseOneForum.


This time I'm moving this to our Sockets and Internet Protocols forum.

The reason for this exception is clear from the message: you don't have access to connect. Either the SSH connection to 172.25.33.56 fails or the tunneling fails. I can't tell which because you don't show the exception stack trace. Please TellTheDetails.

Rob Spoor wrote:I suggest you try alternatives like JSch.


Well, at least you've followed that piece of advice.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The reason may be because of your unix server is stopped by someone, when you are trying to access at the same time
reply
    Bookmark Topic Watch Topic
  • New Topic