Skip to main content

All Questions

Tagged with
1 vote
1 answer
34 views

how to decide if SocketTimeoutException means there is no connection

we have a retrofit java client to a server running in gui app, we want to notify the user if there is no connection to the server, there are some exceptions that are obvious like ConnectException or ...
Shin938's user avatar
  • 979
2 votes
1 answer
2k views

SQLNonTransientConnectionException: Socket fail to connect to host. Error when trying to connect to remote MariaDB with Java

I'm facing an issue while connecting to a remote MariaDB database from my work using Java. I have to use an SSH connection. For the SSH part, I'm using the dependency Jsch <dependency> <...
Agustin's user avatar
  • 21
0 votes
0 answers
1k views

How to create a mock response or simulate socket timeout exception?

I am calling an external api and receiving a runtime exception for socket timeout. Is there a way I can recreate or mock simulate this socket timeout exception by creating a mock response.
Karan Nayyar's user avatar
0 votes
1 answer
165 views

How to handle socket exceptions to make a continuous flow of program in Java?

I am creating a skribbl clone in Java using JavaFX and socket programming. I am sending data over a TCP connection using a objectinput/outputstream. Every 2/5 times the application runs without any ...
Vinayak Kushwaha's user avatar
1 vote
0 answers
170 views

Software caused connection abort Client receive

I'm making an app in Android studio and I'm getting an IOException which is unpredictable nor have I managed to replicate it. W/TcpProtocolLayer: Connection to /x.x.x.x:x closed. W/System.err: java....
Alphacell's user avatar
0 votes
1 answer
554 views

java.net.SocketException: An established connection was aborted by the software in your host machine

I am trying to make a simple chat application using Java sockets, here is the code for the server: public ServerSocket ss; public ArrayList<Client> Clients = new ArrayList<Client>()...
Iyad's user avatar
  • 73
0 votes
1 answer
62 views

Socket closed inside XWM

I have an SQL exception inside a piece of code that works under and scheduled process every day. The patch of code is as follows: log.info("*************inicio getFactsBajaRelsNoCerradas*********...
Grismak's user avatar
  • 316
1 vote
0 answers
442 views

System.Net.Sockets.SocketException error while calling Java API from .NET

Hope you are doing well. Basically I am calling Java API from .NET . Most of the time it is working absolutely fine but the thing it sometimes once or twice in a day it gives me Socket exception. I am ...
Kantarkatax's user avatar
1 vote
0 answers
46 views

Socket not throwing exception when not connecting

executor.submit(() -> { socket = new Socket(host, port); return null; }).get(); As the code is now, if I try to input lets say letters or something in the ip I get an exception,...
Nameles36's user avatar
0 votes
1 answer
812 views

Send Object Over Java Socket

I have a class name player public JLabel imagen; public String Nombre; public Player(int x, int y, int width, int height, Icon icono, String name){ imagen = Player(x, y, width, height, icono); ...
Holis's user avatar
  • 175
0 votes
1 answer
44 views

Why does my Program not register that a socket could not have been created?

I made a little Chess application and there is an offline mode in case you can't connect to the server. The client should try to connect, catch the UnknownHostException and then continue on. But ever ...
Maihoo's user avatar
  • 31
1 vote
0 answers
2k views

How to resolve "java.net.SocketException: Connection reset" in java socket

I write a socket server demo, socket server code: when i run server, it's ok. so i run client to connect it my server code: public class BIOSocketServer { //TLV /** * data frame size: 100 * 1st ...
君主不是你's user avatar
2 votes
1 answer
497 views

What is the exact difference between "Connect timed out" and "failed to connect to" in java.net.SocketTimeoutException?

In my log, I could find two SocketTimeoutException. 1. SocketTimeoutException: connect timed out Caused by: java.net.SocketTimeoutException: Connection timed out at java.net.PlainSocketImpl....
Anderson Choi's user avatar
0 votes
1 answer
94 views

Handling an exception in a tcp java socket project [duplicate]

I'm trying to build a client/server application in which the client gives commands to the server and depending on the command, the server executes different functionalities. My client codes goes as ...
user avatar
0 votes
1 answer
2k views

Running into an java.net.BindException: Address already in use (Bind failed) on server- client socket app

I am Running into a java.net.BindException: Address already in use (Bind failed) on a server-client socket app I am trying to learn about Java sockets using a Youtube tutorial as a reference. My code ...
Monique's user avatar
  • 299

15 30 50 per page
1
2 3 4 5
11