tachyon has asked for the wisdom of the Perl Monks concerning the following question:
Literally all of a sudden LWP has stopped working on my Win32 box. Everything networky except Perl is *still working* so I can browse, email, telnet, ssh etc. The error is:
500 Can't connect to api.google.com:80 (Bad protocol 'tcp') at google +line 5
There was a node Problem using Perl to access a webpage with the same error but there are no really useful answers (iburrel is the only one who almost fingers the problem). Why? If you read the IO::Socket::INET source you will see that this error actually means that the getprotobyname('tcp') call fails. You can test it directly like this:
# Linux $ perl -le '$,=" "; print getprotobyname("tcp")' tcp TCP 6 # Working Win32 system C:\>perl -le "$,=' '; print getprotobyname('tcp')" tcp TCP 6 C:\> # Broken Win32 system C:\>perl -le "$,=' '; print getprotobyname('tcp')" C:\> # Broken Win32 system Cygwin Administrator@JAMES ~ $ perl -le '$,=" "; print getprotobyname("tcp")' Administrator@JAMES ~ $
Now on Unix systems getprotobyname() is normally a lookup in the file /etc/protocols, where you find a entry for 'tcp'. I have no idea how this database is mantained under NT but mine has become corrupt.
Does anyone know where this info is maintined in Win32? As you can see it is related to the OS rather than Perl as even Cygwin is trying to get its data from here (and failing).
And no reinstalling Perl and Re-service packing the machine did not fix the issue. What changed between working and not working? Dunno - not much in the way of software that I can recall (a few hotfixes for last years bugs of course). Adaware is one new widget that does delete from the registry. It is a W2K box so there is no rollback. I will reinstall the OS if it comes to that but would prefer not to. I have googled and Super Searched, scanned the registry to no avail. Anyone got the juice on this?
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: bad protocol 'tcp' win32 error because getprotobyname is failing
by Mr. Muskrat (Canon) on Jul 15, 2004 at 05:10 UTC | |
by tachyon (Chancellor) on Jul 15, 2004 at 06:44 UTC | |
by Gerard (Pilgrim) on Jul 15, 2004 at 22:53 UTC | |
|
Re: bad protocol 'tcp' win32 error because getprotobyname is failing
by BrowserUk (Patriarch) on Jul 15, 2004 at 05:25 UTC | |
by tachyon (Chancellor) on Jul 15, 2004 at 05:44 UTC | |
|
Re: bad protocol 'tcp' win32 error because getprotobyname is failing
by Anonymous Monk on Jul 15, 2004 at 16:27 UTC |