Ошибка java net connectexception connection refused no further information

Java.net.ConnectException: Connection timed out: no further information — Решение При попытке подключения к серверу «Майнкрафт» пользователь может столкнуться с сообщением «Java.net.ConnectException: Connection timed out: no further information». Появление данного сообщения обычно сигнализирует о возникновении различного рода сетевых проблем при получении доступа к игровому серверу, из-за чего желание пользователя насладиться игровыми мирами «Майнкрафт» остаётся нереализованным. […]

Содержание

  1. Java.net.ConnectException: Connection timed out: no further information — Решение
  2. Connection timed out: no further information – особенности дисфункции
  3. Как исправить «Java.net.ConnectException: Connection timed out»
  4. How to Fix ‘Connection refused: no further information’ Error on Minecraft
  5. Fix: ‘io.netty.channel.AbstractChannel$AnnotatedConnectException’ Error on Minecraft
  6. What Causes the Connection Refused Error?
  7. Power-Cycle your Network
  8. Reset your Network Configurations
  9. Add Exception in Firewall
  10. Add the IP address and Port Before Connecting
  11. Check for Port Filtering
  12. 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» и «Майнкрафт» в его исключения;

  • Попробуйте альтернативный сервер. Если подключения к конкретному серверу невозможно, тогда вполне вероятно, что у него наблюдаются временные проблемы в работе. Рекомендую попробовать альтернативный сервер, или подождать некоторое время, пока работоспособность начального сервера восстановиться;
  • Создайте сервер на другой машине. Если вы создаёте сервер, к которому подключается другой знакомый вам пользователь, тогда рекомендуется поменять базовый компьютер для создания сервера. То есть сервер должен создать уже другой пользователь, а вы подключитесь к нему. Часто это позволяло решить проблему net.ConnectException на пользовательском компьютере;
  • Используйте статистический IP-адрес. Если у вас есть возможность, рекомендуется использовать официальный (белый) IP-адрес, полученный через провайдера (обычно данная услуга имеет платный характер);
  • Установите на ваш ПК (гаджет) свежую версию «Майнкрафт». Обычно необходимо, чтобы версии игры на сервере и на вашем ПК (гаджете) соответствовали друг другу;

    Установите самую свежую версию программы

  • Избавьтесь от имеющихся модов к игре. Если вы используете какие-либо моды «Майнкрафт», рекомендуется удалить их, оставив само тело игры;
  • Перезагрузите ваш роутер. Отключите ваш роутер, подождите полминуты, а затем включите его обратно;
  • Обратитесь за консультацией к провайдеру. По различным причинам некоторые провайдеры блокируют доступ к некоторым серверам. Узнайте, не ваш ли это случай, и не является ли ваш провайдер причиной возникновения данной проблемы.
  • Источник

    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:

    1. Disconnect the power from the internet router. Disconnecting Power cord
    2. Wait for 5 minutes and reconnect the power.
    3. 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:-

    1. Search for the Command Prompt in the Windows Search bar then click “run as administrator”. Running Command Prompt
    2. Once the Command Prompt window is opened, type the following commands one by one:-
    3. 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:

    1. Click on the start menu and select the Settings icon.
    2. In the Settings, click on the “Updates & Security” option.
    3. Select the “Windows Security” from the left pane and select the “Firewall & Network Protection” option.
    4. Scroll down and select the “Allow an App through Firewall” option.
    5. Click on “Change Settings” and select “Yes” on the warning prompt.
    6. Select the “Allow another app” from the options and click on “Browse
    7. Navigate to the game installation directory and select the game and the launcher executable.
    8. Now repeat the above process again and this time navigate to the directory where you have the Minecraftservers installed.
    9. Open the “Maxwell” folder and then the “MinecraftServer” folder.
    10. Now allow both the Javaexecutables located inside the folder in the same way.
    11. 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
    12. 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:

    1. Click on the search bar on the Windows toolbar and type in “Command Prompt“.
    2. Rightclick on the icon and select “Runas Administrator“. Right-clicking on the Command Prompt icon and selecting Run as Administrator
    3. Type in “ipconfig” and note down the “IPV4Address“. Typing in ipconfig in the command prompt
    4. 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
    5. 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.
    6. Now open up Minecraft and navigate to the “Play Multiplayer” option.
    7. 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”
    8. 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
    9. 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.

    Источник

    ConnectException: connection refused means nothing was listening at the IP:port you tried to connect to, or on some platforms that the server’s listen-backlog queue filled up. If it is thrown and you catch it correctly, you will certainly catch it. You would have to expand on what actually happens and what your actual catch code looks like for further assistance.

    However you have many other problems:

    private void connect(SelectionKey key) throws IOException {
        SocketChannel channel = (SocketChannel) key.channel();
        try
        {
            if(!channel.finishConnect())
                System.out.println("* Here *");
    

    At this point, if finishConnect() returned false, you should return. You should not fall through and re-register the channel for OP_WRITE. The connection is still pending. Printing "* Here *" is also pretty futile. Try printing something meaningful.

        }
        catch(ConnectException e)
        {
            System.out.println("BP 1");
            e.printStackTrace();
    
            //channel.close();
    

    You should certainly close the channel at this point. It is of no further use to man or beast.

            //key.cancel();
    

    Closing the channel cancels the key. Remove wherever encountered.

            //return;
    

    As above, you should certainly return at this point.

        }
        /*if (channel.isConnectionPending()){
            while(!channel.ffinishConnect()){
                System.out.println("not connected");
            }
        }*/
    

    Get rid of this crud. It is never appropriate to spin-loop in non-blocking mode. Don’t even leave it lying around as comments: some idiot may come along later and play with putting it back.

        channel.configureBlocking(false);
    

    The channel is already in non-blocking mode. Otherwise you wouldn’t be here. Remove.

        channel.register(selector, SelectionKey.OP_WRITE);
    

    Another way to do that is key.interestOps(SelectionKey.OP_WRITE);

    Sleeping in networking code is literally a waste of time. It doesn’t solve anything.

    You are assuming that write() succeeded completely, and you’re ignoring the count it returns.

    You’re using a fairly poor quality reference:

    • Same remarks about write() apply as above.
    • flip() is not ‘like a reset’.
    • Cancelling a key closes the channel.
    • You don’t have to clear a brand-new ByteBuffer, but in any case allocating a ByteBuffer per read is poor practice.
    • ServerSocketChannel.accept() can return null.
    • The code that displays a String after reading is incorrect.
    • There is no need to use a Map when keys have attachments.
    • There’s no need to keep testing Thread.interrupted() when NIO is interruptible anyway.
    • There’s no need to close everything just becaues of one IOException on one channel.

    Try to find something better.

    Содержание

    1. Java.net.ConnectException: Connection timed out: no further information — Решение
    2. Connection timed out: no further information – особенности дисфункции
    3. Как исправить «Java.net.ConnectException: Connection timed out»
    4. Java.Net.SocketException: Network Is Unreachable
    5. Possible Reasons and Solution for java.net.SocketException: Network is unreachable in Java
    6. Minecraft Forums
    7. java.net.SocketExecption: Network is unreachable
    8. Ошибка «io.netty.channel.AbstractChannel AnnotatedConnectException» в Minecraft: что делать?
    9. Чем вызвана ошибка?
    10. Добавление исключения в Брандмауэр
    11. Добавление IP-адреса и порта
    12. Проверка фильтрации портов

    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» и «Майнкрафт» в его исключения;

  • Попробуйте альтернативный сервер. Если подключения к конкретному серверу невозможно, тогда вполне вероятно, что у него наблюдаются временные проблемы в работе. Рекомендую попробовать альтернативный сервер, или подождать некоторое время, пока работоспособность начального сервера восстановиться;
  • Создайте сервер на другой машине. Если вы создаёте сервер, к которому подключается другой знакомый вам пользователь, тогда рекомендуется поменять базовый компьютер для создания сервера. То есть сервер должен создать уже другой пользователь, а вы подключитесь к нему. Часто это позволяло решить проблему net.ConnectException на пользовательском компьютере;
  • Используйте статистический IP-адрес. Если у вас есть возможность, рекомендуется использовать официальный (белый) IP-адрес, полученный через провайдера (обычно данная услуга имеет платный характер);
  • Установите на ваш ПК (гаджет) свежую версию «Майнкрафт». Обычно необходимо, чтобы версии игры на сервере и на вашем ПК (гаджете) соответствовали друг другу;

    Установите самую свежую версию программы

  • Избавьтесь от имеющихся модов к игре. Если вы используете какие-либо моды «Майнкрафт», рекомендуется удалить их, оставив само тело игры;
  • Перезагрузите ваш роутер. Отключите ваш роутер, подождите полминуты, а затем включите его обратно;
  • Обратитесь за консультацией к провайдеру. По различным причинам некоторые провайдеры блокируют доступ к некоторым серверам. Узнайте, не ваш ли это случай, и не является ли ваш провайдер причиной возникновения данной проблемы.
  • Источник

    Java.Net.SocketException: Network Is Unreachable

    Today, we will discuss the possible reasons and solutions for the java.net.SocketException: Network is unreachable exception while programming in Java.

    Possible Reasons and Solution for java.net.SocketException: Network is unreachable in Java

    Example Code (Causing an Error):

    In this code, we pass the URL and the fileName to the downloadXML() method that reads the .xml file from the specified URL and writes it into the given fileName , which is further saved on our local system.

    Though this code example is syntactically and semantically correct but generates the java.net.SocketException: Network is unreachable exception. The error is self-explanatory that tells us the network is not available at the current moment.

    The reason causing this error is the connection breakdown. It can happen in Wi-Fi, 3G, or plain internet connection on the machine (computer/laptop).

    Whenever we get this error, we must assume that the internet connection is not stable and may be lost from time to time while writing our application.

    For instance, this happens with mobiles frequently when we are in the basements or tube, etc. It also happens while using apps on a PC/laptop, but it is less frequent.

    The second reason can be incorrect Port and/or HostName . Make sure both are correct.

    Additionally, you must remember two more things that can help in error identification.

      First, you will get a java.net.UnknownHostException error if you are completely disconnected from the internet

    Usually, the Network is unreachable differs from the Timeout Error . In the Timeout Error , it can’t even find where it should go.

    For instance, there can be a difference between having our Wi-Fi card off and no Wi-Fi.

    Firstly, perform the usual fiddling with the firewall to ensure that the required port is open. Then, have a look into the network issues that you might have.

    Turn off the firewalls and eliminate the obstacles such as routers and complications to make it work in the simplest scenario possible since it is a network-related issue, not code related problem.

    Источник

    Minecraft Forums

    java.net.SocketExecption: Network is unreachable

    I have a server running on a Mac using Craftbukkit. Recently, my computer’s graphics card had to be replaced; and ever since, my friends could not connect to the server. Only I can, using «localhost». When anybody else tries to connect, they get the following error message: «Failed to connect to the server java.net.SocketExecption: Network is unreachable».

    Please help! Btw, I tried restarting the server, my wireless connection, and even my computer; yet still nothing works.

    Thank you so much!

    • Enderman Ender
    • Join Date: 6/3/2011
    • Posts: 8,485
    • Member Details

    This strongly implies that the IP address they are trying to use is bogus.
    A port forwarding problem would not manifest itself as a NETWORK unreachable.

    This message means that an IP router somewhere is throwing up it’s hands and saying «I have no idea where to send this»

    • Tree Puncher
    • Join Date: 1/11/2012
    • Posts: 24
    • Member Details

    This strongly implies that the IP address they are trying to use is bogus.
    A port forwarding problem would not manifest itself as a NETWORK unreachable.

    This message means that an IP router somewhere is throwing up it’s hands and saying «I have no idea where to send this»

    The odd thing is that they have been using the same IP all the time, and only now am I getting this error. I got the IP to use off of IPChicken, and it is the same as always.

    • Tree Puncher
    • Join Date: 1/11/2012
    • Posts: 24
    • Member Details

    • Enderman Ender
    • Join Date: 6/3/2011
    • Posts: 8,485
    • Member Details

    that error means the device where your packets are arriving is NOT LISTENING.

    So.. either your server is not running, or you are using the wrong IP address to connect with, or your port forwarding is pointed at the wrong IP address.

    This is not usually a firewall issue, as they usually just silently eat packets.

    • Tree Puncher
    • Join Date: 1/11/2012
    • Posts: 24
    • Member Details

    that error means the device where your packets are arriving is NOT LISTENING.

    So.. either your server is not running, or you are using the wrong IP address to connect with, or your port forwarding is pointed at the wrong IP address.

    This is not usually a firewall issue, as they usually just silently eat packets.

    My server is running, I use the right IP, and I’m pretty sure my port forwarding is pointed at the correct IP address. Whenever I go on Verizon and port forward, it seems to work; yet when I go on canyouseeme.org and test port 25565, it also says connection refused. Man, is this annoying.

    EDIT: Other computers in my LAN can connect to my server, but still not outside of my LAN.

    Источник

    Ошибка «io.netty.channel.AbstractChannel AnnotatedConnectException» в Minecraft: что делать?

    Запуск Minecraft может быть прерван ошибкой «io.netty.channel.AbstractChannel AnnotatedConnectException: Connection refused: no further information», которая возникает на этапе подключения к серверу. Узнаем, что предшествует появлению этой ошибки и способы ее исправления.

    Чем вызвана ошибка?

    Если при запуске Майнкрафт на экране видим ошибку «io.netty.channel.AbstractChannel AnnotatedConnectException», из-за которой игре отказано в подключении, то она может произойти по следующим причинам:

    1. Подключение к серверу заблокировано брандмауэром Windows. Чтобы этого избежать, нужно добавить в список исключений каталог с игрой и файлы Java.
    2. Проблема может возникнуть после обновления Minecraft до последней версии, когда в системе используется устаревшая версия Java. В результате это может привести к конфликту с определенными компонентами игры и препятствовать подключению к серверу.
    3. В фоновом режиме работает программное обеспечение, которое не совместимо с Майнкрафт, и вызывает ошибку при соединении с сервером.

    Перед применением решений перезагрузите роутер. Возможно, ошибка возникла из-за ошибочной сетевой конфигурации или повреждения кэша DNS. Отключите кабель питания роутера и подождите 2-3 минуты, прежде чем подключить устройство к электросети. Когда подключение к интернету будет установлено, попробуйте запустить игру.

    Кроме того, найдите по запросу в интернете список приложений, которые несовместимы с определенными компонентами Minecraft, и удалите их, если они присутствуют на компьютере.

    Добавление исключения в Брандмауэр

    Во многих случаях подключение к серверу Minecraft блокируется брандмауэром Windows, что в конечном итоге приводит к ошибке «io.netty.channel.AbstractChannel AnnotatedConnectException». Поэтому попробуйте добавить исключение для некоторых исполняемых файлов из папки Minecraft, которым требуется доступ в интернет.

    Разверните меню Пуск и щелкните на значок шестеренки, чтобы открыть системные Параметры, либо просто нажмите Win + I. Перейдите в раздел «Обновления и безопасность».

    Откройте вкладку «Безопасность Windows» и перейдите в раздел «Брандмауэр и защита сети».

    Выберите опцию «Разрешить работу с приложением через Брандмауэр».

    Кликните на кнопку «Изменить параметры» и подтвердите это запрос нажатием на кнопку «Да».

    Затем выберите «Разрешить другое приложение» и кликните на кнопку «Обзор». Перейдите в папку Minecraft и выберите исполняемый файл.

    Повторите указанные действия еще раз. Перейдите в папку, в которой установлены серверы Minecraft. Откройте папку Maxwell – MinecraftServer. Установите разрешения обоим исполняемым файлам Java внутри этой папки таким же образом.

    Теперь найдите в списке все опции «Java Platform SE Binary» и отметьте флажками для частной и публичной сети.

    После применения изменений запустите Minecraft и посмотрите, прерывается ли этот процесс ошибкой «io.netty.channel.AbstractChannel AnnotatedConnectException».

    Добавление IP-адреса и порта

    Если для доступа в интернет используется динамический IP-адрес, он будет меняться каждые пару дней. Поэтому проверьте IP-адрес и порт для игры и добавьте его в лаунчер Minecraft.

    Откройте командную строку с помощью поиска Windows, предоставив ей доступ администратора.

    В консоли выполните команду ipconfig и запишите IPv4-адрес.

    Затем перейдите в папку Minecraft Servers – Maxwell (с набором случайных чисел) – MinecraftServer и откройте текстовый документ «Server Properties».

    Найдите в нем и запишите значение строки «Server Port», например, «25565».

    Затем запустите Minecraft и перейдите к опции «Play Multiplayer». Выберите сервер и кликните на «Edit» (Редактировать).

    Теперь в поле Address укажите IPv4-адрес и номер порта, например, «XXX.XXX.X.X:25565»

    Кликните на Done (Готово), затем на кнопку Refresh (Обновить). Проверьте, прерывается ли запуск Minecraft ошибкой.

    Проверка фильтрации портов

    Иногда проблема может возникнуть в результате случайной фильтрации пользователем требуемых портов. Несмотря на то, что переадресация портов правильно настроена, фильтрация автоматически обнуляет ее, что приводит к указанной ошибке. Проверьте сетевые конфигурации роутера и локальной машины и убедитесь, что фильтрация портов не включена.

    Источник

    Перейти к содержанию

    При попытке подключения к серверу «Майнкрафт» пользователь может столкнуться с сообщением «Java.net.ConnectException: Connection timed out: no further information». Появление данного сообщения обычно сигнализирует о возникновении различного рода сетевых проблем при получении доступа к игровому серверу, из-за чего желание пользователя насладиться игровыми мирами «Майнкрафт» остаётся нереализованным. Ниже я разберу суть данной дисфункции, опишу её причины, а также поясню, как исправить ошибку Java.net.ConnEctexception на вашем ПК.

    Сообщение Java.net.ConnectException

    Содержание

    1. Connection timed out: no further information – особенности дисфункции
    2. Как исправить «Java.net.ConnectException: Connection timed out»
    3. Заключение

    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-адрес, полученный через провайдера (обычно данная услуга имеет платный характер);
    • Установите на ваш ПК (гаджет) свежую версию «Майнкрафт». Обычно необходимо, чтобы версии игры на сервере и на вашем ПК (гаджете) соответствовали друг другу; Картинка MINECRAFT
      Установите самую свежую версию программы
    • Избавьтесь от имеющихся модов к игре. Если вы используете какие-либо моды «Майнкрафт», рекомендуется удалить их, оставив само тело игры;
    • Перезагрузите ваш роутер. Отключите ваш роутер, подождите полминуты, а затем включите его обратно;
    • Обратитесь за консультацией к провайдеру. По различным причинам некоторые провайдеры блокируют доступ к некоторым серверам. Узнайте, не ваш ли это случай, и не является ли ваш провайдер причиной возникновения данной проблемы.

    Заключение

    Наиболее распространёнными причинами ошибки «Java.net.ConnectException: Connection timed out: no further information» является устаревание пользовательской версии «Java» и блокировка брандмауэром подключения к нужному игровому серверу. Решением проблемы станет выполнение перечисленных выше советов, это позволит исправить ошибку Java.net.ConnectException на вашем ПК.

    Опубликовано 21.03.2018 Обновлено 03.12.2020

    Ошибка java.net.ConnectException: Connection refused является одним из самых распространенных сетевых исключений в Java. Эта ошибка возникает, когда вы работаете с архитектурой клиент-сервер и пытаетесь установить TCP-соединение от клиента к серверу.

    Соединение также происходит в случае RMI (удаленного вызова метода), потому что RMI также использует протокол TCP-IP. При написании кода клиентского сокета на Java вы всегда должны обеспечивать правильную обработку этого исключения.

    В этом руководстве по Java вы узнаете, почему возникает исключение при отказе в соединении и как решить проблему.

    Причины

    ошибка java.net.ConnectException: Connection refused

    Отказ в соединении – это явный случай, когда клиент пытается подключиться через порт TCP, но не может это сделать. Вот некоторые из возможных причин, почему это происходит:

    1. Клиент и Сервер, один или оба из них не находятся в сети.

    Да, возможно, что они не подключены к локальной сети, Интернету или любой другой сети.

    1. Сервер не работает.

    Вторая наиболее распространенная причина – сервер не работает. Вы можете использовать следующие сетевые команды, например, ping, чтобы проверить, работает ли сервер.

    1. Сервер работает, но не видит порт, к которому клиент пытается подключиться.

    Это еще одна распространенная причина возникновения «java.net.ConnectException: соединение отклонено», когда сервер работает, но видит другой порт. Трудно разобраться в этом случае, пока вы не проверите конфигурацию.

    1. Брандмауэр запрещает комбинацию хост-порт.

    Почти каждая корпоративная сеть защищена. Если вы подключаетесь к сети других компаний, вам нужно убедиться, что они разрешают друг другу IP-адрес и номер порта.

    1. Неверная комбинация хост-портов.

    Проверьте последнюю конфигурацию на стороне клиента и сервера, чтобы избежать исключения отказа в соединении.

    1. Неверный протокол в строке подключения.

    TCP является базовым протоколом для многих высокоуровневых протоколов, включая HTTP, RMI и другие. Нужно убедиться, что вы передаете правильный протокол, какой сервер ожидает.

    Если вам интересно узнать больше об этом, то изучите книгу по сетевым технологиям, такую ​​как Java Network Programming (4-е дополнение), написанную Гарольдом Эллиоттом Расти.

    Java Network Programming

    Простое решение состоит в том, чтобы сначала выяснить фактическую причину исключения. Здесь важнее всего подход к поиску правильной причины и решения. Как только вы узнаете реальную причину, вам, возможно, даже не потребуется вносить какие-либо существенные изменения.

    Вот несколько советов, которые могут помочь исправить ошибку java.net.ConnectException: Connection refused:

    1. Сначала попытайтесь пропинговать целевой хост, если хост способен пинговать, это означает, что клиент и сервер находятся в сети.
    2. Попробуйте подключиться к хосту и порту сервера, используя telnet. Если вы можете подключиться, значит что-то не так с вашим клиентским кодом. Кроме того, наблюдая за выводом telnet, вы узнаете, работает ли сервер или нет, или сервер отключает соединение.

    

    Improve Article

    Save Article

  • Read
  • Discuss
  • 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.

    1. 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.
    2. 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.
    3. Sometimes a server may be running but not listening on port because of some overridden settings etc.
    4. Usually, for security reasons, the Firewall will be there, and if it is disallowing the communication.
    5. By mistake, the wrong port is mentioned in the port or the random port generation number given.
    6. 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.

    1) Client and Server, either or both of them are not in the network.
    Yes it’s possible that they are not connected to LAN or internet or any other network, in that case, Java will throw
    «java.net.ConnectException: Connection refused» exception on client side.

    2) Server is not running
    The second most common reason is the server is down and not running. In that case, also you will get java.net.ConnectException: Connection refused error. What I don’t like is that the message it gives, no matter what is the reason it prints the same error. By the way, you can use following networking commands e.g. ping to check if the server is running and listening on the port.

    3) The server is running but not listening on the port, a client is trying to connect.
    This is another common cause of «java.net.ConnectException: Connection refused», where the server is running but listening on the different port. It’s hard to figure out this case, until, you think about it and verify the configuration. If you
    are working on a large project and have a hierarchical configuration file, Its possible that either default configuration
    is taking place or some other settings are overriding your correct setting.

    4) Firewall is not permitted for host-port combination
    Almost every corporate network is protected by firewalls. If you are connecting to some other companies network e.g. opening an FIX session to the broker, in any Electronic Trading System, then you need to raise firewall
    request from both sides to ensure that they permit each other’s IP address and port number. If the firewall is not allowing
    connection then also you will receive same java.net.ConnectException: Connection refused exception in Java application.

    5) Host Port combination is incorrect.
    This could be another reason of java.net.ConnectException: Connection refused: connect.It’s quite possible that either you are providing incorrect host port combination or earlier host port combination has been changed on the server side. Check the latest configuration on both client and server side to avoid connection refused exception.

    6) Incorrect protocol in Connection String
    TCP is underlying protocol for much high-level protocol including HTTP, RMI and others. While passing connection
    string, you need to ensure that you are passing correct protocol, which server is expecting e.g. if server has exposed
    its service via RMI than connection string should begin with rmi://

    Понравилась статья? Поделить с друзьями:

    Читайте также:

  • Ошибка java socket exception
  • Ошибка java net connectexception connection refused connect
  • Ошибка java not found
  • Ошибка java lang nullpointerexception group
  • Ошибка java lang noclassdeffounderror

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии