Project

General

Profile

Bug #1417

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

Added by Anonymous about 10 years ago. Updated 9 months ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
documentation
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
No

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

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

History

#1

Updated by admin almost 10 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.

#2

Updated by ahknight almost 9 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..

#3

Updated by schwern over 8 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. :)

#4

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

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

Updated by stbuehler almost 8 years ago

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

Updated by stbuehler over 7 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?
#7

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

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

#8

Updated by stbuehler over 7 years ago

Do it yourself.

#9

Updated by Olaf-van-der-Spek over 7 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.

#10

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

  • Target version changed from 1.4.x to 1.4.27

Docs not fixed yet...

#11

Updated by stbuehler over 7 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.

#12

Updated by gstrauss over 1 year 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.

#13

Updated by gstrauss over 1 year ago

  • Target version set to 1.4.x
#14

Updated by stbuehler over 1 year ago

  • Target version deleted (1.4.x)
#15

Updated by Archy 9 months ago

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

Also available in: Atom