Pages: [1]
  Print  
Author Topic: "No address associated with hostname" does not make sense  (Read 35162 times)
dash9
Member


Cakes 6
Posts: 189


« on: July 29, 2009, 05:37:41 PM »

I was trying to connect to an IP:PORT address, and I got this error message:
Code:
Resolving
Sys_StringToSockaddr: Error resolving : No address associated with hostname
Couldn't resolve address
131.155.141.68:27960 resolved to 131.155.141.68:27960
Resolving
Sys_StringToSockaddr: Error resolving : No address associated with hostname
Couldn't resolve address
Resolving
Sys_StringToSockaddr: Error resolving : No address associated with hostname
Couldn't resolve address
Resolving
What exactly is it trying to say?
Logged

I found a great camping place: the enemy base!
Falkland
Member


Cakes 6
Posts: 590


« Reply #1 on: July 29, 2009, 07:03:51 PM »

Maybe it deals with static assigned hostnames

In /etc/hosts u can associate an address to a name and skips the call to the DNS server :

Code:
...
127.0.0.1 localhost
76.74.252.88 openarena.ws
...

I've heavily used this trick for putting all ads-pr0n sites pointing to 127.0.0.1 ( local interface )

Code:
127.0.0.1 www.badsite.com
127.0.0.1 www.badsite2.com
...

Every program accessing the net will not try to resolv a name if the association NAME-ADDRESS is stored in /etc/hosts ( this deal with the beginning of the internet , when hosts were too few to have a DNS and every hosts knew addresses of all the other relatively few hosts. DNS has been introduced many years later , but /etc/hosts was mantained in all systems for compatibility reasons )

Or maybe the engine interprets the server's address as a hostname instead of an address and tries first to find it on /etc/hosts and then to resolv it through one or more DNS query/queries . Of course the queries fail and that produces the mex "No address associated with hostname"
Logged
dash9
Member


Cakes 6
Posts: 189


« Reply #2 on: July 30, 2009, 04:56:11 AM »

Maybe it deals with static assigned hostnames
No.

Or maybe the engine interprets the server's address as a hostname instead of an address and tries first to find it on /etc/hosts and then to resolv it through one or more DNS query/queries . Of course the queries fail and that produces the mex "No address associated with hostname"
It's a bug, then?
Logged

I found a great camping place: the enemy base!
davidd
Half-Nub


Cakes 6
Posts: 99


[Z] server maintainer


« Reply #3 on: July 30, 2009, 05:56:12 AM »

I see you are trying to connect to my server.
I have had some similar problems. The hostname dragon.zvdk.nl or dragon.stack.nl have an ipv6 address assigned to them as well as an ipv4
so when i type /connect dragon.stack.nl:27690 it tries ipv6, and i dont always have my ipv6 configured failing the connect.
If i have ipv6 enabled i can play on it via ip6.


Logged

Openarena, the freedom to contribute and extend.
Falkland
Member


Cakes 6
Posts: 590


« Reply #4 on: July 30, 2009, 09:14:19 AM »

It's a bug, then?

why do u ask it if u seem to know the answer  ? Cheesy
Logged
dash9
Member


Cakes 6
Posts: 189


« Reply #5 on: July 31, 2009, 01:22:05 PM »

It's a bug, then?

why do u ask it if u seem to know the answer  ? Cheesy
I take that as a yes. Cheesy

I was actually asking for details. I want to know exactly what the problem is. Maybe the text of the error is wrong, or maybe the text is correct, but OA displays it for the wrong error..
Logged

I found a great camping place: the enemy base!
Falkland
Member


Cakes 6
Posts: 590


« Reply #6 on: July 31, 2009, 04:07:14 PM »

I was actually asking for details.

And I was taking time for lurking the code Cheesy

The file where getting a look at is code/qcommon/net_ip.c ... and the error is generated because it tries to resolv an IPv4 address as a FQN but I'm surprising of how the client is able to exit from the loop generated by the resolv fault ( in the log u've posted : 131.155.141.68:27960 resolved to 131.155.141.68:27960 ) and successfully connects to the server Huh
« Last Edit: July 31, 2009, 07:52:40 PM by Falkland » Logged
davidd
Half-Nub


Cakes 6
Posts: 99


[Z] server maintainer


« Reply #7 on: July 31, 2009, 05:58:50 PM »

Ow is that the question?
I think it is a problem reaching your dns server.
ioquake apperently does not check itself if something is an ip, but most dns servers will just return the ip if you send it a xxx.xxx.xxx.xxx like string like it is a hostname, so as long as your dns server works you can connect that way. If you add them in your hosts file ( /etc/hosts  on linux) you will not have this problem.

Logged

Openarena, the freedom to contribute and extend.
dash9
Member


Cakes 6
Posts: 189


« Reply #8 on: July 31, 2009, 06:21:20 PM »

Ow is that the question?
I think it is a problem reaching your dns server.
ioquake apperently does not check itself if something is an ip, but most dns servers will just return the ip if you send it a xxx.xxx.xxx.xxx like string like it is a hostname, so as long as your dns server works you can connect that way. If you add them in your hosts file ( /etc/hosts  on linux) you will not have this problem.


That explains it. That's dumb. :/
Logged

I found a great camping place: the enemy base!
Falkland
Member


Cakes 6
Posts: 590


« Reply #9 on: July 31, 2009, 08:07:32 PM »

I think it is a problem reaching your dns server.
ioquake apperently does not check itself if something is an ip, but most dns servers will just return the ip if you send it a xxx.xxx.xxx.xxx like string like it is a hostname, so as long as your dns server works you can connect that way. If you add them in your hosts file ( /etc/hosts  on linux) you will not have this problem.

Uhm ... I think u are right : I've made a few of euristic tests ( half while using routers DNS which queries my ISP DNS , half while putting the ISP DNS IP in the /etc/resolv.conf ) ... If the DNS is specified in the /etc/resolv.conf of the actual machine , it spams less mex errors ( 2 mexs instead of 3 or 4 ) ... so it's a DNS query latency problem. And yes , ioquake3 doesn't check if it's an IP or a FQN.
Logged
Pages: [1]
  Print  
 
Jump to: