Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: LWP::UserAgent always complains about Hostname

by alexm (Chaplain)
on Jul 19, 2008 at 22:00 UTC ( [id://698858]=note: print w/replies, xml ) Need Help??


in reply to Re^2: LWP::UserAgent always complains about Hostname
in thread LWP::UserAgent always complains about Hostname

Okay, then... Can you try this?

$ strace -o 698729.out -econnect,sendto,recvfrom perl 698729.pl

The 698729.out file should start with something similar to this:

connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 + ENOENT (No such file or directory) connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 + ENOENT (No such file or directory) connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr( +"192.168.1.1")}, 28) = 0 sendto(3, "\321\263\1\0\0\1\0\0\0\0\0\0\2my\5yahoo\3com\0\0\1\0\1"..., + 30, MSG_NOSIGNAL, NULL, 0) = 30 recvfrom(3, "\321\263\201\200\0\1\0\2\0\0\0\0\2my\5yahoo\3com\0\0\1".. +., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_add +r("192.168.1.1")}, [16]) = 80 connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr( +"216.252.123.25")}, 16) = -1 EINPROGRESS (Operation now in progress) connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr( +"216.252.123.25")}, 16) = 0 ...

Note that 192.168.1.1 is my DNS nameserver and I don't have nscd running, so the fist ENOENT errors can be ignored. You can see that the DNS query got through since 216.252.123.25 is the IP address for my.yahoo.com and there's a connection to port 80 going on.

Hope that helps.

Update: renamed lwp-useragent.pl to OP's node ID, so it's clear where does the code come from.

Replies are listed 'Best First'.
Re^4: LWP::UserAgent always complains about Hostname
by Herkum (Parson) on Jul 19, 2008 at 23:52 UTC

    Where did the lwp-useragent.pl script come from? I did not see it in the distribution.

      Its probably code from your original question

        It took a night of thinking on it before I realized this! DOH! This is the response from the .OUT file.

        connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 + ENOENT (No such file or directory) connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 + ENOENT (No such file or directory)

        So there is some part that is just straight out missing from the system config, somewhere...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://698858]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2026-01-24 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (126 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.