"Cannot Allocate Memory" error when trying to ssh or ping or curl due to unrelated vpn?

7

2

I'm trying to reach my server on campus from home. It is usually very well behaved and these connections are fine. When I attempt to ssh or ping I get the following:

mwoods 13 18:38:12 Trunk$ ssh me@foo.edu
ssh: connect to host foo.edu port 22: Cannot allocate memory
mwoods 14 18:40:44 Trunk$ ping foo.edu
PING foo.edu (169.237.43.27): 56 data bytes
ping: sendto: Cannot allocate memory
ping: sendto: Cannot allocate memory
Request timeout for icmp_seq 0
ping: sendto: Cannot allocate memory
Request timeout for icmp_seq 1
ping: sendto: Cannot allocate memory
Request timeout for icmp_seq 2
^C
--- foo.edu ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss

Similar story with curl. Trying to view the webpage hosted by this server creates a very fast Error 13 (net::ERR_OUT_OF_MEMORY): Unknown error. message in Chrome. It appears any connection reports insufficient memory.

I can successfully ssh to this machine if I ssh into any other machine in the building, or from another computer in my house (no issues once connected). So it is clearly something related to my laptop. I have been VPNing with Juniper "Network Connect" to completely separate network recently and this problem has only appeared since I've begun this.

So my question is, what about the VPN is causing this and how do I fix it (besides a restart of my laptop which solves the problem)?

physicsmichael

Posted 2013-01-22T01:21:23.400

Reputation: 918

(1) Can you check your syslog or vpn log(if any) for error/warning messages and add them to your question? (2) How do you start your vpn(icon/commandline)? – John Siu – 2013-01-22T02:04:12.407

No warnings or errors appear in any log in /var/log, nothing in Console.app, and I don't have access to the vpn log. The vpn is started with Juniper Network Connect. Not much to go on... – physicsmichael – 2013-01-22T05:33:33.783

Answers

8

Quote from this apple forum post

Try following:

Methind 1

  1. ensure you have admin access
  2. go to system preferences
  3. click on network
  4. select Wi-Fi
  5. select advanced button (at the bootom right of the screen, before the "?" sign)
  6. select tcp/ip tab
  7. disable and enable tcp/ip

Method 2

sudo route delete -host 128.0.0.0

John Siu

Posted 2013-01-22T01:21:23.400

Reputation: 4 957

I was experiencing a similar situation; completely disabling unused thunderbolt adapters fixed the issue for me. – Andrew – 2015-06-11T04:22:43.697

Thanks. The evanescent problem has resolved itself for now. I'll make sure to update this answer when it reappears and I apply these techniques. – physicsmichael – 2013-01-23T03:14:55.033

Connect VPN, close the lid and make it go to sleep :p LOL – John Siu – 2013-01-23T03:38:05.610

This worked, but I needed to actually turn off these settings for my ethernet port even though I was trying to connect to these computers with my wireless connection. I found that route get name.of.server.edu showed connecting to those machines was for some reason still bound to my ethernet card (which had been using the vpn). – physicsmichael – 2013-02-01T06:43:24.693

Awesome, but how did it work? I mean what at all does the memory error has to do even if my routing table is have bad entries ?? – Jatin Kumar – 2014-03-14T17:55:52.193

0

I had the same problem on my laptop running Mac OS X 10.5, trying to connect to a VPN server running Mac OS X 10.6, each behind a NAT router on the Internet. The VPN server log showed the client laptop connecting and being issued an IP address, and the laptop showed receipt of the same VPN address (to include a ppp line in the ifconfig table). But then the laptop could not connect to anything, showing the same ping error you described (among other issues). The root cause seemed to be that the IP address of the laptop's local NAT router (192.168.1.1) was the same as the address of the target VPN server (i.e., 192.168.1.1). I simply changed the subnet of the target server network to something different (192.168.10.x), and everything connected just fine.

Dave

Posted 2013-01-22T01:21:23.400

Reputation: 1