Содержание
- Java.net.ConnectException: Connection timed out: no further information — Решение
- Connection timed out: no further information – особенности дисфункции
- Как исправить «Java.net.ConnectException: Connection timed out»
- How to Fix ‘Connection refused: no further information’ Error on Minecraft
- Fix: ‘io.netty.channel.AbstractChannel$AnnotatedConnectException’ Error on Minecraft
- What Causes the Connection Refused Error?
- Power-Cycle your Network
- Reset your Network Configurations
- Add Exception in Firewall
- Add the IP address and Port Before Connecting
- Check for Port Filtering
- Check ISP Network Access
Java.net.ConnectException: Connection timed out: no further information — Решение
При попытке подключения к серверу «Майнкрафт» пользователь может столкнуться с сообщением «Java.net.ConnectException: Connection timed out: no further information». Появление данного сообщения обычно сигнализирует о возникновении различного рода сетевых проблем при получении доступа к игровому серверу, из-за чего желание пользователя насладиться игровыми мирами «Майнкрафт» остаётся нереализованным. Ниже я разберу суть данной дисфункции, опишу её причины, а также поясню, как исправить ошибку Java.net.ConnEctexception на вашем ПК.
Connection timed out: no further information – особенности дисфункции
В переводе текст данного сообщения выглядит примерно как «Сетевой сбой Java. Время соединения истекло: дальнейшая информация отсутствует».
Указанная ошибка Java.net.ConnectException обычно возникает во время подключения к серверу игры «Майнкрафт», но также фиксировались спорадические случаи появления данной ошибки при работе других продуктов, использующих «Java» (к примеру, на «Azure notification hub»).
Появление проблемы «Java.net.ConnectException: Connection timed out: no further information» имеет следующие причины:
- Пользователь использует нестабильное сетевое соединение с медленным интернетом;
- На ПК пользователя установлена устаревшая версия «Java»;
- Пользователь пользуется устаревшей версией «Майнкрафт»;
- Наблюдаются сбои в работе игрового сервера, к которому пробует подключиться пользователь (ресурс не доступен, проходят технические работы и др.);
- Антивирус или брандмауэр блокирует подключения к игровому серверу;
- Пользователь использует динамический IP;
- Пользовательский роутер работает некорректно.
Как исправить «Java.net.ConnectException: Connection timed out»
Существуют несколько способов избавиться от ошибки Java.net.ConnectException. Рассмотрим их по порядку:
- Перезагрузите ваш PC. В некоторых случаях данный простой метод позволял решить ошибку java.net.connectexception connection refused;
- Установите на ПК свежую версию «Java». Довольно частой причиной рассматриваемой проблемы является устаревшая версия «Java» на пользовательском ПК. Перейдите в Панель управления, затем в «Программы», там найдите «Java» и кликните на неё. После появления окна её настроек перейдите на вкладку «Update», нажмите там на кнопку «Update Now», и установите в системе требуемые обновления.
Данную процедуру необходимо провести как на вашей машине, так и на машине того пользователя, с которым вы собираетесь играть в «Майнкрафт» по сети;
- Внесите «Майнкрафт» в исключения брандмауэра и антивируса на вашем ПК. Запустите Панель управления, перейдите в «Система и безопасность», там найдите «Брандмауэр Виндовс» и кликните на него. В открывшемся окне настроек брандмауэра слева сверху выберите опцию «Разрешения взаимодействия…».
В открывшемся окне разрешённых для внешнего подключения программ найдите программы с упоминанием «Java», и поставьте им галочки для разрешения подключения (поможет кнопка «Изменить параметры»). Нажимаем на «Ок» для сохранения результата, перезагружаемся и пробуем подключиться к серверу. С антивирусом необходимо проделать аналогичные операции, внеся «Java» и «Майнкрафт» в его исключения;
Установите самую свежую версию программы
Источник
How to Fix ‘Connection refused: no further information’ Error on Minecraft
Fix: ‘io.netty.channel.AbstractChannel$AnnotatedConnectException’ Error on Minecraft
Quite recently a lot of reports have been coming in of users encountering the error “io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information” while trying to connect to a server. This error is not limited to a single server and persists across all of them.
Error message “io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information” while trying to connect to the server
What Causes the Connection Refused Error?
After receiving numerous reports from multiple users we investigated the issue and devised a set of solutions that solved the problem for most of the users. Also, we looked into the reasons due to which the error is triggered and listed them below. For that:
- IP issue: In some cases, the problem is caused due to the wrong IP address or the port listed while trying to connect to a server. The IP address along with the correct port is used to forward your connection to the server and connection is established once the server approves. Unless you are using a static IP address, that is quite rare, the IP address assigned to you by the ISP changes from time to time, and multiple users might be allocated the same IP address. Therefore, the IP address needs to be edited from time to time.
- Firewall: Also it is possible that the Windows Firewall that you are using might be blocking your connection to the server. Both the Java files and the game directory is to be added to the exclusion list of the Windows Firewall in order for the game to connect to the server properly.
- Outdated Java: Minecraft requires the Java software to be updated to the latest version in order for it to work properly. If the Java is outdated on your device and the launcher has been updated to the latest version it might cause conflicts with certain elements of the game and prevent proper connection to the server.
- Incompatible Software: There is a list of software that is not compatible with Minecraft and causes issues if they are installed on the computer on which you are trying to connect to the server. Minecraft has an official list of software that is not compatible with the game and causes conflicts.
Now that you have a basic understanding of the nature of the issue we will move on towards the solutions. It is recommended that you try these solutions in the specific order in which they are provided to ensure that no conflicts occur.
Power-Cycle your Network
Whenever the internet router is reset the IP address that is provided by the ISP is changed unless you are using a static IP address. Therefore, in this step, we will be reinitializing the internet settings and the DNS cache by completely power cycling the Internet Router. For that:
- Disconnect the power from the internet router.
Disconnecting Power cord
- Wait for 5 minutes and reconnect the power.
- When internet access is granted try to connect to the server and check to see if the issue persists.
Reset your Network Configurations
Your Windows Network configurations can also be a culprit here, as it’s possible that your Network settings are configured incorrectly. For resetting network configurations, follow the steps below:-
- Search for the Command Prompt in the Windows Search bar then click “run as administrator”.
Running Command Prompt
- Once the Command Prompt window is opened, type the following commands one by one:-
- Restart your computer and check to see if the issue persists.
Add Exception in Firewall
It is possible that the Windows Firewall that you are using might be blocking your connection to the server. Therefore, in this step, we will be adding an exception in the Firewall for some executables in the Minecraft folder that need internet access. For that:
- Click on the start menu and select the Settings icon.
- In the Settings, click on the “Updates & Security” option.
- Select the “Windows Security” from the left pane and select the “Firewall & Network Protection” option.
- Scroll down and select the “Allow an App through Firewall” option.
- Click on “Change Settings” and select “Yes” on the warning prompt.
- Select the “Allow another app” from the options and click on “Browse“
- Navigate to the game installation directory and select the game and the launcher executable.
- Now repeat the above process again and this time navigate to the directory where you have the Minecraftservers installed.
- Open the “Maxwell” folder and then the “MinecraftServer” folder.
- Now allow both the Javaexecutables located inside the folder in the same way.
- Now repeat the process again and instead of clicking “Allow another app” after selecting the “change” option simply scroll down the list of apps available and allow all the “Java Platform SE Binary” options through both the “Private” and “Public” networks.
The applications that need to be allowed through the firewall
- Open the Minecraft launcher, try to connect to the server, and check to see if the issue persists.
Allowing an application through the firewall
Add the IP address and Port Before Connecting
If the IP address that you are using is not a static one, it will change every couple of days or whenever the Internet Connection is reset. Therefore, in this step, we are going to be checking the IP address and the correct port for the game and add it to the Minecraft Launcher. For that:
- Click on the search bar on the Windows toolbar and type in “Command Prompt“.
- Right–click on the icon and select “Runas Administrator“.
Right-clicking on the Command Prompt icon and selecting Run as Administrator
- Type in “ipconfig” and note down the “IPV4Address“.
Typing in ipconfig in the command prompt
- Also, Navigate to the “Minecraft Servers folder>Maxwell (some random numbers)> MinecraftServer” and open the “Server Properties” text document.
Opening the “Server Properties” text document and noting down the server port
- Note down the “Server Port” listed there. In our case it was “25565” it should be similar in most cases however in some it is not.
- Now open up Minecraft and navigate to the “Play Multiplayer” option.
- Select the server which you want to join by clicking on it and select “Edit” from the below options.
Clicking on the server and selecting “Edit”
- The server name can be according to your preference but the “Address” needs to be the IPV4 address that we noted and the port number for example “XXX.XXX.X.X:25565” the “25565” is the port number and it may vary.
Editing the Server Address and clicking on Done
- Click on “Done“, click on “Refresh” and check to see if the issue persists.
Note: There are some applications that are generally incompatible with certain elements of Minecraft and cause issues with it. The list of applications is available here. If these are installed on the computer on which the server is running from or on your computer you will continue to face issues with the game.
Check for Port Filtering
We came across numerous instances where users were accidentally filtering ports. Even though the port forwarding was working alright, the filtering automatically nullifies it and you will not be able to connect to Minecraft servers.
Here, what you can do is check your router’s and your local machine’s network configurations and make sure that port filtering isn’t turned on and if it is, the correct ports are being filtered.
Check ISP Network Access
If none of the above methods work, you should check your ISP’s network access. ISPs sometimes block network access to specific domains and don’t allow you to go through. Contact your ISP and verify that internet access isn’t indeed blocked.
Furthermore, you can also change your internet connection to your smartphone’s 3G and see how that works out for you. If it does, it probably means that your ISP is blocking you and you need to change your network.
If Minecraft is working with the Mobile Data it means that your ISP is blocking the connection. If that’s the case please contact your ISP to get your issue resolved.
Источник
I’m trying to implement a TCP connection, everything works fine from the server’s side but when I run the client program (from client computer) I get the following error:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at TCPClient.main(TCPClient.java:13)
I tried changing the socket number in case it was in use but to no avail, does anyone know what is causing this error & how to fix it.
The Server Code:
//TCPServer.java
import java.io.*;
import java.net.*;
class TCPServer {
public static void main(String argv[]) throws Exception {
String fromclient;
String toclient;
ServerSocket Server = new ServerSocket(5000);
System.out.println("TCPServer Waiting for client on port 5000");
while (true) {
Socket connected = Server.accept();
System.out.println(" THE CLIENT" + " " + connected.getInetAddress()
+ ":" + connected.getPort() + " IS CONNECTED ");
BufferedReader inFromUser = new BufferedReader(
new InputStreamReader(System.in));
BufferedReader inFromClient = new BufferedReader(
new InputStreamReader(connected.getInputStream()));
PrintWriter outToClient = new PrintWriter(
connected.getOutputStream(), true);
while (true) {
System.out.println("SEND(Type Q or q to Quit):");
toclient = inFromUser.readLine();
if (toclient.equals("q") || toclient.equals("Q")) {
outToClient.println(toclient);
connected.close();
break;
} else {
outToClient.println(toclient);
}
fromclient = inFromClient.readLine();
if (fromclient.equals("q") || fromclient.equals("Q")) {
connected.close();
break;
} else {
System.out.println("RECIEVED:" + fromclient);
}
}
}
}
}
The Client Code:
//TCPClient.java
import java.io.*;
import java.net.*;
class TCPClient {
public static void main(String argv[]) throws Exception {
String FromServer;
String ToServer;
Socket clientSocket = new Socket("localhost", 5000);
BufferedReader inFromUser = new BufferedReader(new InputStreamReader(
System.in));
PrintWriter outToServer = new PrintWriter(
clientSocket.getOutputStream(), true);
BufferedReader inFromServer = new BufferedReader(new InputStreamReader(
clientSocket.getInputStream()));
while (true) {
FromServer = inFromServer.readLine();
if (FromServer.equals("q") || FromServer.equals("Q")) {
clientSocket.close();
break;
} else {
System.out.println("RECIEVED:" + FromServer);
System.out.println("SEND(Type Q or q to Quit):");
ToServer = inFromUser.readLine();
if (ToServer.equals("Q") || ToServer.equals("q")) {
outToServer.println(ToServer);
clientSocket.close();
break;
} else {
outToServer.println(ToServer);
}
}
}
}
}
asked Jul 29, 2011 at 16:37
Samantha CataniaSamantha Catania
5,0185 gold badges42 silver badges69 bronze badges
8
This exception means that there is no service listening on the IP/port you are trying to connect to:
- You are trying to connect to the wrong IP/Host or port.
- You have not started your server.
- Your server is not listening for connections.
- On Windows servers, the listen backlog queue is full.
tk_
15.8k8 gold badges80 silver badges89 bronze badges
answered Jul 29, 2011 at 16:41
Collin PriceCollin Price
5,5403 gold badges34 silver badges35 bronze badges
9
I would check:
- Host name and port you’re trying to connect to
- The server side has managed to start listening correctly
- There’s no firewall blocking the connection
The simplest starting point is probably to try to connect manually from the client machine using telnet or Putty. If that succeeds, then the problem is in your client code. If it doesn’t, you need to work out why it hasn’t. Wireshark may help you on this front.
answered Jul 29, 2011 at 16:39
Jon SkeetJon Skeet
1.4m851 gold badges9046 silver badges9133 bronze badges
4
You have to connect your client socket to the remote ServerSocket. Instead of
Socket clientSocket = new Socket("localhost", 5000);
do
Socket clientSocket = new Socket(serverName, 5000);
The client must connect to serverName which should match the name or IP of the box on which your ServerSocket
was instantiated (the name must be reachable from the client machine). BTW: It’s not the name that is important, it’s all about IP addresses…
answered Jul 29, 2011 at 17:21
6
I had the same problem, but running the Server before running the Client fixed it.
answered Jul 25, 2012 at 18:09
Dao LamDao Lam
2,81711 gold badges36 silver badges44 bronze badges
3
One point that I would like to add to the answers above is my experience—
«I hosted on my server on localhost and was trying to connect to it through an android emulator by specifying proper URL like http://localhost/my_api/login.php
. And I was getting connection refused error«
Point to note — When I just went to browser on the PC and use the same URL (http://localhost/my_api/login.php
) I was getting correct response
so the Problem in my case was the term localhost
which I replaced with the IP for my server (as your server is hosted on your machine) which made it reachable from my emulator on the same PC.
To get IP for your local machine, you can use ipconfig
command on cmd
you will get IPv4 something like 192.68.xx.yy
Voila ..that’s your machine’s IP where you have your server hosted.
use it then instead of localhost
http://192.168.72.66/my_api/login.php
Note — you won’t be able to reach this private IP from any node outside this computer. (In case you need ,you can use Ngnix for that)
answered Feb 26, 2018 at 16:50
eRaisedToXeRaisedToX
3,1512 gold badges20 silver badges28 bronze badges
0
I had the same problem with Mqtt broker called vernemq.but solved it by adding the following.
$ sudo vmq-admin listener show
to show the list o allowed ips and ports for vernemq
$ sudo vmq-admin listener start port=1885 -a 0.0.0.0 --mountpoint /appname --nr_of_acceptors=10 --max_connections=20000
to add any ip and your new port. now u should be able to connect without any problem.
Hope it solves your problem.
answered Apr 5, 2016 at 7:58
MrOnyanchaMrOnyancha
6055 silver badges28 bronze badges
1
Hope my experience may be useful to someone. I faced the problem with the same exception stack trace and I couldn’t understand what the issue was. The Database server which I was trying to connect was running and the port was open and was accepting connections.
The issue was with internet connection. The internet connection that I was using was not allowed to connect to the corresponding server. When I changed the connection details, the issue got resolved.
answered Nov 17, 2014 at 12:01
phoenixphoenix
9653 gold badges16 silver badges38 bronze badges
In my case, I gave the socket the name of the server (in my case «raspberrypi»), and instead an IPv4 address made it, or to specify, IPv6 was broken (the name resolved to an IPv6)
answered Dec 21, 2016 at 18:20
ZhyanoZhyano
3691 gold badge3 silver badges13 bronze badges
In my case, I had to put a check mark near Expose daemon on tcp://localhost:2375 without TLS
in docker
setting (on the right side of the task bar, right click on docker
, select setting
)
answered Aug 23, 2017 at 13:42
user1419243user1419243
1,6453 gold badges18 silver badges32 bronze badges
i got this error because I closed ServerSocket
inside a for loop that try to accept number of clients inside it (I did not finished accepting all clints)
so be careful where to close your Socket
answered May 21, 2016 at 21:07
I had same problem and the problem was that I was not closing socket object.After using socket.close(); problem solved.
This code works for me.
ClientDemo.java
public class ClientDemo {
public static void main(String[] args) throws UnknownHostException,
IOException {
Socket socket = new Socket("127.0.0.1", 55286);
OutputStreamWriter os = new OutputStreamWriter(socket.getOutputStream());
os.write("Santosh Karna");
os.flush();
socket.close();
}
}
and
ServerDemo.java
public class ServerDemo {
public static void main(String[] args) throws IOException {
System.out.println("server is started");
ServerSocket serverSocket= new ServerSocket(55286);
System.out.println("server is waiting");
Socket socket=serverSocket.accept();
System.out.println("Client connected");
BufferedReader reader=new BufferedReader(new InputStreamReader(socket.getInputStream()));
String str=reader.readLine();
System.out.println("Client data: "+str);
socket.close();
serverSocket.close();
}
}
answered May 14, 2017 at 17:13
Santosh KarnaSantosh Karna
1191 gold badge7 silver badges12 bronze badges
1
I changed my DNS network and it fixed the problem
answered Nov 23, 2019 at 9:51
You probably didn’t initialize the server or client is trying to connect to wrong ip/port.
answered Aug 10, 2020 at 16:21
Change local host to your ip address
localhost
//to you local ip
192.168.xxxx
answered Apr 28, 2021 at 10:46
Gabriel RogathGabriel Rogath
6702 gold badges6 silver badges22 bronze badges
I saw the same error message «»java.net.ConnectException: Connection refused» in SQuirreLSQL when it was trying to connect to a postgresql database through an ssh tunnel.
Example of opening tunel:
Example of error in Squirrel with Postgresql:
It was trying to connect to the wrong port. After entering the correct port, the process execution was successful.
See more options to fix this error at: https://stackoverflow.com/a/6876306/5857023
answered Jan 6, 2022 at 19:57
GenivanGenivan
1612 gold badges3 silver badges10 bronze badges
In my case, with server written in c# and client written in Java, I resolved it by specifying hostname as ‘localhost‘ in the server, and ‘[::1]‘ in the client. I don’t know why that is, but specifying ‘localhost’ in the client did not work.
Supposedly these are synonyms in many ways, but apparently, not not a 100% match. Hope it helps someone avoid a headache.
answered Aug 12, 2022 at 15:07
AlexeiOstAlexeiOst
5644 silver badges13 bronze badges
For those who are experiencing the same problem and use Spring
framework, I would suggest to check an http connection provider configuration. I mean RestTemplate
, WebClient
, etc.
In my case there was a problem with configured RestTemplate (it’s just an example):
public RestTemplate localRestTemplate() {
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("localhost", <some port>));
SimpleClientHttpRequestFactory clientHttpReq = new SimpleClientHttpRequestFactory();
clientHttpReq.setProxy(proxy);
return new RestTemplate(clientHttpReq);
}
I just simplified configuration to:
public RestTemplate restTemplate() {
return new RestTemplate(new SimpleClientHttpRequestFactory());
}
And it started to work properly.
answered Jan 24 at 17:45
There is a service called MySQL80 that should be running to connect to the database
for windows you can access it by searching for services than look for MySQL80 service and make sure it is running
answered Jul 16, 2021 at 19:50
It could be that there is a previous instance of the client still running and listening on port 5000.
answered Jan 10, 2013 at 18:27
Michael MunseyMichael Munsey
3,6501 gold badge24 silver badges15 bronze badges
2
Ошибка java.net.ConnectException: Connection refused является одним из самых распространенных сетевых исключений в Java. Эта ошибка возникает, когда вы работаете с архитектурой клиент-сервер и пытаетесь установить TCP-соединение от клиента к серверу.
Соединение также происходит в случае RMI (удаленного вызова метода), потому что RMI также использует протокол TCP-IP. При написании кода клиентского сокета на Java вы всегда должны обеспечивать правильную обработку этого исключения.
В этом руководстве по Java вы узнаете, почему возникает исключение при отказе в соединении и как решить проблему.
Причины
Отказ в соединении – это явный случай, когда клиент пытается подключиться через порт TCP, но не может это сделать. Вот некоторые из возможных причин, почему это происходит:
- Клиент и Сервер, один или оба из них не находятся в сети.
Да, возможно, что они не подключены к локальной сети, Интернету или любой другой сети.
- Сервер не работает.
Вторая наиболее распространенная причина – сервер не работает. Вы можете использовать следующие сетевые команды, например, ping, чтобы проверить, работает ли сервер.
- Сервер работает, но не видит порт, к которому клиент пытается подключиться.
Это еще одна распространенная причина возникновения «java.net.ConnectException: соединение отклонено», когда сервер работает, но видит другой порт. Трудно разобраться в этом случае, пока вы не проверите конфигурацию.
- Брандмауэр запрещает комбинацию хост-порт.
Почти каждая корпоративная сеть защищена. Если вы подключаетесь к сети других компаний, вам нужно убедиться, что они разрешают друг другу IP-адрес и номер порта.
- Неверная комбинация хост-портов.
Проверьте последнюю конфигурацию на стороне клиента и сервера, чтобы избежать исключения отказа в соединении.
- Неверный протокол в строке подключения.
TCP является базовым протоколом для многих высокоуровневых протоколов, включая HTTP, RMI и другие. Нужно убедиться, что вы передаете правильный протокол, какой сервер ожидает.
Если вам интересно узнать больше об этом, то изучите книгу по сетевым технологиям, такую как Java Network Programming (4-е дополнение), написанную Гарольдом Эллиоттом Расти.
Простое решение состоит в том, чтобы сначала выяснить фактическую причину исключения. Здесь важнее всего подход к поиску правильной причины и решения. Как только вы узнаете реальную причину, вам, возможно, даже не потребуется вносить какие-либо существенные изменения.
Вот несколько советов, которые могут помочь исправить ошибку java.net.ConnectException: Connection refused:
- Сначала попытайтесь пропинговать целевой хост, если хост способен пинговать, это означает, что клиент и сервер находятся в сети.
- Попробуйте подключиться к хосту и порту сервера, используя telnet. Если вы можете подключиться, значит что-то не так с вашим клиентским кодом. Кроме того, наблюдая за выводом telnet, вы узнаете, работает ли сервер или нет, или сервер отключает соединение.
Improve Article
Save Article
Improve Article
Save Article
java.net.ConnectException: Connection refused: connect is the most frequent kind of occurring networking exception in Java whenever the software is in client-server architecture and trying to make a TCP connection from the client to the server. We need to handle the exception carefully in order to fulfill the communication problem. First, let us see the possible reasons for the occurrence of java.net.ConnectException: Connection refused.
- As client and server involved, both should be in a network like LAN or internet. If it is not present, it will throw an exception on the client-side.
- If the server is not running. Usually ports like 8080, (for tomcat), 3000 or 4200 (for react/angular), 3306(MySQL), 27017(MongoDB) or occupied by some other agents or totally down i.e. instance not started.
- Sometimes a server may be running but not listening on port because of some overridden settings etc.
- Usually, for security reasons, the Firewall will be there, and if it is disallowing the communication.
- By mistake, the wrong port is mentioned in the port or the random port generation number given.
- Connection string information wrong. For example:
Connection conn = DriverManager.getConnection(“jdbc:mysql://localhost/:3306<dbname>?” + “user=<username>&password=<password>”);
Implementation: Here we are using MySQL database connectivity and connection info should be of this format. Now let us see the ways to fixing the ways of java.net.ConnectException: Connection refused. Ping the destination host by using the commands as shown below:
ping <hostname> - to test ipconfig(for windows)/ifconfig(linux) - to get network configuration netstat - statistical report
nslookup - DNS lookup name
There are tools like “Putty” are available to communicate, and it is a free implementation of Telnet and SSH for Windows and Unix.
Example 1:
Java
import
java.io;
import
java.net.*;
import
java.util.*;
public
class
GFG {
public
static
void
main(String[] args)
{
String hostname =
"127.0.0.1"
;
int
port =
80
;
try
(Socket socket =
new
Socket(hostname, port)) {
InputStream inputStream
= socket.getInputStream();
InputStreamReader inputStreamReader
=
new
InputStreamReader(inputStream);
int
data;
StringBuilder outputString
=
new
StringBuilder();
while
((data = inputStreamReader.read())
!= -
1
) {
outputString.append((
char
)data);
}
}
catch
(IOException ex) {
System.out.println(
"Connection Refused Exception as the given hostname and port are invalid : "
+ ex.getMessage());
}
}
}
Output:
Example 2: MySQL connectivity Check
Java
import
java.io.*;
import
java.util.*;
import
java.sql.*;
try
{
Connection con =
null
;
String driver =
"com.mysql.jdbc.Driver"
;
String IPADDRESS =
"localhost"
String url1
String db =
"<your dbname>"
;
String dbUser =
"<username>"
;
String dbPasswd =
"<password>"
;
Class.forName(driver).newInstance();
con = DriverManager.getConnection(url1 + db, dbUser,
dbPasswd);
System.out.println(
"Database Connection Established"
);
}
catch
(IOException ex) {
System.out.println(
"Connection Refused Exception as the given hostname and port are invalid : "
+ ex.getMessage());
}
Similarly, for other DB, we need to specify the correct port number i.e. 27017 for MongoDB be it in case of SSL (Secure socket layer) is there, prior checks of Firewall need to be checked and hence via coding we can suggest the solutions to overcome the exception
Conclusion: As readymade commands like ping, telnet, etc are available and tools like putty are available, we can check the connectivity information and overcome the exception.
Among 90 Million players, 20% of people cannot connect to Minecraft servers. Reports show that they fail to connect to the server because of a time-out error.
I have also been through this situation, man! But, with a hefty 9 hours of non-stop research, I came up with the seven easiest steps to fix the Minecraft io.netty error message.
What does io.netty.channel.abstractchannel$annotatedconnectexception mean?
Io.netty.channel in Minecraft is a Connection Timed Out Error where you cannot connect to a game server due to lack of connection between the host and the server. The leading cause for the error is the Common IP Connectivity issue.
Keep Reading, As I will demonstrate to you why Minecraft fails to connect to the server and how to fix io.netty.channel.abstractchannel annotatedconnectexception connection immediately.
Follow our guide on how to Keep Inventory When You Die in Minecraft
Connection timed out is not limited to a single server. If you tried to join the multiplayer server, you will most often see the error message. As I have mentioned earlier, the root cause behind the io netty.channel error is the IP Connectivity issue.
A couple of other causes include Backdated JAVA program, server blocking by the Windows Firewall, and Unstable Software.
Due to the wrong IP of the port, io.netty.channel.abstractchannel Minecraft error can be triggered in no time. It is seen that the IP address attached with the correct port is used for forwarding your connection to the client server. In rare cases, the IP changes from time to time, and multiple users might get connected within the same IP.
Check out our separate post if Minecraft keeps crashing on your PC.
In the beginning, it may seem complicated to you. But, keep reading as you can fix Minecraft’s abstract channel error in minutes without any confusion.
Here are the steps to fix minecraft io.netty.channel.abstractchannel$annotatedconnectexception connection refused error:
1. Add Exceptions to Firewall Settings in Minecraft Folder
Adding exceptions in Firewall settings is the best option for fixing io.netty.channel.connecttimeoutexception connection timed out. As I have mentioned earlier, VPN and Windows Firewall sometimes block you from accessing the Minecraft game server. Add some exceptions in the Firewall to avoid abstractchannel annotatedconnectexception connection refused error.
Also, check out my complete Minecraft biomes list to explore the unknown. You can quickly find any biomes using the Minecraft Biome Finder. You can see biomes, jungle temples, slime chunks, spawn chunks, buried treasures, etc. with different colors on the map.
Here are the steps to add exceptions to Firewall Settings:
Now, you can open the Minecraft launcher to see if the error is solved or not.
Point to be Noted: Due to LAN issues, Minecraft Lan io.netty.channel.abstractchannel$annotatedconnectexception disconnection can occur. Check out our separate post to fix Lan not working in Minecraft.
2. Delete Unstable Software
There is some unstable software, which after installing it on your computer will conflict with the game. You can check the list of the software that isn’t compatible with the Minecraft game on many websites.
You should remove false plugins and add 100% authenticated plugins only.
One of the incompatible software is the Virtual Ethernet with Hamachi. In this case, it would be wise enough to disable or delete the software.
Open Command prompt and type ipconfig. Find a configuration named Virtual Ethernet Connection with Hamachi. Note down the Addresses and go to the search panel to delete Virtual Ethernet Software with Hamachi.
Add your IP and port number to the server and solve Minecraft ionetty issue. If you are trying to play with your friends, you can set up a Hamachi server too.
Also, check out the best Minecraft Music Bots and the Best VPN for Minecraft.
3. Add IP Address and Select the Suitable Working Port
Add your IP and port number to the Minecraft servers. Minecraft connection refused issues will occur if the IP address and port you are using are dynamic in nature. Change your IP address and add it to the Minecraft Launcher in order to deal with minecraft.io error. I recommend using the port forwarding method. You can also check your IP configuration from the command prompt.
Here are the steps to add an IP Address and select the suitable working port:
- Run the Command Prompt as Administrator.
- Type the command ipconfig and note down your IPV4 Address.
- Browse to Minecraft Servers folder > Maxwell (Minecraft Server folder) > Minecraft Server at the same time and open Server Properties text document.
- Note down the Server Port and open up Minecraft and go to the Play Multiplayer option.
- Select the server you want to join and select Edit.
- Type the IPv4 address and click Done. Connect to a server using this IPv4 address.
- Refresh to apply changes.
NB: You can use the Minecraft Resolver tool as well to repair Minecraft out of memory problems.
You should check out the easiest way to make paper in Minecraft.
4. Reset Your Internet Router
Resetting the router is the most straightforward solution. If your Internet Modem/router causes problems then you are most likely to notice Minecraft error. You should always check your internet connection before trying to connect to the server.
Try powering off your Router by pressing the reset button for a couple of minutes and power back on to restart your Router. If that doesn’t work then reset all the settings of your router and set it up freshly. Try to connect to a server after resetting the router.
Remember: Poor internet connection hampers the data exchange between the server and the host. Also, The game server you are trying to connect needs to be in the same region.
Did you know? You can use the Command Block to execute the commands in Minecraft.
5. Use a Trusted VPN Connection Source
It is possible that Minecraft is banned in your region. Windows Firewall sometimes blocks Minecraft servers and for this reason, you will not be able to connect to the server. The same goes for VPN. Changing servers frequently using VPNs may block the Host server.
You can try using trusted VPN apps that don’t block your Minecraft game server. Simply change settings of the region to overcome io.netty.channel.connecttimeoutexception timed out error.
Want to make a Jack o lantern in Minecraft? Click on the link to find out.
6. Update Java software
Minecraft requires the latest version of JAVA in order to work properly. You can’t use backdated java software. If you are trying to connect to the server with outdated Java, the missing elements will conflict with Minecraft. As a result, you will see java.net.connectexception connection refused no further information.
Java.net.connectexception connection timed out no further information error is seen on windows 10 more specifically. A Learn to Mod account is necessary to join a Minecraft server. Java.net connectexception minecraft error means that you do not have any Learn To Mod account. It can be fixed by updating the JAVA software to its current latest version.
7. Reinstall Minecraft
This error can occur on both single-player and multiplayer servers. Use a trusted VPN to get rid of the Abstract Channel Error.
Sometimes your Game data is seen corrupted and it causes you a lot of problems like Minecraft disconnection error. Uninstalling Minecraft and simply giving it a fresh installation will help all the Minecraft players.
To uninstall Minecraft, you need to navigate to Control Panel> Uninstall a Program> select Minecraft to uninstall.
Get the latest version of Minecraft and try to connect to the game server to fix io netty channel abstractchannel annotatedconnectexception.
Why does it say IO Netty channel AbstractChannel AnnotatedConnectException?
Minecraft says io netty annotated error because of a lack of connection between host PC and the server. Basically, Minecraft can’t connect with the server due to unwanted traffic off networks. Try the Port forwarding method to get rid of the disconnection problem.
Port forwarding is necessary because your Home routers use NAT which isolates the home network from the Internet. If you want you can also fix your LAN card. Apart from that, if you have any antivirus installed, I would suggest you whitelist Minecraft. JRE Blocked by Antivirus can cause a serious issue leading to this problem.
Quickly check out how to deal with a Minecraft server not allowing friends to connect.
Final Thoughts
Connection refused: no further information error is a big problem for Minecraft fans. If you are able to fix failed to connect to server error once, then you will never face this error again. In case, if none of the above steps worked for you then I would suggest you fix your LAN card to see if this error vanishes or not.
Перейти к содержанию
При попытке подключения к серверу «Майнкрафт» пользователь может столкнуться с сообщением «Java.net.ConnectException: Connection timed out: no further information». Появление данного сообщения обычно сигнализирует о возникновении различного рода сетевых проблем при получении доступа к игровому серверу, из-за чего желание пользователя насладиться игровыми мирами «Майнкрафт» остаётся нереализованным. Ниже я разберу суть данной дисфункции, опишу её причины, а также поясню, как исправить ошибку Java.net.ConnEctexception на вашем ПК.
Содержание
- Connection timed out: no further information – особенности дисфункции
- Как исправить «Java.net.ConnectException: Connection timed out»
- Заключение
Connection timed out: no further information – особенности дисфункции
В переводе текст данного сообщения выглядит примерно как «Сетевой сбой Java. Время соединения истекло: дальнейшая информация отсутствует».
Указанная ошибка Java.net.ConnectException обычно возникает во время подключения к серверу игры «Майнкрафт», но также фиксировались спорадические случаи появления данной ошибки при работе других продуктов, использующих «Java» (к примеру, на «Azure notification hub»).
Появление проблемы «Java.net.ConnectException: Connection timed out: no further information» имеет следующие причины:
- Пользователь использует нестабильное сетевое соединение с медленным интернетом;
- На ПК пользователя установлена устаревшая версия «Java»;
- Пользователь пользуется устаревшей версией «Майнкрафт»;
- Наблюдаются сбои в работе игрового сервера, к которому пробует подключиться пользователь (ресурс не доступен, проходят технические работы и др.);
- Антивирус или брандмауэр блокирует подключения к игровому серверу;
- Пользователь использует динамический IP;
- Пользовательский роутер работает некорректно.
Как исправить «Java.net.ConnectException: Connection timed out»
Существуют несколько способов избавиться от ошибки Java.net.ConnectException. Рассмотрим их по порядку:
- Перезагрузите ваш PC. В некоторых случаях данный простой метод позволял решить ошибку java.net.connectexception connection refused;
- Установите на ПК свежую версию «Java». Довольно частой причиной рассматриваемой проблемы является устаревшая версия «Java» на пользовательском ПК. Перейдите в Панель управления, затем в «Программы», там найдите «Java» и кликните на неё. После появления окна её настроек перейдите на вкладку «Update», нажмите там на кнопку «Update Now», и установите в системе требуемые обновления.
Данную процедуру необходимо провести как на вашей машине, так и на машине того пользователя, с которым вы собираетесь играть в «Майнкрафт» по сети;
- Внесите «Майнкрафт» в исключения брандмауэра и антивируса на вашем ПК. Запустите Панель управления, перейдите в «Система и безопасность», там найдите «Брандмауэр Виндовс» и кликните на него. В открывшемся окне настроек брандмауэра слева сверху выберите опцию «Разрешения взаимодействия…».
В открывшемся окне разрешённых для внешнего подключения программ найдите программы с упоминанием «Java», и поставьте им галочки для разрешения подключения (поможет кнопка «Изменить параметры»). Нажимаем на «Ок» для сохранения результата, перезагружаемся и пробуем подключиться к серверу. С антивирусом необходимо проделать аналогичные операции, внеся «Java» и «Майнкрафт» в его исключения;
- Попробуйте альтернативный сервер. Если подключения к конкретному серверу невозможно, тогда вполне вероятно, что у него наблюдаются временные проблемы в работе. Рекомендую попробовать альтернативный сервер, или подождать некоторое время, пока работоспособность начального сервера восстановиться;
- Создайте сервер на другой машине. Если вы создаёте сервер, к которому подключается другой знакомый вам пользователь, тогда рекомендуется поменять базовый компьютер для создания сервера. То есть сервер должен создать уже другой пользователь, а вы подключитесь к нему. Часто это позволяло решить проблему net.ConnectException на пользовательском компьютере;
- Используйте статистический IP-адрес. Если у вас есть возможность, рекомендуется использовать официальный (белый) IP-адрес, полученный через провайдера (обычно данная услуга имеет платный характер);
- Установите на ваш ПК (гаджет) свежую версию «Майнкрафт». Обычно необходимо, чтобы версии игры на сервере и на вашем ПК (гаджете) соответствовали друг другу;
Установите самую свежую версию программы - Избавьтесь от имеющихся модов к игре. Если вы используете какие-либо моды «Майнкрафт», рекомендуется удалить их, оставив само тело игры;
- Перезагрузите ваш роутер. Отключите ваш роутер, подождите полминуты, а затем включите его обратно;
- Обратитесь за консультацией к провайдеру. По различным причинам некоторые провайдеры блокируют доступ к некоторым серверам. Узнайте, не ваш ли это случай, и не является ли ваш провайдер причиной возникновения данной проблемы.
Заключение
Наиболее распространёнными причинами ошибки «Java.net.ConnectException: Connection timed out: no further information» является устаревание пользовательской версии «Java» и блокировка брандмауэром подключения к нужному игровому серверу. Решением проблемы станет выполнение перечисленных выше советов, это позволит исправить ошибку Java.net.ConnectException на вашем ПК.
Опубликовано 21.03.2018 Обновлено 03.12.2020
java.net.ConnectException: Connection refused is a common exception if you are dealing with network operations in Java. This error indicates that you are trying to connect to a remote address and connection is refused remotely. It’s possible if there is no remote process/service listening at the specified address or port.
You might see one of the following error lines in your stack trace when you get Connection refused exception.
java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528)
java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470)
java.net.ConnectException: Connection refused
exception clearly indicates that the program you are executing is trying to connect to server side but a successful connection cannot be established.
Possible Causes of java.net.ConnectException: Connection refused
1. Client is trying to connect wrong IP or port: This is a common reason when you get ConnectException. Sometimes applications running on the server side allocate different ports each time they are started. You can either configure the application on the server side, so that it uses fixed port, or you can change the client application, so that it connects to correct port.
2. Server is not running: This is also a possible reason for java.net.ConnectException.
You should check whether the server is open or not. It might be a database server, an application server or a custom server you have implemented. If you try to open a socket connection to a closed server, you will get a connection exception.
3. Server is open but it is not listening connections: This might be the case, for instance, when application server is up and running but an installed application is not started correctly. You should check admin console of your server to check the status of applications on the server. Sometimes application is started correctly but it isn’t listening the port, you are trying to connect.
4. Firewall is blocking connections to remote host: Firewall might be the problem if you cannot connect to server side. If a firewall is blocking connections to server, client application cannot open connection on the specified IP and port.
1. Check IP address and port: First step to resolve java.net.ConnectException is checking IP address and port. If IP address and port are correct, then you should follow the other steps below.
2. Ping the server IP address: You can use ping tool to test whether you can connect to server or not.
A successful ping response is as follows:
C:>ping 192.168.1.1 Pinging 192.168.1.1 with 32 bytes of data: Reply from 192.168.1.1: bytes=32 time=1ms TTL=64 Reply from 192.168.1.1: bytes=32 time=1ms TTL=64 Reply from 192.168.1.1: bytes=32 time=1ms TTL=64 Reply from 192.168.1.1: bytes=32 time=1ms TTL=64 Ping statistics for 192.168.1.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 1ms, Maximum = 1ms, Average = 1ms
Ping response for an unsuccessful connection is as follows:
C:>ping 192.168.1.23 Pinging 192.168.1.23 with 32 bytes of data: Reply from 192.168.1.23: Destination host unreachable. Reply from 192.168.1.23: Destination host unreachable. Reply from 192.168.1.23: Destination host unreachable. Reply from 192.168.1.23: Destination host unreachable. Ping statistics for 192.168.1.23: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
3. Try connecting the server with Telnet: You can use telnet application to simulate connection to the server. To use telnet type telnet {Server IP address} {Server port} on the command prompt. If telnet responds “Could not open connection to the host”, then you should investigate further for problems. Maybe, server is not running, or there might be a firewall issue.
C:>telnet 127.0.0.1 8080 Connecting To 127.0.0.1...Could not open connection to the host, on port 8080: Connect failed
- java.net.connectexception connection timed out
- no further information.
- не могу подключиться
- ошибка
- помощь
- проблема
- решение
-
Здравствуйте, вот просто накипело. ОЧЕНЬ ЧАСТО ВОЗНИКАЕТ java.net.connectexception connection timed out: no further information., по этому я решил сделать небольшой туториал, где опишу все известные мне причины возникновения данной ошибки и решение.
java.net.connectexception connection timed out: no further information.
И так, давайте сначала разберем основные причины:- Сервера к которому вы подключаетесь нет или он просто не доступен
- Игра не может получить доступ к интернету
Давайте рассмотрим пункт 1 подробнее и разделим его на несколько подпункутов
- Сервера действительно нет. Его отключили или вы поключаетесь не к тому IP/Порту.
- Сервер недоступен. У него нет доступа к интернету или его выключили.
И тоже самое сделаем со вторым пунктом
- У вас нет интернета.
- У игры нет доступа к интернету.
Разберем все 4 пункта:
- думаю тут все понятно.
- ну и тут тоже. (если сервер ваш, то смотрите пункт 4)
- не, ну проверьте интернет, а вдруг.
- а вот тут уже надо смотреть фаерволы и антивиры.
Решение:
- Открываем брэндмауэр windows и в списке приложений ставим все галочки на Java. Там может быть не 1, а несколько пунктов. Надо разрешить все.
- Открываем антивирус, заносим minecraft в список исключений, разрешаем порт 25565, в конце концов отключаем его и пробуем обновиться.
Если вы открыли мир для сети из меню:
Данная ошибка обычно возникает в 3-х случаях- Не правильный IP:Порт
- У игры нет доступа в интернет/Программа блокирует порт (Это разобрали, читайте решение ниже)
- Обновите Java, часта данная ошибка возникает из-за разных версий
И вообще, обновляйте Java, это решение, которое можно написать в каждый пункт.
Скачать JavaДля неопытных:
Если вы создали сервер на своем ПК или открыли мир для сети в меню, то вам надо находиться в одной локальной сети. Если между вашими ПК нет соеденения по локальной сети, то используйте программы, которые создают такие (Например LogMeIn Hamachi или Evolve).
Для того, что бы играть без соеденения по локальной сети, надо открыть порты. Я хз как это делается через торенты, port forwarding и т.п., тут просто используются дыры, которые не закрыл ваш интернет провайдер. По нормальному вам для открытия портов надо позвонить интернет провайдеру и спросить, будет ли он открывать порты, если да, то сделает ли он это бесплатно или надо заплатить, или может он эти порты и не закрывал.
Проверить порт -
Писец ты нубяра. Сяпки, проорал в голос
.
-
Дополню. Если сервер пингуется и запускается без ошибок но подключится нельзя — у арендуемой VM машины могут быть заблокированы порты 8123 и 2565 (будет выскакивать та же ошибка timed out: no further information)
Поделиться этой страницей
Yoodley is reader-supported. When you buy through links on our site, we may earn an affiliate commission.
The simplest remedy is to figure out what is causing java.net.ConnectException: Connection refused. What is most significant in this case is the approach taken in determining the correct cause and solution. Here are some suggestions that may assist you in determining the root cause.
- First, ping the destination host; if the host is ping-able, this indicates that both the client and server machines are connected to the network.
- Use telnet to establish a connection to the server’s host and port. Inability to connect indicates that there is a problem with your client software code. Additionally, by examining the telnet output, you will be able to determine whether the server is functioning or not, as well as whether the server is severing the connection from the client.
Reasons For The Error: java.net.ConnectException: Connection refused
Connection rejected is a clear example of a client attempting to establish a connection on a TCP port but failing. Here are some of the possible causes of the error that could be encountered:
Reason 1: Client and Server, either or both of them are not in the network.
The fact that client and server are not linked to a LAN, the internet, or any other network is a possibility, and in that case, Java will throw an error message.This error message is the same one we are dealing with: java.net.ConnectException: Connection refused.
Reason 2: Server is not running
The second most frequently encountered issue is that the server is not up and operating. In that scenario, you will additionally receive java.net. ConnectException: Connection refused error.
What we don’t like about it is that no matter what the reason for the issue is, it always produces the same error message.
Furthermore, you can use the following networking commands, such as ping to determine whether the server is up and running and listening on the specified port.
Reason 3: The server is running but not listening on the port, a client is trying to connect.
This is yet another typical reason for “java.net.ConnectException: Connection refused “, in which the server is up and running but is listening on a different port than usual. It’s difficult to figure out this case unless you sit down and think about it, then you can verify the settings. If you are working on a large project with a hierarchical configuration file, it is possible that either the default configuration or or another setting is taking precedence over your current configuration.
Reason 4: Firewall is not permitted for host-port combination
Firewalls are used to secure almost every corporate network today. It is necessary to raise firewall requests from both sides when connecting to another company’s network, for example, when starting a FIX session to the broker in an Electronic Trading System, in order to verify that the IP address and port number of the other company’s network are permitted. If the firewall is not allowing the connection, you will also receive the same java.net.ConnectException: Connection refused exception in Java application.
Reason 5: Host Port combination is incorrect.
This could be yet another explanation for the existence of java.net.Connection refused. You should consider the possibility that either you are supplying an invalid host port combination or that a previously used host port combination has been modified on the server’s end. Check for the most recent configuration on both the client and server sides to avoid connection denied exceptions from occurring.
Reason 6: Incorrect protocol in Connection String
TCP is the underlying protocol for several high-level protocols, including HTTP, RMI, and others. TCP is a transmission control protocol. Ensure that you are giving the correct connection string to the server, which begins with the protocol that the server expects, for example, if the server has exposed its service via RMI, the connection string should begin with rmi:/
How to fix java.lang.OutOfMemoryError: Java heap space?
An easy technique to resolve OutOfMemoryError in Java is to increase the maximum heap size using JVM options “-Xmx512M”, which will resolve your OutOfMemoryError quickly.
Alternative Method:
The second method to resolve OutOfMemoryError in Java is more difficult and occurs when you don’t have much memory and even after increasing the maximum heap size you still get java.lang.OutOfMemoryError; in this situation, you should definitely profile your programme and look for any memory leak.
You may also check your heap dump with Eclipse Memory Analyzer or any profiler such as Netbeans or JProbe. This is a difficult solution that will take some time to investigate and detect memory leaks.
How to solve java.lang.OutOfMemoryError: PermGen space?
As stated in the above paragraph, the OutOfMemory issue in Java occurs when the heap’s Permanent generation is depleted. To resolve this OutOfMemoryError in Java, use the JVM option “-XX: MaxPermSize” to raise the heap size of the Perm area.
You can also provide the initial size of Perm Space with “-XX: PermSize,” and by retaining both the initial and maximum Perm Space, you can avoid certain entire garbage collection that may occur when Perm Space is resized.
java.lang.OutOfMemoryError in Java can be tricky at times, and in those circumstances, profiling is the best answer. While you have the option to increase heap size in Java, it is advised that you follow memory management techniques while coding and add null to any unnecessary references.
Read More
iFrame (Site name) Connection Refused