Questions tagged [connectexception]

77 questions
0
votes
0 answers

HttpsURLConnection POST method: java.net.ConnectException: Connection timed out: connect

I have been trying to use an API with HttpsURLConnection POST method which sends an SMS. The class works fine when I call the function from the main function of the same class. However when I call the function from another class or jsp, It throws…
0
votes
1 answer

java.net.ConnectException while Source Validation in Java

I was practicing the Source validation using HTTP in java and I came across this error. In the following source code I was trying to get the source code of a website and thus I used the HttpClient and other methods of java.net.http, I was expecting…
Shashank Deepak
  • 163
  • 1
  • 8
0
votes
2 answers

Why can't my app connect to localhost with easyphp devserver?

I'm making an android app that retrieves informations from a web page. In short, there's the code : protected Void doInBackground(String... params) { HttpURLConnection conn = null; try { URL url; url = new…
mcourpot
  • 315
  • 1
  • 4
  • 15
0
votes
0 answers

Jenkins Active Directory integration

I am trying to integrate Active directory for logging on Jenkins and facing a strange issue. I have a local setup of Jenkins on Tomcat on Windows and able to achieve Active Directory integration using Active Directory Plugin. But when I put the same…
0
votes
0 answers

Android service can't connect to server after recreation only in battery saving mode

I'm writing a chat app with the server and Android client written in Kotlin. I create a background service that constantly reads from the socket connected to the server and sends notifications when a message arrives. Everything works fine until user…
Lena
  • 31
  • 2
0
votes
0 answers

Setting up a simple server/client, getting "java.net.ConnectException: Connection refused: connect"

I'm struggling with setting up my first server/client connection. My GUI has a dialog. Upon pressing a Send Button inside of that, I call client.connect(). It works the first time, but when I go ahead and reopen the dialog (it closes by itself after…
sonti yo
  • 61
  • 1
  • 9
0
votes
1 answer

WeightingScale Issues Due to Applets

In our application we load applet to read data from serial ports and USB ports of the machine. The applet code is working fine from past so many years but when we migrated to IE 11.0.44 version, the browser is hanging for 2 to 3 minutes while…
0
votes
2 answers

ConnectException on one machine but not on another

I have the following code snippet: private static String post(String msg) throws Exception { URL urlObj = new URL(host); HttpURLConnection con = (HttpURLConnection) urlObj.openConnection(); System.out.println(String.format("Send to url…
ohseekay
  • 795
  • 3
  • 20
  • 37
0
votes
1 answer

URL openConnection by mobild data throws ConnectException when Device sleep

I create an HttpURLConnection in a Thread or AsyncTask and it works fine. But when the Device is in sleep mode, (Display is Off...) then I get an Exception by open the Connection -> java.net.ConnectException: Connection refused. My idea is to wake…
0
votes
1 answer

Error java.net.ConnectException: failed to connect after 24000ms: ECONNREFUSED (Connection refused)

I've searched many hours across the net, only found this as answer. However, I don't know where to use this in my code. public final static int GET=1; public final static int POST=2; public final static int PUT=3; public final static…
mrLovaLova
  • 187
  • 2
  • 14
0
votes
2 answers

Client can not connect zu Server

im trying to connect a client to a server. The server is running, but when i try to connect the client i get this error: "Exp_Client cannot connect to Exp_Server. Connection refused to host: 127.0.0.1.; nested exception is:…
Max Meyer
  • 1
  • 1
0
votes
1 answer

Socket Programming ConnectException

Im trying a socket programming to build an app to send and receive messages it also uses cryptography everything is set and working except that the Connect Exception: it is constantly saying connection timed out... i have this code on working socket…
DeWy Sady
  • 320
  • 2
  • 16
0
votes
1 answer

How to solve ConnectException error when using Boilerpipe?

I want to use Boilerpipe to extract text from a newspage on several website, the problem is that every time I try it, I get a ConnectionException error. I just used the example syntax from the boilerpipe quickstart guide : URL url = new…
Malik
  • 207
  • 1
  • 2
  • 14
0
votes
2 answers

Connection Time out error for Crawler while using Jsoup for crawler

I am trying to execute a crawler program from my office. A very basic one which is available in internet and which works fine in my home PC. However while I am trying to run the same program in my office PC i am getting connect timed out error. I…
KRam1802
  • 31
  • 1
  • 11
0
votes
1 answer

Java FTP connection timed out

I am working on a project which will later upload a few files to an FTP server after they are modified...I have everything but uploading the file figured out. I can successfully connect to the FTP server, but once the file goes to upload, the…
user4490680
  • 1
  • 1
  • 1
  • 2