This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

socket: Invalid argument


I have just set up Cygwin on my Windows 7 account at work, where I do
not have administrator rights. My internet connection is via an HTTP
proxy, so I would like to use Corkscrew to set up an SSH tunnel to the
outside world. However, so far I've had difficulty making any network
connections from Cygwin, even inside the local domain. Most of my
attempts give an error such as "socket: Invalid argument". Windows
Firewall is running, and I cannot turn it off, but I've tried
authorising programs such as telnet.exe, which makes no difference to
the output below. Is there some particular Cygwin executable that
needs to be authorised by the firewall for all network access? My only
successful communication with the outside world was a DNS lookup (see
below). Internet Explorer works fine on the same PC.

Here are some sample commands and output. 172.16.X.Y is the HTTP proxy
(anonymised consistently below), and 8080 is the real port. Any ideas
appreciated!

# Check IP configuration: looks ok.
$ ipconfig.exe

Windows IP Configuration


Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . : mycompany.local
   Link-local IPv6 Address . . . . . :<removed for anonymity>
   IPv4 Address. . . . . . . . . . . : 172.16.X.217
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 172.16.X.1

Tunnel adapter isatap.mycompany.local:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : mycompany.local

# Try DNS lookup: works fine
$ nslookup.exe cygwin.com
Non-authoritative answer:
Server:  mycompany-dc-01.mycompany.local
Address:  172.16.X.16

Name:    cygwin.com
Address:  209.132.180.131

# Try grabbing webpage through proxy:
export http_proxy=http://myuser:mypass@172.16.X.Y:8080/
$ wget http://www.cygwin.com
--2012-09-26 18:40:57--  http://www.cygwin.com/
Connecting to 172.16.X.Y:8080... failed: Invalid argument.

# Maybe we don't need a password? Same error as before.
export http_proxy=http://172.16.X.Y:8080/
$ wget http://www.cygwin.com
--2012-09-26 18:42:15--  http://www.cygwin.com/
Connecting to 172.16.X.Y:8080... failed: Invalid argument.

# Try without proxy. Now things are worse (why. if we can't contact
the proxy anyway??):
$ unset http_proxy
$ wget http://www.cygwin.com
--2012-09-26 18:45:29--  http://www.cygwin.com/
Resolving www.cygwin.com (www.cygwin.com)... failed: Non-recoverable
failure in name resolution.
wget: unable to resolve host address `www.cygwin.com'

# Try telnet to the HTTP proxy:
$ telnet.exe 172.16.X.Y 8080
Trying 172.16.X.Y...
telnet: socket: Invalid argument

# Try telnet to localhost:
$ telnet.exe 127.0.0.1 8080
Trying 127.0.0.1...
telnet: socket: Invalid argument

# Try ping to HTTP proxy:
$ ping.exe 172.16.X.Y
ping: socket: Operation not permitted

# Try ping to localhost:
$ ping.exe 127.0.0.1
ping: socket: Operation not permitted

# Try ssh to HTTP proxy, without anything in .ssh/config (just to see
what error we get).
$ ssh 172.16.X.Y
socket: Invalid argument
ssh: connect to host 172.16.X.Y port 22: Invalid argument

# Anything else I can try??

---
Matthew,

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]