Winsock ошибка 10061

Stuck with Winsock Error 10061? We can help you.

Winsock error 10061 occurs when the target machine we are trying to connect actively refuses the request.

This ‘Connection Refused’ error happens generally when the service with which we are trying to connect is inactive.

Here at Bobcares, we often get requests from our customers to fix similar errors as a part of our Server Management Services.

Today let’s see how our Support Engineers fix this error for our customers.

How to fix Winsock Error 10061?

Before going into the steps of fixing Winsock Error 10061, we will see some of the common causes for this error.

Common causes for this Error:

1. The most common cause is a misconfigured server, full server, or using an incorrect port to connect.

2. Poor or no internet connection.

3. Service inactive on the destination server.

4. Trying to connect to the wrong host.

5. Using a port number that is higher than 655355.

6. A firewall or anti-virus software on the local computer or network connection blocking the connection.

7. Corrupted registry.

Steps to fix Winsock Error 10061

1. First we must check if the Internet connection is working properly or not.

2. Next we need to ensure that firewall is not blocking the Winsock connection.

Generally, firewalls are designed to prevent unauthorized access soo there is a possibility that it can see Winsock as a potential threat.

To unblock Winsock, we can use the following steps:

a. First, locate the firewall in the navigation bar (next to the clock)
b. Then right-click and take the “Exception List”
c. In the exception list, if Winsock is not already displayed, we will add it.

3. Run a scan to check for potential threats or viruses using any anti-virus.

4. Clean out the registry using a registry cleaner to scan through the part of the PC and repair any of the damaged settings if any.

5. After that we can verify whether the host is resolving to the correct IP address

6. Then we will check whether the ports are open and listening.

7. We must keep in mind to use any port less than 65535.

8. After this we will ensure that the service can be connected to all IP addresses. Also, we will check if the ISP allows outbound traffic on port 25.

10. If all the above steps did not help to connect, we will disable the firewall or anti-virus software and try to connect again.

[Still, facing Winsock error? We are happy to help you!]

Conclusion

To conclude, we saw various causes for Winsock error 10061 along with the steps our Support Techs follow to fix this error for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Reset Internet Information Services immediately you get this error

by Henderson Jayden Harper

Passionate about technology, Crypto, software, Windows, and everything computer-related, he spends most of his time developing new skills and learning more about the tech world. He also enjoys… read more


Updated on

  • Winsock error 10061 indicates the target server you are trying to connect to actively refused the request.
  • It occurs when there is a network connection issue or the service on the destination server is inactive.
  • Enable the port in Windows Firewall and reset the Internet Information Service to fix the problem.

winsock error 10061

Many Windows users have reported the Winsock Error 10061 that results from trying to connect to a service. The error means a connection wasn’t established, and the server actively refused it, preventing the computer from connecting to the server’s localhost. As we dive into this article, we’ll discuss how to fix the error in a few steps.

Alternatively, you can check our comprehensive guide on how to fix Windows 10 can’t connect to this network error message on Windows PCs.

What causes the Winsock error 10061?

Several factors can cause the target machine we are trying to connect to refuse the request, resulting in an error actively. Some notable ones are:

  • Server issues – When the server is misconfigured or full, it can affect its connection to a new or existing network from the contact address. Also, using an incorrect port to connect to the target machine will result in the Winsock Error 10061.
  • Poor Internet connection – The error can also occur if your internet connection is not stable or reliable due to network congestion or other network issues. It distorts the communication between the target server and the contact machine.
  • Service inactive on the destination server – Winsock error 10061 can appear when trying to connect to an inactive service on the target host. Also, the server application you’re trying to contact might not be executing on the foreign host.
  • Firewall or antivirus software interference – You can also encounter the error if you have a firewall service or antivirus software running on your computer. It can impede the communication between the local host and the target server.

These factors can vary on numerous PCs depending on the circumstances. Regardless, we’ll take you through the basic steps for resolving the error.

How can I fix the Winsock error 10061?

Before trying any advanced fixes, go through the preliminary checks below:

  • Power cycle your router or modem – It will refresh your network connection and help the router connect faster.
  • Check the destination address or the hostname – Cross-check the destination address you’re trying to connect with to ensure it is the correct host address. If you use a hostname, ensure it resolves to the appropriate address.
  • Change outgoing mail SMTP – Switch the outgoing Mail SMTP from 25 to 587 to fix the error.
  • Temporarily disable antivirus software – It will help prevent the security services from checking or impeding the connection.

Peradventure, you are still unable to get around the error, proceed with the following solutions:

 1. Reset Internet Information Services (IIS)

  1. Left-click the Start button, type Command Prompt, and click the Run as administrator option.
  2. Click Yes on the User Account Control (UAC) prompt.
  3. Type the following in the command bar and press Enter:  iisreset
  4. Restart your PC and check if the error persists.

Resetting Internet Information Services will restore all services and websites on your server to their default settings and fix any configuration issues. Check our guide on how to fix Command Prompt not working on your PC.

2. Enable port in Windows Firewall

  1. From the Start menu, search Control Panel, and press Enter.
  2. Then, click on Windows Defender Firewall.
  3. Select Advanced Settings.
  4. Then, choose Inbound Rules and click New Rule in the Actions window.
  5. Now, select Rule Type of Port and click Next.
  6. On the Protocol and Ports page click TCP. Select Specific Local Ports, type a value of 80, and click Next.
  7. On the Action page click Allow the connection and click Next.
  8. In the Profile page click the appropriate options for your environment and click Next.
  9. On the Name page enter the name of ReportServer (TCP on port 80) and click Finish.
  10. Restart the computer.

Allowing Winsock to run as an exception in Windows Firewall prevents the firewall from checking or delaying its processes. You can check how to fix Windows Firewall blocking other app features on your PC.

Read more about this topic

  • Fix: Secure Boot is Greyed Out on Windows 11
  • Fix: Touchpad Clicks but Doesn’t Move on Windows 11
  • Fix: No Internet, Secured Error on Windows 11
  • Fix: Keyboard Shortcuts are Not Working in Photoshop

In addition, we have a comprehensive guide on fixing inetmgr not found (IIS Manager) on Windows 11. Likewise, you can check what to do if you are getting a destination host unreachable error while trying to ping a host.

If you have further questions or suggestions, kindly drop them in the comments section.

newsletter icon


error 10061 откуда берется при connect

От:

maxidroms

Россия

 
Дата:  05.09.05 10:10
Оценка:

При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?
Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

Помогите плз!!! Клиенты недовольны. т.к. соединиться нельзя вообще никак! Это сообщения не переодически появляется а ПОСТОЯННО, но славо богу не у всех =(


Re: error 10061 откуда берется при connect

От:

TarasCo

 
Дата:  05.09.05 10:23
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

Где угодно
1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
3)На серевре — скоре всего, опять же фаерволл.

В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

Да пребудет с тобою сила


Re[2]: error 10061 откуда берется при connect

От:

maxidroms

Россия

 
Дата:  05.09.05 10:30
Оценка:

Здравствуйте, TarasCo, Вы писали:

TC>Здравствуйте, maxidroms, Вы писали:


M>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>Где угодно

TC>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>3)На серевре — скоре всего, опять же фаерволл.

TC>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

А что может быть с настройками не то если:
Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!


Re[3]: error 10061 откуда берется при connect

От:

TarasCo

 
Дата:  05.09.05 11:07
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>Здравствуйте, TarasCo, Вы писали:


TC>>Здравствуйте, maxidroms, Вы писали:


M>>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>>Где угодно

TC>>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>>3)На серевре — скоре всего, опять же фаерволл.

TC>>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

M>А что может быть с настройками не то если:

M>Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

M>Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!

1)
Возможны «происки» встроенных фаерволов. Например стандартному фаерволу из Win XP SP2 может не понравится идея соедиится с портом N на адрес M. IMHO любой персональный фаервол будет блокировать такие попытки.

2)Дело в провайдере?
про провайдеров не знаю, какая у них там политика безопасности? Но я бы на их месте тоже все подряд порты не открывал. В любом случае, можно обратиться в саппорт и поинтересоваться.

Да пребудет с тобою сила


Re[4]: error 10061 откуда берется при connect

От:

maxidroms

Россия

 
Дата:  05.09.05 11:09
Оценка:

Здравствуйте, TarasCo, Вы писали:

TC>Здравствуйте, maxidroms, Вы писали:


M>>Здравствуйте, TarasCo, Вы писали:


TC>>>Здравствуйте, maxidroms, Вы писали:


M>>>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>>>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>>>Где угодно

TC>>>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>>>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>>>3)На серевре — скоре всего, опять же фаерволл.

TC>>>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

M>>А что может быть с настройками не то если:

M>>Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

M>>Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!


TC>1)

TC>Возможны «происки» встроенных фаерволов. Например стандартному фаерволу из Win XP SP2 может не понравится идея соедиится с портом N на адрес M. IMHO любой персональный фаервол будет блокировать такие попытки.

TC>2)Дело в провайдере?

TC>про провайдеров не знаю, какая у них там политика безопасности? Но я бы на их месте тоже все подряд порты не открывал. В любом случае, можно обратиться в саппорт и поинтересоваться.

Ну хоть вы меня успокоили что это не в клиентской и не в серверной части дело…а то меня уже на куски тут готовы разорвать


Re[2]: error 10061 откуда берется при connect

От:

MaximE

Великобритания

 
Дата:  06.09.05 09:45
Оценка:

10 (1)

TarasCo wrote:

[]

> В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения.

В этом случае отсылается только RST.

[root@localhost max]# tcpdump -i lo tcp port 10000
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes
13:23:50.494285 IP localhost.localdomain.41915 > localhost.localdomain.10000: S 176260357:176260357(0) win 32767 <mss 16396,sackOK,timestamp 4126888 0,nop,wscale 2>
13:23:50.558286 IP localhost.localdomain.10000 > localhost.localdomain.41915: R 0:0(0) ack 176260358 win 0

2 packets captured
4 packets received by filter
0 packets dropped by kernel


Maxim Yegorushkin

Posted via RSDN NNTP Server 1.9


Re[3]: error 10061 откуда берется при connect

От:

TarasCo

 
Дата:  06.09.05 12:21
Оценка:

Здравствуйте, MaximE, Вы писали:

ME>В этом случае отсылается только RST.

Да, это меня переглючило, мысль ушла . RST+ACK S:0 A:xxxxxxx обычно отвечают
Спасибо за коррективу

Да пребудет с тобою сила


Re: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 11:46
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

Вы рано успокоились насчет серверной части
Почему-то никто не обратил внимания на то что ошибка 10061 — это WSAECONNREFUSED:
Connection refused.
No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.
В более сложном случае при большой нагрузке может не успевать доходить ход до потока, делающего accept. С тем же результатом. Посмотрите

здесь

Автор: Michael Chelnokov
Дата: 09.11.01

и что мне тогда посоветовали.


Re[2]: error 10061 откуда берется при connect

От:

MaximE

Великобритания

 
Дата:  10.09.05 12:16
Оценка:

Здравствуйте, Michael Chelnokov, Вы писали:

MC>Здравствуйте, maxidroms, Вы писали:


M>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?


MC>Вы рано успокоились насчет серверной части

MC>Почему-то никто не обратил внимания на то что ошибка 10061 — это WSAECONNREFUSED:
MC>Connection refused.
MC>No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

MC>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.

В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.

Когда очередь установленных соединений заполнена, новые клиенты не получают RST на свой SYN (что вызвало бы WSAECONNREFUSED). Новые клиенты не получают ничего на свой FIN, поэтому TCP стэк клиента будет еще несколько раз пытаться установить соединение посылая серверу SYN, пока не соединится успешно или не отвалится по таймауту с ошибкой WSAETIMEDOUT.


Re[3]: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 13:01
Оценка:

Здравствуйте, MaximE, Вы писали:

MC>>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.


ME>В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.

Максим, я бы не писал если бы не знал. Если проверишь, то увидишь в этом случае именно WSAECONNREFUSED для тех клиентов что не поместились в очередь. WSAETIMEDOUT они получат если совсем ничего не будет в ответ. А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.


Re[4]: error 10061 откуда берется при connect

От:

MaximE

Великобритания

 
Дата:  10.09.05 13:07
Оценка:

Здравствуйте, Michael Chelnokov, Вы писали:

MC>Здравствуйте, MaximE, Вы писали:


MC>>>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.


ME>>В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.


MC> … А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.

И что в этом случае сервер отсылает клиенту?


Re[3]: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 13:10
Оценка:

1 (1)

Здравствуйте, MaximE, Вы писали:

ME>Когда очередь установленных соединений заполнена, новые клиенты не получают RST на свой SYN

Не факт. Судя по Стивенсу, POSIX разрешает как игнорировать SYN, так и отвечать на него RST.
В Windows — второй вариант. В BSD — первый.
Давайте будем отталкиваться от того факта что клиенты все же получают RST, т.к. ошибка именно ECONNREFUSED, а не ETIMEDOUT. Т.е. кто-то все же отсылает оный RST. Почему бы не предположить что этот кто-то и есть сервер? Сервер под Windows


Re[5]: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 13:11
Оценка:

Здравствуйте, MaximE, Вы писали:

MC>> … А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.


ME>И что в этом случае сервер отсылает клиенту?

RST

Подождите ...

Wait...

  • Переместить
  • Удалить
  • Выделить ветку

Пока на собственное сообщение не было ответов, его можно удалить.

Stuck with Winsock Error 10061? We can help you.

Winsock error 10061 occurs when the target machine we are trying to connect actively refuses the request.

This ‘Connection Refused’ error happens generally when the service with which we are trying to connect is inactive.

Here at Bobcares, we often get requests from our customers to fix similar errors as a part of our Server Management Services.

Today let’s see how our Support Engineers fix this error for our customers.

How to fix Winsock Error 10061?

Before going into the steps of fixing Winsock Error 10061, we will see some of the common causes for this error.

Common causes for this Error:

1. The most common cause is a misconfigured server, full server, or using an incorrect port to connect.

2. Poor or no internet connection.

3. Service inactive on the destination server.

4. Trying to connect to the wrong host.

5. Using a port number that is higher than 655355.

6. A firewall or anti-virus software on the local computer or network connection blocking the connection.

7. Corrupted registry.

Steps to fix Winsock Error 10061

1. First we must check if the Internet connection is working properly or not.

2. Next we need to ensure that firewall is not blocking the Winsock connection.

Generally, firewalls are designed to prevent unauthorized access soo there is a possibility that it can see Winsock as a potential threat.

To unblock Winsock, we can use the following steps:

a. First, locate the firewall in the navigation bar (next to the clock)
b. Then right-click and take the “Exception List”
c. In the exception list, if Winsock is not already displayed, we will add it.

3. Run a scan to check for potential threats or viruses using any anti-virus.

4. Clean out the registry using a registry cleaner to scan through the part of the PC and repair any of the damaged settings if any.

5. After that we can verify whether the host is resolving to the correct IP address

6. Then we will check whether the ports are open and listening.

7. We must keep in mind to use any port less than 65535.

8. After this we will ensure that the service can be connected to all IP addresses. Also, we will check if the ISP allows outbound traffic on port 25.

10. If all the above steps did not help to connect, we will disable the firewall or anti-virus software and try to connect again.

[Still, facing Winsock error? We are happy to help you!]

Conclusion

To conclude, we saw various causes for Winsock error 10061 along with the steps our Support Techs follow to fix this error for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Содержание

  1. Ошибка «unable to connect to socket: Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение. (10061)» (РЕШЕНО)
  2. WinSock 10061 error
  3. Решение
  4. Windows socket error 10061 api connect

Ошибка «unable to connect to socket: Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение. (10061)» (РЕШЕНО)

WSL2 — это подсистема Windows для Linux, которая позволяет запускать подобия дистрибутивов Linux прямо в Windows не используя виртуальные машины.

По умолчанию дистрибутивы запускаются с интерфейсом командной строки, но это ограничение можно обойти, запустив на Linux сервер RDP (удалённый рабочий стол) или VNC, а затем подключившись к нему используя соответствующий клиент.

Для Kali Linux этот процесс был значительно автоматизирован и упрощён, подробности описаны в статье «Как установить Kali Linux с Win-KeX (графический интерфейс) в WSL2 (подсистему Windows для Linux)».

После установки Win-KeX для запуска графического интерфейса достаточно запустить Kali Linuxв WSL2:

А затем внутри Kali Linux выполнить команду:

После этого должен открыться графический интерфейс.

Но иногда это не происходит и появляется ошибка:

В командной строке выводится:

Для исправления этой ошибки нажмите Ctrl+c.

Затем введите команду

Эта команда может вывести что-то вроде следующего:

Вновь попробуйте открыть графический интерфейс:

На этот раз всё должно заработать:

Причина ошибки до конца не ясна — возможно, дело в неудачном старте VNC сервера или процесса Win-KeX, на это указывает строка «Win-KeX process ID 1618… which was already dead», то есть процесс уже мёртвый.

Командой kex stop мы принудительно останавливаем Win-KeX, который при следующем запуске работает нормально.

Вложения

screens.7z (404.0 Кб, 1 просмотров)

Socket Error # 10061
привет всем. У меня проблема. Добавил IdFTP. Написал в билдере: void __fastcall.

Error #10061 idHTTP
Всем доброго времени суток. Пишу программу delphi-php. Использую idHTTP. Обмен данными происходит.

Indy 10 (socket error # 10061)
Доброго! Ни как не могу отловить ошибку отсутствия сервера, что бы просто говорила, что его нет.

Asynchronous socket error 10061
На одном компе работает. Когда пытаюсь к другому компу подключится,вылезает эта ошибка.

ScrollLock, по поводу пинга 127.0.0.1 — просто проверил что вообще пинг до собственно машины доходит, ибо обе эти программы идут на тот или иной порт локалхоста.

Хостс пустой и вроде как правильный

Решение

хостс не должен быть пустым, хотя это и ни на что не влияет

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

Добавлено через 21 секунду
Редактировали ?

Windows socket error 10061 api connect

При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?
Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

Помогите плз. Клиенты недовольны. т.к. соединиться нельзя вообще никак! Это сообщения не переодически появляется а ПОСТОЯННО, но славо богу не у всех =(

От: TarasCo
Дата: 05.09.05 10:23
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?
M>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

Где угодно
1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
3)На серевре — скоре всего, опять же фаерволл.

В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

От: maxidroms
Дата: 05.09.05 10:30
Оценка:

Здравствуйте, TarasCo, Вы писали:

TC>Здравствуйте, maxidroms, Вы писали:

M>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?
M>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>Где угодно
TC>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>3)На серевре — скоре всего, опять же фаерволл.

TC>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

А что может быть с настройками не то если:
Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!

От: TarasCo
Дата: 05.09.05 11:07
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>Здравствуйте, TarasCo, Вы писали:

TC>>Здравствуйте, maxidroms, Вы писали:

M>>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?
M>>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>>Где угодно
TC>>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>>3)На серевре — скоре всего, опять же фаерволл.

TC>>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

M>А что может быть с настройками не то если:
M>Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

M>Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!

1)
Возможны «происки» встроенных фаерволов. Например стандартному фаерволу из Win XP SP2 может не понравится идея соедиится с портом N на адрес M. IMHO любой персональный фаервол будет блокировать такие попытки.

2)Дело в провайдере?
про провайдеров не знаю, какая у них там политика безопасности? Но я бы на их месте тоже все подряд порты не открывал. В любом случае, можно обратиться в саппорт и поинтересоваться.

От: maxidroms
Дата: 05.09.05 11:09
Оценка:

Здравствуйте, TarasCo, Вы писали:

TC>Здравствуйте, maxidroms, Вы писали:

M>>Здравствуйте, TarasCo, Вы писали:

TC>>>Здравствуйте, maxidroms, Вы писали:

M>>>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?
M>>>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>>>Где угодно
TC>>>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>>>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>>>3)На серевре — скоре всего, опять же фаерволл.

TC>>>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

M>>А что может быть с настройками не то если:
M>>Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

M>>Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!

TC>1)
TC>Возможны «происки» встроенных фаерволов. Например стандартному фаерволу из Win XP SP2 может не понравится идея соедиится с портом N на адрес M. IMHO любой персональный фаервол будет блокировать такие попытки.

TC>2)Дело в провайдере?
TC>про провайдеров не знаю, какая у них там политика безопасности? Но я бы на их месте тоже все подряд порты не открывал. В любом случае, можно обратиться в саппорт и поинтересоваться.

Ну хоть вы меня успокоили что это не в клиентской и не в серверной части дело. а то меня уже на куски тут готовы разорвать

От: MaximE
Дата: 06.09.05 09:45
Оценка: 10 (1)

[]

> В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения.

В этом случае отсылается только RST.

От: TarasCo
Дата: 06.09.05 12:21
Оценка:

Здравствуйте, MaximE, Вы писали:

ME>В этом случае отсылается только RST.

Да, это меня переглючило, мысль ушла . RST+ACK S:0 A:xxxxxxx обычно отвечают
Спасибо за коррективу

От: Michael Chelnokov
Дата: 10.09.05 11:46
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

Вы рано успокоились насчет серверной части
Почему-то никто не обратил внимания на то что ошибка 10061 — это WSAECONNREFUSED:
Connection refused.
No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.
В более сложном случае при большой нагрузке может не успевать доходить ход до потока, делающего accept. С тем же результатом. Посмотрите здесь

От: MaximE
Дата: 10.09.05 12:16
Оценка:

Здравствуйте, Michael Chelnokov, Вы писали:

MC>Здравствуйте, maxidroms, Вы писали:

M>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

MC>Вы рано успокоились насчет серверной части
MC>Почему-то никто не обратил внимания на то что ошибка 10061 — это WSAECONNREFUSED:
MC>Connection refused.
MC>No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

MC>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.

В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.

Когда очередь установленных соединений заполнена, новые клиенты не получают RST на свой SYN (что вызвало бы WSAECONNREFUSED). Новые клиенты не получают ничего на свой FIN, поэтому TCP стэк клиента будет еще несколько раз пытаться установить соединение посылая серверу SYN, пока не соединится успешно или не отвалится по таймауту с ошибкой WSAETIMEDOUT.

От: Michael Chelnokov
Дата: 10.09.05 13:01
Оценка:

Здравствуйте, MaximE, Вы писали:

MC>>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.

ME>В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.

Максим, я бы не писал если бы не знал. Если проверишь, то увидишь в этом случае именно WSAECONNREFUSED для тех клиентов что не поместились в очередь. WSAETIMEDOUT они получат если совсем ничего не будет в ответ. А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.

От: MaximE
Дата: 10.09.05 13:07
Оценка:

Здравствуйте, Michael Chelnokov, Вы писали:

MC>Здравствуйте, MaximE, Вы писали:

MC>>>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.

ME>>В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.

MC> . А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.

И что в этом случае сервер отсылает клиенту?

От: Michael Chelnokov
Дата: 10.09.05 13:10
Оценка: 1 (1)

Здравствуйте, MaximE, Вы писали:

ME>Когда очередь установленных соединений заполнена, новые клиенты не получают RST на свой SYN

Не факт. Судя по Стивенсу, POSIX разрешает как игнорировать SYN, так и отвечать на него RST.
В Windows — второй вариант. В BSD — первый.
Давайте будем отталкиваться от того факта что клиенты все же получают RST, т.к. ошибка именно ECONNREFUSED, а не ETIMEDOUT. Т.е. кто-то все же отсылает оный RST. Почему бы не предположить что этот кто-то и есть сервер? Сервер под Windows

От: Michael Chelnokov
Дата: 10.09.05 13:11
Оценка:

Здравствуйте, MaximE, Вы писали:

MC>> . А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.

ME>И что в этом случае сервер отсылает клиенту?

RST

When using their emails, users may have experienced “runtime error 10061“. This error is primarily the fault of the destination computer, which refuses the connection with the clients PC. This means that the error arises when the user tries to connect to a currently inactive service on a foreign host which is not running server software. Though this may seem complicated, the actual reasons for this are simple enough and the resolutions are therefore not too complex. Read on for steps on how to tackle this problem.

What Causes Error 10061

The errors which may arise from this can be displayed as follows:

The connection to the server has failed. Account: ‘your_e-mail account’, Server:’your_SMTP_server’, Protocol:SMTP, Port: 25, Secure(SSL): NO,Socket error: 10061, Error Number: 0x800ccc0e

This is when you attempt to send an email to an SMTP server. Another error is:

The connection to the server has failed. Account: ‘your_e-mail_account’,Server:’your_POP3_server’, Protocol:POP3, Port: 110, Secure(SSL): NO, Socket error: 10061, Error Number: 0x800ccc0e

This time this is from a POP 3 server. Both of these are email examples, however the error may display itself alternatively, such as

WSAECONNREFUSED (10061)

All of these mean the same thing, the connection is refused by a foreign host. To see steps to resolve this, read below.

How To Fix Runtime Error 10061

Step 1 – Test To See if Your Internet is Working

The main cause of this error is when the user’s own internet connection is not working. The easiest way to solve this would be to test their internet connection. To do this:

  1. Open up your internet browser
  2. Go to a search engine, such as Google, and type a random word that you know shows results

If it was not possible to complete the 2nd step, your Internet is probably not working. This will result in the error 10061 appearing. This is easily rectified, you can either ring your ISP and ask them to identify the problem, or you can try to figure out why your internet is not connected. Either way, once you have established what is wrong and have fixed it, retry these steps again. If it still produces an error, please carry on to the next step.

Step 2 – Ensure your firewall is not blocking the Winsock connection

Winsock is basically the way Windows defines how the Windows software should connect to the network, in particular TCP/IP. It is the link between an internet protocol, such as FTP, and Windows software. As you could imagine, if this were to be blocked by anything, Windows software would not to connect to the internet. One program that could be blocking this could be a firewall. Although unlikely, firewalls are designed to prevent unauthorised access and therefore could see Winsock as a potential threat. To unblock Winsock, follow these steps:

  1. Locate your firewall in the navigation bar (next to the clock)
  2. Right click and look for an “Exception List” or similar

In the exception list, if Winsock is not already displayed, make sure you add it. This means the firewall will not block it from accessing the Internet. Of course, all firewall software is different so if in doubt contact your software manufacturer. When you have completed this step, proceed to step 1 again and validate the process. If this has not fixed it, please continue to step 3.

Step 3 – Clean Out Viruses

Download this antivirus program

Viruses are a huge cause of the 10061 error because of the way which these rogue pieces of software infect your PC and corrupt all sorts of settings. One of the biggest problems is that they often block access to the Internet, which can cause the 10061 error. To fix this problem, it’s advisable that you clean out your PC with a reliable antivirus program, such as our recommended “XoftSpy“.

Step 4 – Clean Out The Registry

Download this registry cleaner

Another big cause of Runtime errors is down to the “registry” of your system. The registry is a large database which stores files and settings that your PC requires to run, and is what Windows uses every day to help it recall such information as your desktop wallpaper and even your latest emails. Unfortunately, the registry is also one of the biggest causes of problems for your computer, as it’s constantly becoming corrupted and leading your computer to run with many errors as a result. To fix this problem, it’s advisable you use a registry cleaner to scan through the part of your PC and repair any of the damaged settings that are inside it. You can use our recommended registry cleaner below:

On the client side:

  1. do not call WSACleanup() before calling connect().
  2. You are not doing any error handling on getaddrinfo().
  3. you are not setting the ai_flags to match your input values (like AI_NUMERICHOST).
  4. you are not freeing the memory that getaddrinfo() returns.
  5. you are not taking into account that you are specifying AF_UNSPEC to getaddrinfo() so it may return multiple addresses. You should try to connect to all of them until one succeeds.

Try this instead:

void Base::Connect(string ip, string port)
{
    int status, error;
    SOCKET ConnectSocket = INVALID_SOCKET;
    struct addrinfo hints = {0};
    struct addrinfo *servinfo;  // will point to the results

    hints.ai_family = AF_UNSPEC;     // don't care IPv4 or IPv6
    hints.ai_socktype = SOCK_STREAM; // TCP stream sockets
    hints.ai_flags = AI_NUMERICHOST; // parse an IP address
    //hints.ai_flags |= AI_NUMERICSERV; // parse a port number (not supported on Windows)

    // get ready to connect
    status = getaddrinfo(ip.c_str(), port.c_str(), &hints, &servinfo);
    if (status != 0)
    {
        printf("getaddrinfo error: (%d) %s\n", status, gai_strerror(status));
        return;
    }

    addrinfo *addr = servinfo;
    do
    {
        // Socket Setup
        ConnectSocket = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
        if (ConnectSocket == INVALID_SOCKET)
        {
            printf("socket error: %d\n", WSAGetLastError());
        }
        else
        {
            // Connect
            if (connect(ConnectSocket, addr->ai_addr, addr->ai_addrlen) != SOCKET_ERROR)
            {
                printf("connected to server\n");
                break;
            }

            printf("connect error: %d\n", WSAGetLastError());

            closesocket(ConnectSocket);
            ConnectSocket = INVALID_SOCKET;
        }

        addr = addr->ai_next;
    }
    while (addr != NULL);

    freeaddrinfo(servinfo);

    if (ConnectSocket == INVALID_SOCKET)
        printf("unable to connect to server\n");
}

On the server side:

  1. you are not doing any error handling on socket(), bind() or listen().
  2. SO_REUSEADDR has to be enabled before calling bind(), not after. And you are not even enabling it correctly, either.
  3. you are not freeing the memory that getaddrinfo() returns.

Try this instead:

int _tmain(int argc, _TCHAR* argv[])
{
    // WINDOWS SETUP
    WSAData wsaData;
    if (WSAStartup(MAKEWORD(2, 0), &wsaData) != 0) 
    {
        fprintf(stderr, "WSAStartup failed.\n");
        exit(1);
    }

    // PREPARE TO LAUNCH
    int status;
    struct sockaddr_storage their_addr;
    socklen_t addr_size;
    SOCKET client;

    struct addrinfo hints = {0};
    struct addrinfo *servinfo;  // will point to the results

    hints.ai_family = AF_UNSPEC;     // don't care IPv4 or IPv6
    hints.ai_socktype = SOCK_STREAM; // TCP stream sockets
    hints.ai_flags = AI_PASSIVE;     // fill in my IP for me
    //hints.ai_flags |= AI_NUMERICSERV; // parse a port number (not supported on Windows)

    status = getaddrinfo(NULL, "80", &hints, &servinfo);
    if (status != 0) 
    {
        fprintf(stderr, "getaddrinfo error: (%d) %s\n", status, gai_strerror(status));
        getchar();
        exit(1);
    }

    // optional, loop through servinfo creating a separate
    // listening socket for each address reported...

    // GET THE FILE DESCRIPTOR  
    SOCKET mSocket = socket(servinfo->ai_family, servinfo->ai_socktype, servinfo->ai_protocol);
    if (mSocket == INVALID_SOCKET)
    {
        fprintf(stderr, "socket error: %d\n", WSAGetLastError());
        freeaddrinfo(servinfo);
        closesocket(mSocket);
        getchar();
        exit(1);
    }

    // lose the pesky "Address already in use" error message
    BOOL yes = TRUE;
    if (setsockopt(mSocket, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof(yes)) == SOCKET_ERROR)
    {
        fprintf(stderr, "setsockopt error: %d\n", WSAGetLastError());
        freeaddrinfo(servinfo);
        closesocket(mSocket);
        getchar();
        exit(1);
    }

    // WHAT PORT AM I ON
    if (bind(mSocket, servinfo->ai_addr, servinfo->ai_addrlen) == SOCKET_ERROR)
    {
        fprintf(stderr, "bind error: %d\n", WSAGetLastError());
        freeaddrinfo(servinfo);
        closesocket(mSocket);
        getchar();
        exit(1);
    }

    freeaddrinfo(servinfo);

    int backlog = 2;
    if (listen(mSocket, backlog) == SOCKET_ERROR)
    {
        fprintf(stderr, "listen error: %d\n", WSAGetLastError());
        closesocket(mSocket);
        getchar();
        exit(1);
    }

    // SERVER STARTED LISTENING SUCCESFULLY
    printf("Server is listening...\n");

    // ACCEPT
    addr_size = sizeof their_addr;
    client = accept(mSocket, (struct sockaddr*)&their_addr, &addr_size);
    if (client == INVALID_SOCKET)
    {
        fprintf(stderr, "accept error: %d\n", WSAGetLastError());
    }
    else
    {
        char ip[NI_MAXHOST] = {0};
        char port[NI_MAXSERV] = {0};

        status = getnameinfo((struct sockaddr*)&their_addr, addr_size, ip, NI_MAXHOST, port, NI_MAXSERV, NI_NUMERICHOST | NI_NUMERICSERV);
        if (status == 0)
            printf("Client connected from %s:%s\n", ip, port);
        else
            printf("Client connected. getnameinfo error: (%d) %s\n", status, gai_strerror(status));

        //...

        closesocket(client);
    }        

    closesocket(mSocket);
    printf("Server ended");

    getchar();

    return 0;
}

WSABASEERR (1000) No Error

No Error. There’s
at least one WinSock implementation that will occasionally fail a
function and report this as the error value, even though the function
succeeded. You should simply ignore this error when it occurs.

WSAEINTR (10004) Interrupted system call

A
blocking operation was interrupted by a call to WSACancelBlockingCall.
An asynchronous signal (such as SIGINT or SIGQUIT) was caught by the
process during the execution of an interruptible function. If the signal
handler performs a normal return, the interrupted function call will
seem to have returned the error condition.

Developer suggestions:
You need to be prepared to handle this error on any functions that
reference blocking sockets, or any calls to blocking functions, if you
allow the user to cancel a blocking call. Whether to handle it as a
fatal error or non-fatal error depends on the application and the
context, so it’s up to you to decide.

WSAEBADE (10009) Bad file number

A
file descriptor argument was out of range, referred to no open file, or
a read (write) request was made to a file that was only open for
writing (reading).

WinSock description: No equivalent
in WinSock. However, because a BSD socket is equivalent to a file
handle, some Windows Sockets platforms provide some file handle and
socket equivalency. In this case, the WSAEBADF error might mean the same
as a WSAENOTSOCK error.

WSAEACCES (10013) Permission denied

An
attempt was made to access a file in a way forbidden by its file access
permissions. The file’s permission setting does not allow the specified
access. This error signifies that an attempt was made to access a file
(or, in some cases, a directory) in a way that is incompatible with the
file’s attributes. For example, the error can occur when an attempt is
made to read from a file that is not open, to open an existing read-only
file for writing, or to open a directory instead of a file. Under
MS-DOS versions 3.0 and later, EACCES may also indicate a locking or
sharing violation. The error can also occur in an attempt to rename a
file or directory or to remove an existing directory.

WSAEFAULT (10014) Bad address

The system detected an invalid address in attempting to use an argument of a call.

WSAEFAULT (10022) Invalid argument

An
invalid value was given for one of the arguments to a function. For
example, the value given for the origin when positioning a file pointer
(by means of a call to fseek) is before the beginning of the file.

WSAEMFILE (10024) Too many open files

No
process may have more than a system-defined number of file descriptors
open at a time. No more file handles are available, so no more files can
be opened.. Generically, the error means the network system has run out
of socket handles.

User suggestions: There may be too
many Winsock applications running simultaneously, but this is unlikely
since most network systems have many socket handles available. This
error also could occur if an application opens and closes sockets often,
but doesn’t properly close the sockets (so it leaves them open, as
‘orphans’). To recover the orphaned sockets, you can try closing the
application and restarting it to recover the open sockets; you may have
to end all Winsock applications (to force an unload of the Winsock DLL).

WSAEWOULDBLOCK (10035) Operation would block

This
is a temporary condition and later calls to the same routine may
complete normally. The socket is marked as non-blocking (non-blocking
operation mode), and the requested operation is not complete at this
time.

WSAEINPROGRESS (10036) Operation now in progress

An operation that takes a long time to complete (such as a connect) was attempted on a non-blocking socket.

Winsock description:
The Windows Sockets definition of this error is very different from
Berkeley Sockets. Winsock only allows a single blocking operation to be
outstanding per task (or thread), and if you make any other function
call (whether or not it references that or any other socket) the
function fails with the WSAEINPROGRESS error. It means that there is a
blocking operation outstanding.

It is also possible that Winsock
might return this error after an application calls connect a second time
on a non-blocking socket while the connection is pending (i.e. after
the first failed with WSAEWOULDBLOCK). This is what occurs in Berkeley
Sockets.

WSAEALREADY (10037) Operation already in progress

An operation was attempted on a non-blocking object that already had an operation in progress.

WinSock description:
WSAEALREADY means that the asynchronous operation you attempted to
cancel has already been canceled. However, there’s little distinction
between WSAEALREADY and WSAEINVAL since a WinSock DLL cannot tell the
difference between an asynchronous operation that has been cancelled and
one that was never valid.

Additional functions:
Berkeley sockets connect returns this error on subsequent calls, after
an initial call on a non-blocking socket. However, some WinSocks fail
with WSAEINVAL you call connect. a second time (or subsequent) on a
non-blocking socket.

WSAENOTSOCK (10038) Socket operation on non-socket

An operation was attempted on something that is not a socket. The specified socket parameter refers to a file, not a socket.

WSAEDESTADDRREQ (10039) Destination address required

A
required address was omitted from an operation on a socket. The
explanation is simple and obvious: in order to connect to or send to a
destination address, you need to provide the destination address.

User suggestions: Did you enter a destination hostname? If so, then the application might have had a problem resolving the name.

WSAEMSGSIZE (10040) Message too long

A message sent on a socket was larger than the internal message buffer or some other network limit.

Recv
and Recvfrom: If the datagram you read is larger than the buffer you
supplied, then Winsock truncates the datagram (i.e. copies what it can
into your buffer) and fails the function.

Send and Sendto: you
cannot send a datagram as large as you’ve requested. Note that the v1.1
Winsock specification does not explicitly state that this error occurs
if the value you request is larger than the WSAData.iMaxUdpDg returned
from WSAStartup. Since the buffering requirements for sending are less
than for receiving datagrams, it’s conceivable that you can send a
datagram larger than you can receive.

WSAEPROTOTYPE (10041) Protocol wrong type for socket

A
protocol was specified that does not support the semantics of the
socket type requested. For example, you cannot use the ARPA Internet UDP
protocol with type SOCK_STREAM.

This error occurs if you
specifically reference a protocol that isn’t part of the address family
you also reference. The only function that takes these two explicit
parameters is socket.

WSAENOPROTOOPT (10042) Bad protocol option

A bad option or level was specified in a getsockopt(2) or setsockopt(2) call. The option is unknown or unsupported.

WSAEPROTONOSUPPORT (10043) Protocol not supported

The
protocol has not been configured into the system, or no implementation
for it exists. So, for example, if a Winsock implementation doesn’t
support SOCK_RAW with IPPROTO_IP (or any other protocol), then the
socket call would fail with WSAEPROTONOSUPPORT (however, if it doesn’t
support SOCK_RAW at all, you should expect WSAESOCKTNOSUPPORT).

WSAESOCKTNOSUPPORT (10044) Socket type not supported

The
support for the socket type has not been configured into the system or
no implementation for it exists. The Winsock description for this error
is ‘the specified socket type is not supported in this address family.’
So, for example, you can expect this error if a Winsock implementation
doesn’t support socket type SOCK_RAW within the Internet address family
(AF_INET).

WSAEOPNOTSUPP (10045) Operation not supported on socket

The
attempted operation is not supported for the type of object referenced.
Usually this occurs when a file descriptor refers to a file or socket
that cannot support this operation, for example, trying to accept a
connection on a datagram socket.

WSAEPFNOSUPPORT (10046) Protocol family not supported

The protocol family has not been configured into the system or no implementation for it exists.

WSAEAFNOSUPPORT (10047) Address family not supported by protocol family

An
address incompatible with the requested protocol was used. For example,
you shouldn’t necessarily expect to be able to use NS addresses with
ARPA Internet protocols.

It also occurs with functions that take
a socket handle and a sockaddr structure as input parameters. A socket
already has a type (a protocol), and each sockaddr structure has an
address family field to define its format. A function fails with
WSAEAFNOSUPPORT if the address family referenced in sockaddr is not
compatible with the referenced socket’s protocol.

This error
apparently also takes the place of WSAEPFNOSUPPORT (which means
‘protocol family not supported’), since that error is not listed for
socket. in the v1.1 WinSock specification.

WSAEADDRINUSE (10048) Address already in use

Only one usage of each address is normally permitted.

WinSock description:
The ‘address’ they refer to, typically refers to the local ‘socket
name’, which is made up of the 3-tuple: protocol, port-number and IP
address.
User suggestions: Two of the same types of server
applications cannot use the same port on the same machine. For instance,
this error will occur if you try to run two applications that have FTP
servers that both try to accept connections on port 21 (the standard FTP
port). In this case, the 2nd application will fail with WSAEADDRINUSE.

WSAEADDRNOTAVAIL (10049) Can’t assign requested address

Normally results from an attempt to create a socket with an address not on this machine.

WinSock description:
The ‘address’ it refers to is the remote socket name (protocol, port
and address). This error occurs when the sin_port value is zero in a
sockaddr_in structure for connect or sendto.

This error also
occurs when you are trying to name the local socket (assign local
address and port number) with bind, but Windows Sockets doesn’t ascribe
this error to bind, for some unknown reason.

WSAENETDOWN (10050) Network is down

A
socket operation encountered a dead network. Check your Winsock,
protocol stack, network driver, and network interface card
configuration. Note that this error occurs rarely, because a Winsock
implementation cannot reliably detect hardware problems.

WSAENETUNREACH (10051) Network is unreachable

A socket operation was attempted to an unreachable network.

TCP/IP scenario:
The local network system can generate this error if there is no a
default route configured. Typically though, Winsock generates this error
when it receives a ‘host unreachable’ ICMP message from a router. The
ICMP message means that a router cannot forward the IP datagram,
possibly because it did not get a response to an ARP request (which
might mean the destination host is down). Note: this error may also
result if you try to send a multicast packet and the default gateway
does not support multicast (check your interface configuration).

WSAENETRESET (10052) Net dropped connection or reset

The host you were connected to crashed and rebooted. Try reconnecting at a later time.

WSAECONNABORTED (10053) Software caused connection abort

A
connection abort was caused internal to your host machine. The software
caused a connection abort because there is no space on the socket’s
queue and the socket cannot receive further connections.

WinSock description:
The error can occur when the local network system aborts a connection.
This would occur if WinSock aborts an established connection after data
retransmission fails (receiver never acknowledges data sent on a
datastream socket).

TCP/IP scenario: A connection will
timeout if the local system doesn’t receive an (ACK)nowledgement for
data sent. It would also timeout if a (FIN)ish TCP packet is not ACK’d
(and even if the FIN is ACK’d, it will eventually timeout if a FIN is
not returned).

WSAECONNRESET (10054) Connection reset by peer

A
connection was forcibly closed by a peer. This normally results from a
loss of the connection on the remote socket due to a timeout or a
reboot.

User suggestions: Some network systems have
commands to report statistics. In this case, it might be possible to
check the count of TCP RST packets received, or ICMP Port Unreachable
packets. See other suggestions under WSAECONNABORTED.

WSAENOBUFS (10055) No buffer space available

An
operation on a socket or pipe was not performed because the system
lacked sufficient buffer space or because a queue was full.

This
error indicates a shortage of resources on your system. It can occur if
you’re trying to run too many applications (of any kind) simultaneously
on your machine. If this tends to occur after running certain
applications for a while, it might be a symptom of an application that
doesn’t return system resources (like memory) properly. It may also
indicate you are not closing the applications properly. If it persists,
exit Windows or reboot your machine to remedy the problem. You can
monitor available memory with Program Manager’s ‘Help/About…’ command.

WSAEISCONN (10056) Socket is already connected

A
connect request was made on an already connected socket; or, a sendto
or sendmsg() request on a connected socket specified a destination when
already connected.

Winsock description: Winsock doesn’t
support the sendmsg() function, and some Winsock implementations are
not so strict as to require an application with a datagram socket to
‘disconnect’—by calling connect with a AF_INET NULL destination
address: INADDR_ANY (0.0.0.0), and port 0—before redirecting datagrams
with sendto or connect. On a datastream socket, some applications use
this error with a non-blocking socket calling connect to detect when a
connection attempt has completed, although this is not recommended since
some Winsocks fail with WSAEINVAL on subsequent connect calls.

WSAENOTCONN (10057) Socket is not connected

A
request to send or receive data was disallowed because the socket is
not connected and (when sending on a datagram socket) no address was
supplied.

WSAESHUTDOWN (10058) Can’t send after socket shutdown

A
request to send data was disallowed because the socket had already been
shut down with a previous shutdown call. By calling shutdown, you do a
partial close of a socket, which means you have discontinued sending.
The Winsock implementation will not allow you to send after this.

When
you get this error it usually means the system was trying to send a
message that was larger than the receiving system would accept OR the
receiving system had a disk full condition (or something similar). The
receiving system just stops receiving and has to close the socket to do
so.

WSAETOOMANYREFS (10059) Too many references, can’t splice

There are too many references to some kernel-level object; the associated resource has run out.

WSAETIMEDOUT (10060) Connection timed out

A
connect or send request failed because the connected party did not
properly respond after a period of time. (The timeout period is
dependent on the communication protocol.)

Check the obvious
first: check that the destination address is a valid IP address. If you
used a hostname, did it resolve to the correct address? If the hostname
resolution uses a local host table, it is possible you resolved to an
obsolete address. Can you ping that hostname?

Do you have a
router configured? Is the router up and running? (You can check by
pinging it, and then ping an address on the other side of it.) Try a
traceroute to the destination address to check that all the routers are
functioning.

Check your subnet mask. If you don’t have the
proper subnet mask, your network system may treat a local address as a
remote address (so it forwards addresses on the local subnet to the
router, rather than broadcasting an ARP request locally), or vice versa.

WSAECONNREFUSED (10061) Connection refused

Connection refused:
No connection could be made because the target machine actively refused
it. This usually results from trying to connect to a service that is
inactive on the foreign host.

User suggestions: Either
you went to the wrong host, or the server application you’re trying to
contact isn’t executing. Check the destination address you are using. If
you used a hostname, did it resolve to the correct address? If the
hostname resolution uses a local hosttable, it’s possible you resolved
to an old obsolete address. It’s also possible that the local services
file has an incorrect port number (although it’s unlikely).

WSAELOOP (10062) Too many levels of symbolic links

A pathname lookup involved more than eight symbolic links. (Too many links were encountered in translating a pathname.)

WSAENAMETOOLONG (10063) File name too long

A component of a path name exceeded 255 (MAXNAMELEN) characters, or an entire path name exceeded 1023 (MAXPATHLEN-1) characters.

WSAEHOSTDOWN (10064) Host is down

The problem may be due to one of the following:

WSAVERNOTSUPPORTED (10092) WINSOCK DLL Version out of range

The
current Winsock implementation does not support the Windows Sockets
specification version requested by the application. Do you have the
Winsock DLL that supports the version of the Winsock specification
required by the application? If so, is there an older DLL in a directory
in the path ahead of the directory containing the newer DLL? If not,
check with your Winsock vendor to see if they have a newer Winsock
available.

In other words, the Winsock you are using is not
supported by the program you are using. You would need to update your
Winsock to a supported version. In most cases, the default Winsock that
comes with your OS is appropriate. However, there are some TCP/IP
dialers that install their own Winsock.dll which may not be compatible
with our programs.

WSANOTINITIALISED (10093) Successful WSASTARTUP not yet performed

Either
your application hasn’t called WSAStartup, or WSAStartup failed. There
is another possibility: you are accessing a socket which the current
active task does not own (that is, you’re trying to share a socket
between tasks).

Chances are the network subsystem is misconfigured or inactive.

WSAEREMOTE (10071) Too many levels of remote in path

Item
is not local to the host. A server has attempted to handle an NFS
request by generating a request to another NFS server, which is not
allowed.

WSAHOST_NOT_FOUND (11001) Host not found

The
name you have used is not an official hostname or alias. This is not a
software error, another type of name server request may be successful.
Any of the Winsock name resolution functions can fail with this error.
The Winsock API does not provide any way to select specific name
resolution protocols, server address, or record type.

TCP/IP scenario:
Most Winsock implementations use domain name system (DNS) protocol for
hostname to address resolution, although a few use Network Information
System (NIS). Assuming you have a name server configured instead of or
as well as a host table, a hostname resolution request causes a Winsock
DLL to send a DNS ‘A’ record query (address query) to the configured DNS
query. If you have more than one server configured, the hostname query
fails only after the Winsock DLL has queried all servers.

Check
that you have a name server(s) and/or host table configured. If you are
using a name server(s), check whether the server host(s) are up. For
example, you can try to ping the server(s).

You could also try
to resolve another hostname you know should work, to check that the name
resolution server application is running.

If you are using a host table exclusively, you’ll need to update it to add the destination hostname and address.

WSATRY_AGAIN (11002) Non-Authoritative Host not found

This
is usually a temporary error and means that the local server did not
receive a response from an authoritative server. A retry at some time
later may be successful. See HOST_NOT_FOUND for details.

WSANO_RECOVERY (11003) Non-Recoverable errors: FORMERR, REFUSED, NOTIMP

Windows
Sockets specification notes the domain name system (DNS) errors
‘FORMERR, REFUSED, and & NOTIMP. For protocols and services
resolution, it means the respective database wasn’t located.

Format error: Name server was unable to interpret the query.

Request refused: Name server refuses to satisfy your query for policy reasons.

Not implemented: Name server does not perform specified operation.

WSANO_DATA (11004)* Valid name, no data record of requested type

The
requested name is valid, but does not have an Internet IP address at
the name server. This is not a temporary error. This means another type
of request to the name server will result in an answer. For protocol and
services resolution, the name or number was not found in the respective
database. WSAHOST_NOT_FOUND for details.

WSANO_ADDRESS (11004)* No address, look for MX record

The
requested name is valid, but does not have an Internet IP address at
the name server. This is not a temporary error. This means another type
of request to the name server will result in an answer. For protocol and
services resolution, the name or number was not found in the respective
database. WSAHOST_NOT_FOUND for details.

Понравилась статья? Поделить с друзьями:
  • Winrar ошибка нет файлов для извлечения
  • Winsetupfromusb ошибка при создании флешки
  • Winrar ошибка недостаточно памяти
  • Winrar ошибка невозможно выполнить
  • Winsetupfromusb ошибка при записи