Einzelnen Beitrag anzeigen

Benutzerbild von Harry M.
Harry M.

Registriert seit: 29. Okt 2004
Ort: Halle
462 Beiträge
 
#2

Re: IdHTTP Fehler 10061 - Verbindung abgelehnt

  Alt 19. Feb 2005, 12:20
habe zwar die socket fehler nicht im kopf, aber ich glaube 10061 heiß das der server / client mit dem du dich verbinden willst nicht erreichbar ist. kuck mal hier in der praxis oder im forum da findest du nen link (ich habe es lokal) wo alle socketfehler aufgelist sind.

jedenfalls steht das drin:

WSAECONNREFUSED (10061) Connection refused.

Berkeley description: 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.

WinSock description: Same as Berkeley

TCP/IP scenario: In TCP terms (datastream sockets), it means an attempt to connect (by sending a TCP SYN packet) caused the destination host to respond to the host by returning a reset (a TCP RST packet). If an application sends a UDP packet to a host/port that does not have a datagram socket "listening," the network system may respond by sending back an ICMP Port Unreachable packet

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).

You can verify that the remote system is rejecting your connection attempt by checking the network statistics locally. Check that your network system (WinSock implementation) has a utility that shows network statistics. You could use this to verify that you're receiving TCP resets or ICMP Port Unreachable packets each time you attempt to connect.

Developer suggestions: If you have a network analyzer available, you can quickly check if the destination port number and host address are what you expect. On the server end, you could use a network system utility similar to BSD's "netstat -a" command to check that your server is running, and listening on the right port number.

This is one of the most frequent errors and one of the best to encounter, since it's one of the least ambiguous. There are only a few possible causes for this error:

you tried to connect to the wrong port. This is a common problem. You need to call htons() to translate a constant value to network byte order before assigning it to the sin_port field in the sockaddr structure.
you tried to connect to the wrong destination host address
the server application isn't running on the destination host
the server application isn't listening on the right port. The server application might need to call htons() to translate the port to network byte order in the sockaddr structure.
WinSock functions: With a datastream socket: connect() and FD_CONNECT WSAAsyncelect() notification message.

Additional functions: With a datagram socket: send() or sendto(), or FD_READ.


--------------------------------------------------------------------------------
Harry
Gruß Harry
www.H-Soft.info
  Mit Zitat antworten Zitat