«Отладка и поиск неисправностей», «Список ошибок MyChat Client», «Сетевые ошибки», «#11001, host not found».
Ошибка
Сетевая ошибка 11001: «Host not found»
Описание ошибки
Ошибка возникает, если MyChat Client пытается подключиться к серверу, адрес которого записан как DNS имя, но служба DNS не работает или недоступна.
Например, в настройках MyChat Client адрес сервера указан как mychat-server.com (это интернет-домен), а выхода в интернет в данный момент нет. Допустим, выключен роутер или отключен WiFi в вашем ноутбуке. Тогда запрос на resolving IP адреса по доменному имени отработать не может и система возвращает эту ошибку.
Также эта ошибка может произойти, если скорость сети очень низкая и DNS-запрос не может быть обработан из-за больших сетевых задержек.
Решение проблемы
1. Проверьте, что у вас корректно работает ваше сетевое оборудование
WiFi адаптеры, роутеры, сетевые хабы и прочее оборудование между вами и MyChat Server. Есть вероятность, что какое-то устройство «зависло» и не отвечает. Перегрузите его, при необходимости.
2. Проверка работоспособности DNS серверов
Зайдите в настройки системы, «Центр управления сетями и общим доступом», выберите ваш сетевой адаптер:
Затем нажмите на кнопку «Сведения» и посмотрите на IP адрес вашего DNS сервера:
После чего, пробуем проверить соединение с этим DNS сервером с помощью команды ping.
Откройте консоль. Меню «Пуск», «Выполнить» (или Win+R), и запустите cmd
В окне консоли выполните команду ping <ip_dns_сервера>
Если связь есть, а MyChat Client всё равно выдаёт ту же самую ошибку, значит, DNS сервер либо не функционирует, либо указан неверно.
Если же команда ping сообщает, что соединения с сервером нет, это означает, что ваш DNS сервер либо выключен, либо недоступен.
Symptoms
- Remote computer status is shown as «Offline» in the Viewer address book.
- You can establish a remote connection, but the connection is unstable.
When you examine the Host log (or Agent log, if Agent is used) you see the following error: Socket Error # 11001 Host not found.(EIdSocketError)
Cause
This error means that the remote Host or Agent is unavailable due to one of these reasons:
- DNS problem, i.e. the IP address of the intermediate server cannot be resolved from its DNS name.
- The intermediate server address or outbound port are blocked by the firewall.
As quoted from Windows Sockets Error Codes:
WSAHOST_NOT_FOUND
11001
Host not found.
No such host is known. The name is not an official host name or alias, or it cannot be found in the database(s) being queried. This error may also be returned for protocol and service queries, and means that the specified name could not be found in the relevant database.
Solution 1: Clear the DNS cache
- Press Win+R to open the Run dialog.
- Type
ipconfig /flushdnsand click OK (or press Enter) to clear the DNS cache:
- Right click on the Host icon in the tray area and select Restart Host. Wait 10-20 seconds until the Host restarts and connects back to the intermediate server.
Solution 2: Check connectivity with our public server
If you use our public Internet-ID service make sure that the primary server at id.remoteutilities.com can be accessed from the Host PC and the IP address of the server can be resolved successfully.
- Press Win+R to open the Run dialog.
- Type
cmdand click OK (or press Enter). The Command Prompt will open. - Type
ping id.remoteutilities.comand press Enter. - If the ping command and DNS resolution are successful, the result will be shown in the CMD window:
- If you receive «Request timed out» as a response, the ID server cannot be reached from the Host location. Please, contact your system administrator.
Solution 3: Make sure outbound connection is allowed
The Internet-ID connection requires some outbound ports to be open. When used with our public service the ports used are TCP 5655 and 443. Make sure that the Host can establish outbound connections on these ports or allow the ports in the local and perimeter firewall if necessary.
Even if outbound connections on TCP ports 5655 and 443 are allowed on the Host machine and in the perimeter firewall, such connections may still be blocked on the ISP level. In this case you should contact your ISP representative.
libhttp
I use getaddrinfo it refer to this link.below ,diff you is hints.ai_family = af;
int XX_httplib_inet_pton(int af, const char *src, void *dst, size_t dstlen)
{
struct addrinfo hints;
struct addrinfo *res;
struct addrinfo *ressave;
int func_ret;
int gai_ret;
func_ret = 0;
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = af;
gai_ret = getaddrinfo(src, NULL, &hints, &res);
if (gai_ret != 0) {
/*
* gai_strerror could be used to convert gai_ret to a string
* POSIX return values: see
* http://pubs.opengroup.org/onlinepubs/9699919799/functions/freeaddrinfo.html
*
* Windows return values: see
* https://msdn.microsoft.com/en-us/library/windows/desktop/ms738520%28v=vs.85%29.aspx
*/
odprintf("af[%d] getaddrinfo ret[%d] [%d]n",af,gai_ret,WSAGetLastError());
return 0;
}
ressave = res;
while (res) {
if (dstlen >= res->ai_addrlen) {
memcpy(dst, res->ai_addr, res->ai_addrlen);
func_ret = 1;
}
res = res->ai_next;
}
freeaddrinfo(ressave);
return func_rett;
} /* XX_httplib_inet_pton */
in my project ,program use success in this way,you could learn more from libhttp.in my program call ,use it ok except proxy or not suppot ipv6 .example call func such as :
XX_httplib_inet_pton(AF_INET, «127.0.0.1», &sa->sin, sizeof(sa->sin))
XX_httplib_inet_pton(AF_INET, host, &sa->sin, sizeof(sa->sin))
XX_httplib_inet_pton(AF_INET6, «fe80::f816:3eff:fe49:50c6%6», &sa->sin6, sizeof(sa->sin6))
XX_httplib_inet_pton(AF_INET, host, &sa->sin, sizeof(sa->sin))
XX_httplib_inet_pton(AF_INET6, «::1», &sa->sin6, sizeof(sa->sin6))
XX_httplib_inet_pton(AF_INET, host, &sa->sin, sizeof(sa->sin))
when sock err happend i use
int eno= WSAGetLastError();
char erbuf[40];
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_ARGUMENT_ARRAY,
NULL,eno,0,erbuf,sizeof(erbuf),NULL);OutputDebugStringA(erbuf);
i use it ok in linux and win10
+7
При подключении к базе, расположенной на сервере 1С:Предприятия, возникает ошибка «…Windows Sockets — 11001 (0x00002AF9). Этот хост неизвестен…». Как вылечить?
Виды ошибок:
или
Ошибка подключения к базе, расположенной на сервере 1С:Предприятия, возникает не всегда!
Подключение из Windows XP обычно проходит без особых проблем, при этом аналогичное подключение из Windows 7 может завершаться аварийно:
Ошибка 11001 — Windows Sockets
Лечится эта ошибка довольно просто! Достаточно внести изменения в файл hosts
Файл hosts представляет собой
Обычный текстовый файл (не имеющий расширения). В hosts-файле по умолчанию прописан всего один IP-адрес (127.0.0.1), зарезервированный для localhost, то есть для локального ПК. Файл hosts представляет собой обычный текстовый файл (не имеющий расширения).
Где находится файл hosts
• Windows 95/98/ME – WINDOWS;
• Windows NT/2000/XP/Vista/7 – Windows/System32/drivers/etc.
И так у нас Win7 открываем C:WINDOWSsystem32driversetchosts, и добавляем в него ip-адрес вашего сервера.
Например так:
192.168.1.100 sermac
Сохраните, и попробуйте через пару минут запустить программу.








