No Network Connection Detected in site SSH

Just updated to 2.4.1. (on Mac High Sierra) Then ran environment update. Now when I SSH into the site and try to run a bash script I’m getting “Could not install packages No network connection detected” Any ideas what’s up with that? (Same script runs perfectly from SSH on another site where I haven’t run the environment update.)
Please and thank you!

For what it’s worth, here’s the output of ss in the modified env:
root@786cd56d4760:/app# ss
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
u_str ESTAB 0 0 * 27913 * 27914
u_str ESTAB 0 0 * 21878 * 21879
u_str ESTAB 0 0 * 27914 * 27913
u_str ESTAB 0 0 * 21879 * 21878
root@786cd56d4760:/app#

And here it is in an unmodified environment:
root@ae9991f2559a:/# ss
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
u_str ESTAB 0 0 * 30846 * 30845
u_str ESTAB 0 0 * 30845 * 30846
u_str ESTAB 0 0 /var/run/mysqld/mysqld.sock 32990 * 32989
u_str ESTAB 8 0 /var/run/php-fpm.sock 31949 * 0
u_str ESTAB 0 0 * 32989 * 32990
u_str ESTAB 0 0 * 31935 * 31936
u_str ESTAB 0 0 * 31936 * 31935
tcp ESTAB 0 0 172.17.0.4:38844 198.143.164.252:https

So, apparently, there’s just no tcp joy in the new? Also, the missing mysql and php-fpm connections seem suspicious.

@icaspar,

Thanks for the details. I haven’t seen this issue before.

Is this with the Preferred environment or Custom environment?

Also, have you tried updating VirtualBox? There may be an issue with the network stack. See How can I manually update VirtualBox?

Hi Clay,
I did update Virtualbox (so, now running VB 5.2.18 r124319) and rebooted all the things. I also tried to cloning the updated environment site, but the clone had the same issue.
It’s a custom (1.3.1) environment: nginx PHP 7.1.4 MySQL 5.6 (Also tried with php 7.2, but same result. Have not tried backing down to php 5.x.)

Thanks for updating and providing the details!

What happens if you run apt-get update? If that succeeds, does apt-get install -y iputils-ping && ping google.com work?

Hi again Clay,

Thanks for taking the time to troubleshoot this.
I restarted Local and it’s now updated to 2.4.2.
apt-get update ran as did apt-get install -y iputils-ping && ping google.com
But when I tried to run the script again, i still get No network detected. Here’s the terminal output:

root@786cd56d4760:/# apt-get update
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease                                     
Get:2 http://deb.debian.org jessie-updates InRelease [145 kB]                  
Get:3 http://deb.debian.org jessie Release.gpg [2420 B]                        
Get:4 http://deb.debian.org jessie Release [148 kB]                            
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [669 kB]   
Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [23.0 kB]       
Get:7 http://deb.debian.org jessie/main amd64 Packages [9098 kB]               
Fetched 10.1 MB in 25s (401 kB/s)                                              
Reading package lists... Done
root@786cd56d4760:/# apt-get install -y iputils-ping && ping google.com
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdbd-mysql-perl libdbi-perl libhtml-template-perl libterm-readkey-perl
  libwrap0 mysql-client-5.5 tcpd
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libgnutls-openssl27
The following NEW packages will be installed:
  iputils-ping libgnutls-openssl27
0 upgraded, 2 newly installed, 0 to remove and 41 not upgraded.
Need to get 200 kB of archives.
After this operation, 298 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian/ jessie/main libgnutls-openssl27 amd64 3.3.8-6+deb8u7 [143 kB]
Get:2 http://deb.debian.org/debian/ jessie/main iputils-ping amd64 3:20121221-5+b2 [56.5 kB]
Fetched 200 kB in 3s (61.6 kB/s)   
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libgnutls-openssl27:amd64.
(Reading database ... 20158 files and directories currently installed.)
Preparing to unpack .../libgnutls-openssl27_3.3.8-6+deb8u7_amd64.deb ...
Unpacking libgnutls-openssl27:amd64 (3.3.8-6+deb8u7) ...
Selecting previously unselected package iputils-ping.
Preparing to unpack .../iputils-ping_3%3a20121221-5+b2_amd64.deb ...
Unpacking iputils-ping (3:20121221-5+b2) ...
Setting up libgnutls-openssl27:amd64 (3.3.8-6+deb8u7) ...
Setting up iputils-ping (3:20121221-5+b2) ...
Setcap worked! Ping(6) is not suid!
Processing triggers for libc-bin (2.19-18+deb8u10) ...
PING google.com (172.217.9.78) 56(84) bytes of data.
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=1 ttl=61 time=47.2 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=2 ttl=61 time=96.7 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=3 ttl=61 time=45.0 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=4 ttl=61 time=53.1 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=5 ttl=61 time=52.7 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=6 ttl=61 time=47.9 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=7 ttl=61 time=45.6 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=8 ttl=61 time=42.7 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=9 ttl=61 time=47.1 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=10 ttl=61 time=45.0 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=11 ttl=61 time=54.0 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=12 ttl=61 time=47.1 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=13 ttl=61 time=42.8 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=14 ttl=61 time=43.7 ms
64 bytes from ord38s09-in-f14.1e100.net (172.217.9.78): icmp_seq=15 ttl=61 time=41.2 ms
^C
--- google.com ping statistics ---
15 packets transmitted, 15 received, 0% packet loss, time 14020ms
rtt min/avg/max/mdev = 41.285/50.166/96.735/12.996 ms
root@786cd56d4760:/# cd app
root@786cd56d4760:/app# bash setup-phpunit.sh
Could not install packages
No network connection detected

root@786cd56d4760:/app# ss
Netid  State      Recv-Q Send-Q   Local Address:Port       Peer Address:Port   
u_str  ESTAB      0      0                    * 23219                 * 23218  
u_str  ESTAB      0      0                    * 22163                 * 22164  
u_str  ESTAB      0      0                    * 23218                 * 23219  
u_str  ESTAB      0      0                    * 22164                 * 22163  
root@786cd56d4760:/app# 

Ok… I found the issue. It was the script trying to ping -c 3 --linger=5 8.8.8.8 that was failing. Having fixed that in the script the rest seems to work now.

Thanks again for your help!