Questions tagged [connectexception]

77 questions
1
vote
0 answers

Catch java.net.ConnectException: Connection refused: connect

How can I catch ConnectException to inform the user, if the server is down (not available). I build a login with this code: Form form = new Form() .param("username", userName) .param("password", password); try { …
emoleumassi
  • 4,881
  • 13
  • 67
  • 93
1
vote
1 answer

How to fix the "connection refused" exception in an IntelliJ plugin

I'm developing a plugin for IntelliJ (Community edition 15.0.3) from scratch. Since the beginning I've had the exception below. Hopefully some one can help me understand why I'm getting this warning and how I should fix it? Error Message: WARN:…
1
vote
1 answer

How to handle ConnectException: Connection refused - Java

I am trying to parse some url's with Jsoup but I get this error: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at…
yasuo
  • 37
  • 6
1
vote
1 answer

persistence is not using a given port to connect with MySQL DB

I'm trying to connect from my JEE app to mysql database- During deployment I'm getting an error -connection refused (but with information that refused on 1527 port). I can't get what is wrong, and why there is a try to connect to my database on…
Krystian
  • 2,221
  • 1
  • 26
  • 41
1
vote
1 answer

hbase can not connect to zookeeper?

I run hbase with start-hbase.sh, but the log file output exception as follow: 2015-09-12 18:39:37,935 WARN [RS:0;roger-ubuntu:54809-SendThread(localhost:2181)] zookeeper.ClientCnxn: Session 0x14fc12354a40004 for server null, unexpected error,…
roger
  • 9,063
  • 20
  • 72
  • 119
1
vote
2 answers

Java: ConnectException/Cannot find or load Main-Class

So in a nutshell, I'm just trying to get a small working skeleton program that I can use to sort of learn about Http communication and "feel" my way around to figure out what I will eventually need for a bigger program I am working on. This…
botch
  • 167
  • 1
  • 10
1
vote
2 answers

HttpURLConnection- connect() throws Java ConnectException

I use the code public static int getResponseCode(String urlString) throws MalformedURLException, IOException { URL u = new URL(urlString); HttpURLConnection huc = (HttpURLConnection) u.openConnection(); …
Shari
  • 123
  • 1
  • 1
  • 9
1
vote
1 answer

Running Java RMI application on two machines - ConnectException

Long story short - I am trying to run an RMI application with a client and a server on separate machines using Windows. The simplified code in the server is: System.setProperty("java.rmi.server.hostname", "192.168.x.x"); Registry reg =…
PetarMI
  • 390
  • 1
  • 7
  • 15
1
vote
0 answers

java.net.ConnectException: Connection refused with 'ant reload' and 'ant start'

Below are the changes i did.....but it is not resolving the issue.... Not sure what I am…
1
vote
1 answer

Java RMI: ConnectException: Connection timed out: connect

I realize this question has been asked many times and answered many times (often from EJP, who clearly knows his stuff!), but I am still struggling. I have "stolen" a simple RMI Adding Server and Client. (Thank you,…
KSK
  • 149
  • 3
  • 15
1
vote
0 answers

Error on some urls only : java.net.ConnectException: Connection timed out: connect

I would like to download ics files with a Java application, so that I simply tried the code at this page : http://hc.apache.org/httpclient-legacy/tutorial.html (at the bottom). All is right with many urls, but this one gaves me the error in title :…
Perrine C
  • 21
  • 1
  • 5
1
vote
2 answers

Spring/RMI server error

We have a Spring MVC web app (WAR) deploying to Tomcat (6.0.35) that launches a thread inside a separate JVM at deploy time (don't ask why - not my design) and then communicates with that thread via RMI over port 8888. Despite being totally…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
0
votes
1 answer

Not able to access Cassandra server from Android app. Error : java.net.ConnectException: localhost/127.0.0.1:9160 - Connection refused

My Adnroid app is running on AVD and Cassandra server is running on Windows 7 (same machine) Below is the code snippet I have used for connecting to Cassandra client. TTransport tr = new TFramedTransport(new TSocket("127.0.0.1", 9160)); TProtocol…
0
votes
2 answers

Flutter First App Exception -> Exception in thread "main" java.net.ConnectException: Connection timed out: connect

I'm trying to learn Flutter and trying to initialize first app. I've applied all steps in Flutter getting started page but still getting exception like Launching lib\main.dart on sdk gphone64 x86 64 in debug mode... main.dart:1 Exception in thread…
0
votes
0 answers

Uncaught GuzzleHttp\Exception\ConnectException even with catch

sorry to ask a question to which there are already many answers but I followed the suggestions given here Catch Guzzle exceptions on connections refused without being able to solve. I keep getting the PHP error Uncaught…