These are all status code -1004 with a PHP message php_network_getaddresses: getaddrinfo failed: Unkown host (translated):

http://www.sfcag.com
http://www.esrc.bris.ac.uk
http://www.klug-suchen.de

The PHP error message indicate this should be 11001 Host not found. I have ~40 of these wrong status codes.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass’s picture

After more thinking this was on my dev box before we ignored -1004, but we need to handle this. Otherwise last_checked is never set and we are checking this links with every cron run again and again. I missed this. It's like end endless loop, but endless check. Is -1004 a malfunction?

If this "host does not exists" situation cannot catched inside httprl - I may need to create a new linkchecker release. :-(

mikeytown2’s picture

Status: Active » Fixed
FileSize
1.72 KB

http://www.klug-suchen.de gives me a -2 (max redirects exhausted)

With D6 & D7 drupal_http_request() I get:

    [http://www.sfcag.com/] => stdClass Object (
            [code] => 0
            [error] => php_network_getaddresses: getaddrinfo failed: Name or service not known
        )
    [http://www.esrc.bris.ac.uk/] => stdClass Object (
            [code] => 0
            [error] => php_network_getaddresses: getaddrinfo failed: Name or service not known
        )

So when you're using Drupal core you will still need to parse the error text.

The attached patch has been committed to 6.x & 7.x. Thanks for the bug report. Keep them coming :)

Note: Where -1004 came from #193073-11: drupal_http_request - socket not initialized

hass’s picture

Status: Fixed » Needs work

Bad news... The text is german on my system. :-(

Only network_getaddresses: getaddrinfo failed: is the same.

hass’s picture

mikeytown2’s picture

Status: Needs work » Fixed
FileSize
692 bytes

Thanks :)
This patch has been committed.

hass’s picture

Status: Fixed » Needs work

http://php.net/manual/en/function.fsockopen.php

Report a bug
Errors/Exceptions

Throws E_WARNING if hostname is not a valid domain.

hass’s picture

Cross post...

mikeytown2’s picture

stream_socket_client is the function that is throwing the error. It's used in D7 as well. D6 does use fsockopen though.

mikeytown2’s picture

Status: Needs work » Fixed

Moving this back to fixed.

hass’s picture

Well, but it may return the same warning, maybe just not documented? not tested... I'm not sure how reliable the new logic works...

How about calling dns_get_record() just to make it more reliable?

mikeytown2’s picture

That function is only available on windows if PHP >= 5.3
Also noted is this issue #1325662: Usage and/or caching of gethostbyname
I'm not about to get into the business of implementing my own DNS client, even though that would give HTTPRL some big speed improvements when it comes to checking a lot of URLs.

I will be using "php_network_getaddresses: getaddrinfo failed:" for now. Like usual, I'm open to other patches, just not going to implement this my self.

hass’s picture

Ok, should be fine for now.

hass’s picture

Patch works well for me.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

g