Roots Discourse

Can ping local site but not connect

I have tried to setup the roots project example using instructions at https://github.com/roots/roots-example-project.com

All seems to install fine up to and including vagrant up in local development server.

I can ping http://roots-example-project.dev/ but cannot connect using browser or curl.

I can vagrant ssh into the vm, but seem like nginx is not runing there (I used service nginx status)

Any suggestions on where I have gone wrong?

There were no errors when running vagrant up? You can always just try to run sudo service nginx start and see if it runs or there’s a problem.

thank you for such a quick response.

vagrant up messages include

  1. in yellow a suggestion to update bento/ubuntu-16.04 from 2.2.9 to to 2.3.0
  2. the guest additions on this VM do not match installed version on VirtualBox. In most cases this is fine
  3. after Started NFS server and services… "

exportfs: Failed to stat /home/giles/sites/xyz/site: no such file or directory

(this “xyz” site is probably something left over when I previously tried installing bedrock)

Are any of these significant?

service nginx start gives:

Failed to start nginx.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status nginx.service' for details.

systemctl status nginx.service gives:

*nginx.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

Did you run service nginx start with sudo? sudo service nginx start

First google results points to that error popping up without using sudo

note: that nfs could error be a problem. If you run into more problems I’d suggest starting from fresh Bedrock + Trellis again if it’s possible (ie: you haven’t really customized anything much).

Thank you Scott

Starting nginx with sudo gives error

Failed to start nginx.service: Unit nginx.service not found.

I removed the old nfs entry in /etc/exports, used vagrant destroy and tried vagrant up, it ran for hours then completly froze system.

So I started over.

  • ansible gives a deprecation warning for mailhog
  • npm gives deprecation warnings for minimatch, graceful-fs, and tough-cookie
  • bower suggested updating 1.7.9 --> 1.80 which I did
  • gulp gives error below (maybe it was there before and I did not notice)
fs.js:808
  return binding.readdir(pathModule._makeLong(path));
                 ^
Error: ENOENT: no such file or directory, scandir '/home/giles/sites/roots-example-project.com/site/web/app/themes/sage/node_modules/gulp-sass/node_modules/node-sass/vendor'
    at Error (native)
    at Object.fs.readdirSync (fs.js:808:18)
    at Object.getInstalledBinaries (/home/giles/sites/roots-example-project.com/site/web/app/themes/sage/node_modules/gulp-sass/node_modules/node-sass/lib/extensions.js:120:13)
    at foundBinariesList (/home/giles/sites/roots-example-project.com/site/web/app/themes/sage/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/home/giles/sites/roots-example-project.com/site/web/app/themes/sage/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/home/giles/sites/roots-example-project.com/site/web/app/themes/sage/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:45:5)
    at Object.<anonymous> (/home/giles/sites/roots-example-project.com/site/web/app/themes/sage/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:15:28)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)

This folder does not exist
> /home/giles/sites/roots-example-project.com/site/web/app/themes/sage/node_modules/gulp-sass/node_modules/node-sass/vendor

Thanks again for your help with this. Any suggestion for what I should try?

I have not been able to figure out how to resolve this gulp error message “Error: ENOENT: no such file or directory, scandir ‘/home/giles/sites/roots-example-project.com/site/web/app/themes/sage/node_modules/gulp-sass/node_modules/node-sass/vendor’”

Is this error important?

I have since tried vagrant destroy then vagrant up three times, each time it runs for a few hours and fails with different errors each time

TASK [common : Update Apt] *****************************************************
System info:
  Ansible 2.1.2.0; Vagrant 1.8.6; Linux
  Trellis at "WP 4.6 Compat: set WP_HOME/SITEURL directly"
---------------------------------------------------
Failed to connect to the host via ssh.
fatal: [default]: UNREACHABLE! => {"changed": false, "unreachable": true}
        to retry, use: --limit @/home/giles/sites/roots-example-project.com/trellis/dev.retry
PLAY RECAP *********************************************************************
default                    : ok=1    changed=0    unreachable=1    failed=0
==> default: Pruning invalid NFS exports. Administrator privileges will be required...
/opt/vagrant/embedded/gems/gems/net-ssh-3.0.2/lib/net/ssh/transport/packet_stream.rb:226:in `poll_next_packet': corrupted mac detected (Net::SSH::Exception)
        from /opt/vagrant/embedded/gems/gems/net-ssh-3.0.2/lib/net/ssh/transport/packet_stream.rb:92:in `next_packet'
==> default: Mounting shared folders...
    default: /vagrant => /home/giles/sites/roots-example-project.com/trellis
==> default: Bindfs seems to not be installed on the virtual machine, installing now
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

At this point with each attempt taking hours and producing different errors, I am wondering if the pc is below minimum requirements.

It is an old dell laptop that used to have vista

  • running xubuntu 16:04
  • AMD Turion 64 X2 800MHz
  • 1GB RAM (less RAM for integrated video leaves 885MB RAM.

I guess that leaves ~ 440MB for host O/S and 440MB guest O/S. Is that too low?

By the way I also tried on another old pc with 4GB RAM but the cpu/motherboard does not support hardware virtualization so cannot run a 64-bit VM

Do you know what the minimum spec would be?
Do you think replacing xubuntu with ubuntu server would make much difference

I doubt having an older PC with low specs would cause issues like that.

Can always try re-installing Vagrant and Virtualbox itself. Vagrant can be frustrating at times :frowning:

Thank you for the suggestion. I have re-installed Vagrant and Virtualbox and that seems to help

By the way https://github.com/roots/roots-example-project.com/blob/master/README.md says Vagrant == 1.8.1 but Vagrantfile says Vagrant >= 1.8.5, I used 1.8.6

Vagrant up ends with a red timeout message suggesting “you may want to increase the timeout (“config.vm.boot_timeout”) value.”

Vagrant status shows it is running. Doubling time to 600s makes no difference.

Vagrant ssh does not work, gives error

ssh_exchange_identification: read: Connection reset by peer

Googling this message shows loads of causes.

VAGRANT_LOG=info vagrant up, produces loads of messages, these seem most relevant

 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "27797871-6f00-4d3a-91d2-621beb14cf60", "--machinereadable"]
 INFO subprocess: Command not in installer, restoring original environment...
 
 INFO ssh: SSH not ready: #<Vagrant::Errors::NetSSHException: An error occurred in the underlying SSH library that Vagrant uses. The error message is shown below. In many cases, errors from this library are caused by ssh-agent issues. Try disabling your SSH agent or removing some keys and try again. If the problem persists, please report a bug to the net-ssh project.
timeout during server version negotiating>
ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/action/builtin/wait_for_communicator.rb:62:in `call' /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/action/warden.rb:34:in `call'

and VAGRANT_LOG=info vagrant ssh output includes

 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "--version"]
 INFO subprocess: Command not in installer, restoring original environment...
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "27797871-6f00-4d3a-91d2-621beb14cf60"]
 INFO subprocess: Command not in installer, restoring original environment...
 
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "list", "hostonlyifs"]
 INFO subprocess: Command not in installer, restoring original environment...
 
 INFO ssh: Invoking SSH: ssh ["vagrant@127.0.0.1", "-p", "2222", "-o", "Compression=yes", "-o", "DSAAuthentication=yes", "-o", "LogLevel=FATAL", "-o", "IdentitiesOnly=yes", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-i", "/home/giles/.vagrant.d/insecure_private_key", "-o", "ForwardAgent=yes"]
ssh_exchange_identification: read: Connection reset by peer

Do you have any more suggestions I can try?

I used the VirtualBox GUI to restart this VM and it shows a bit more information.

It gets stuck at this point, where the timer gets to 5mins 14 then times out
> A start job is running for Raise network interfaces (2min / 5min 14s)

Then this error message flashes up (I only caught it with a screenshot)

failed to start Raise network interfaces
See 'systemctl status networking.service' for details

Signing into the VM as vagrant I ran systemctl status networking.service and it shows

vagrant ifup[930]: /sbin/ifup: waiting for lock on /run/network/ifstate.enp0s3
vagrant systemd[1]: networking.service: Start operation timed out. terminating.

It all seems to point to a networking issue but I don’t know how to proceed. Has anyone come across this before?

Seems like you’re really unlucky :frowning: Personally never seen issues like this on the forums before. Beyond Googling for those errors in the context of Vagrant/VirtualBox, I’m not sure what else to do.

If you’re using latest VB it might be worth a shot to try downgrading to a slightly older version?

1 Like

Thank you for suggestions Scott

Maybe I am unlucky, but more likely it’s me not knowing linux or virtualbox or the rest of the stack.

I have tried VirtualBox 5.0.24 5.1.0 5.1.2 5.1.4. 5.1.8 and Vagrant 1.8.0 1.8.6 and 1.8.7

Several different error messages along the way, but there is a pattern. Vagrant up almost always creates a VM but fails while booting the VM, sometimes it takes hours. VirtualBox can start the VM but soon after everything slows down until it becomes completely unresponsive.

To see if I could take vagrant and trellis out of the equation, I loaded a prebuilt xubuntu image. It too loaded quickly then soon froze.

So seems to be a problem running VirtualBox on my system, something specfic to my system - old cpu, or related to crash during upgrade to ubuntu 16.04.

I think next step will be to re-install ubuntu 16.04 from scratch and only install requirements for root-example-project.

I will try that in a week or so - as I really want to learn all the great stuff here.

3 Likes

How did you end up solving this? I am running into a similar problem with my VirtualBox setup, totally unresponsive after booting up… I just updated to the latest version of VirtualBox but to no avail.

This is what I am getting in the logs:

00:01:55.335620 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago 00:01:55.856042 VMMDev: GuestHeartBeat: Guest is alive (gone 4 520 726 373 ns) 00:01:59.859820 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago 00:01:59.911584 VMMDev: GuestHeartBeat: Guest is alive (gone 4 055 541 059 ns) 00:02:03.912379 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago 00:02:04.897919 VMMDev: GuestHeartBeat: Guest is alive (gone 4 986 335 919 ns) 00:02:08.899651 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago 00:02:09.235022 VMMDev: GuestHeartBeat: Guest is alive (gone 4 337 105 720 ns) 00:02:24.089248 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago 00:02:24.687380 VMMDev: GuestHeartBeat: Guest is alive (gone 4 600 485 116 ns) 00:02:28.689159 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago 00:02:28.773842 VMMDev: GuestHeartBeat: Guest is alive (gone 4 086 473 566 ns) 00:02:32.774817 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago 00:02:32.869409 VMMDev: GuestHeartBeat: Guest is alive (gone 4 095 573 312 ns) 00:02:36.870066 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago 00:02:37.878172 VMMDev: GuestHeartBeat: Guest is alive (gone 5 008 758 896 ns) 00:02:49.240381 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago 00:02:49.560127 VMMDev: GuestHeartBeat: Guest is alive (gone 4 320 210 406 ns)

And so on and so forth…

Would appreciate any insights!

In my case the problem was hardware, probably motherboard. I wiped system and re-installed ubuntu from scratch and kept getting intermittent crashes.

Bought a new but low-spec system and everything installed fine.

With VirtualBox, I found the GUI was useful when I was trying to identify where the problem was.

I don’t know what to suggest, maybe re-installing VirtualBox?

Good luck