Project

General

Profile

Actions

Bug #1417

closed

mod_fastcgi doesn't accept hostnames for 'host'. This is not according to Docs:ModFastCGI

Added by Anonymous about 17 years ago. Updated almost 8 years ago.

Status:
Fixed
Priority:
Low
Category:
documentation
Target version:
-
ASK QUESTIONS IN Forums:

Description

Docs:ModFastCGI says you can use a hostname for host. This is not the case when I use a valid hostname in my configuration. In fcgi_establish_connection() you get the message:

"converting IP address failed for", host->host, "\nBe sure to specify an IP address here");

I use version 1.4.18.

Is there a reason why init_aton() is used iso gethostbyname() or getaddrinfo()?

-- ahaikens


Files

getaddrinfo.patch (2.02 KB) getaddrinfo.patch patch to resolve hostname with getaddrinfo(). But there seems to be a bug in getaddrinfo() because strangely on my system it does not work on every hostname. -- ahaikens Anonymous, 2007-10-26 12:02
Actions #1

Updated by admin almost 17 years ago

Is there a reason why init_aton() is used iso gethostbyname() or getaddrinfo()?

Maybe because it is non-blocking while the other two are blocking.

Actions #2

Updated by ahknight almost 16 years ago

We just got bitten by this. The documentation must agree with the implementation.

Please either update the code to work as documented or update the documentation to say that it requires only IPs.

Thanks..

Actions #3

Updated by schwern over 15 years ago

I'd like to add a "me too" here and request this be considered for a 1.4.x patch. Having to use IP addresses has added difficulties to maintaining an application server farm.

lighty + mod_fastcgi made that server farm a lot smaller than it would be with the equivalent Apache setup. :)

Actions #4

Updated by Olaf-van-der-Spek almost 15 years ago

  • Assignee deleted (jan)
  • Target version changed from 1.5.0 to 1.4.26
Actions #5

Updated by stbuehler almost 15 years ago

  • Target version changed from 1.4.26 to 1.4.27
  • Missing in 1.5.x set to No
Actions #6

Updated by stbuehler over 14 years ago

  • Target version changed from 1.4.27 to 1.4.x

I updated the docs so at least they are correct now :)

I think it isn't easy to define a sane behaviour for dns names:
  • resolve ipv4, ipv6?
  • how handle multiple ips?
  • ttl of dns names?
Actions #7

Updated by Olaf-van-der-Spek over 14 years ago

It may not be easy, but is that a reason to not do anything at all?

Actions #8

Updated by stbuehler over 14 years ago

Do it yourself.

Actions #9

Updated by Olaf-van-der-Spek over 14 years ago

stbuehler wrote:

I updated the docs so at least they are correct now :)

Are they?

http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi
host is hostname/ip of the FastCGI process
host is hostname/ip of the SCGI process

How does mod_proxy do this? I'm sure proxies aren't limited to IP addresses.

Actions #10

Updated by Olaf-van-der-Spek over 14 years ago

  • Target version changed from 1.4.x to 1.4.27

Docs not fixed yet...

Actions #11

Updated by stbuehler over 14 years ago

  • Category changed from mod_fastcgi to documentation
  • Target version deleted (1.4.27)

It is a wiki. Thx for helping :)

lighttpd doesn't do any DNS lookups, so you will always have to use ips.

Actions #12

Updated by gstrauss over 8 years ago

  • Subject changed from mod_fastcgi doesn not accept hostnames for 'host'. This is not according to Docs:ModFastCGI to mod_fastcgi doesn't accept hostnames for 'host'. This is not according to Docs:ModFastCGI
  • Status changed from New to Fixed

I verified that the docs state to use IP address string:

https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions
https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI
https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModProxy

Yes, mod_fastcgi, mod_scgi, and mod_proxy all require IP address string for host. None use DNS.

musings on supporting DNS:
DNS is possibly blocking. 'A' records could point to multiple IPs. Lookups might return both 'A' and 'AAAA' records, or 'CNAME' records. DNS record TTLs might need to be handled. The list goes on. Reliance on DNS, even if done only at startup, might result in apparent hangs if DNS is slow or not responding. I could see the possibility of having a configuration switch to enable use of DNS, so that admin could opt-in to this possibly blocking behavior, and I could see doing DNS lookups only at startup, and only taking the first address returned. Such a feature request might be sufficient to add convenience to the configurations of many -- not all -- usage scenarios. Async DNS is also a possibility, but all of the above is definitely a feature request (or multiple feature requests), and the changes required to implement them might not be appropriate for the 1.4.x branch.

Actions #13

Updated by gstrauss over 8 years ago

  • Target version set to 1.4.x
Actions #14

Updated by stbuehler over 8 years ago

  • Target version deleted (1.4.x)
Actions #15

Updated by Archy almost 8 years ago

Dropping support for lighttpd docker for my application, because of this.

Actions

Also available in: Atom