Laravel Zray - Failed to communicate with Zend Server - laravel

I have recently started using Laravel Framework 5.6.7 and have everything running smoothly apart from the Zray toolbar it comes with. The toolbar displays the error: "Failed to communicate with Zend Server. See why..."
the link takes me to the troubleshooting page which is of no help:
http://files.zend.com/help/Z-Ray-Azure/Content/troubleshooting.htm
In my local environment I am using the homestead vagrant box:
Vagrant 2.0.2
I tried following this old post but Zray is already installed so I thought it must be a configuration issue:
https://laravel-news.com/installing-zend-z-ray-on-homestead
any ideas on how I can get this toolbar to work would be much appreciated.

I had this issue too and it took a few days to get it resolved. I have no idea if this will work for you but this is how I did it:
Removed all vagrant boxes in my Homestead folder. vagrant box remove --all https://www.vagrantup.com/docs/cli/box.html
Add vagrant box. vagrant box add/laravel/homestead
perform a git pull in the Homestead folder. git pull origin master
went to composer.json and deleted "laravel/homestead": "^7" (also deleted the trailing comma to ensure the JSON was valid).
ran composer update.
Then after a vagrant up --provision (I wasn't sure if provision was needed but I put it just in case), I went to my site and no more Z-RAY issues!
I hope this helps someone else because this was NO fun to figure out.

You have to add
> zray: "true"
in your Homestead.yaml file

Related

How to destroy and recreate vagrant/homestead machine?

I'm running Laravel on Vagrant Box (homestead)
When I'm doing vagrant up, I'm getting a message:
: A newer version of the box 'laravel/homestead' is available and already
: installed, but your Vagrant machine is running against
: version '6.3.0'. To update to version '7.1.0',
: destroy and recreate your machine.
What commands should I run and what are potential problems I should be prepared for?
You can create a second installation for Homestead before you destroy the working one.
1) follow official documentation on installing Installing The Homestead Vagrant Box, then, when Installing Homestead instead of this command
git clone https://github.com/laravel/homestead.git ~/Homestead
run this one
git clone https://github.com/laravel/homestead.git ~/MyHomestead
then you'll need to cd ~/MyHomestead and git checkout v8.4.0
now you need to go to ~\MyHomestead\scripts\homestead.rb file and replace homestead-7 to homestead-7-my it will give you a different name for virtual machine in your virtualbox.
Now you can follow the official documentation
1.1) and you can always destroy your old vagrant box from your vagrant folder usually ~/homestead by running
vagrant destroy
2) create a new vagrant box by running
vagrant up --provision
3) get in to vagrant
vagrant ssh
4) go to your project (I assume you have a set of database migrations and seeders )
cd ~/code/myproject
4.1) you'll find redis and mysql is working there already.
5) create database
php artisan migrate
6) make SUPERVISOR works if you need it
7) make cron work if you need it
Done
As ceejayoz mentioned, you do not have to do this, you can just continue running the same version. Homestead is meant to be able to be torn down / built back up quickly, with all configuration living within the Homestead.yaml and Vagrantfile files. It's supposed to be able to do the heavy lifting for you with those config files.
As you mentioned, you have your database in Homestead. If you have some data there that is not local test data, ensure you get that exported before destroying. Some people manually modify their Homestead VM via SSH which is not recommended (as you should be using the Homestead.yaml file for changes), but if you have, keep a list of the changes you made and where you made them.
Here is a rundown of things you may want to keep before destroying:
Your Homestead.yaml file, just in case
Your Vagrantfile file(s) (if you've made custom changes)
Database data
Files used / generated by your application (logs, for instance.)
aliases file, if you've made custom changes to it
Elasticsearch data (if you use it)
Neo4j data (if you use it)
As for commands to run, the documentation says it better than I ever could: https://laravel.com/docs/5.7/homestead#updating-homestead

Laravel Homestead vagrant up box issue

I am installing laravel homestead. As I am new on this so maybe i took some steps wrong while installing and setting up laravel homestead on windows.
I followed a tutorial and download laravel homestead box directly and then install it manually by giving it a local disk url. It installed perfectly fine till then. But now when i am trying to "vagrant up" command it says that box doesnt found.
So after that I read somewhere that it we have to add manyual metadata somewhere but I dont know where. And after some changes I am facing this error.
Once you have downloaded the box manually, you need to add it to vagrant config, so vagrant knows about the box for later user. run the following command :
$ vagrant box add --box-version <VERSION_DOWNLOADED> laravel/homestead <path to downloaded file>
After this, make sure to go to the folder where homestead has been cloned (do not do that from the .vagrant directory, just go somewhere else, and avoid path with space, windows generally does not like it; C:\homestead will be just fine for a test) and you can run vagrant up from there

Unable to vagrant box add laravel/homestead (errno 60 / SSL read)

Basically I got this error seconds after I trigger
vagrant box add laravel/homestead in my terminal.
What's more interesting, after second failed attempt, the error message is a little bit different (as you see).
Error number 60 is somehow related to SSL. Since I'm running this command via terminal, I really have no idea how to investigate this issue. Can somebody give me any hints? May it be related to poor wireless internet connection?
slick-mac:~ slick$ vagrant version
Installed Version: 1.7.4
Latest Version: 1.7.4
You're running an up-to-date version of Vagrant!
If you get an SSL issue, you can try to add the box using the insecure option
vagrant box add --insecure laravel/homestead
--insecure When present, SSL certificates won't be verified if the URL is an HTTPS URL
I'm deliberately posting this as an answer because probably I've found solution. So far it's still downloading.
What I did:
1. I removed temp stuff
rm -rf ~/.vagrant.d/tmp/
2. I started the download again
vagrant box add laravel/homestead
So far it's still OK despite of my slow internet connection. If that won't work I will try Frederic's solution.
EDIT:
After 80% it failed. (no --insecure) param.
These SSL related issues are not from client side. It is originated from the source. We can do nothing from our side. I have tried with Windows OS, Mac OS X and manual download with many browsers and even with downloaders, no luck. Somehow I managed to download with mobile browser on 4G. I was wondering why not upload this to place everyone can download.
You can find a mirror here on my Google Drive. It is a copy of laravel/homestead 0.5.0. Have fun.
I encountered the same issue. Adding --insecure argument, specifying url, https://atlas.hashicorp.com/laravel/boxes/homestead, and removing the tmp file beforehand did not work for me.
Brutely repeating download attempts to download did however. Thus, in my case, nothing to do with SSL.
what Worked for me was emptying the temp first then running the following command:
vagrant box add --insecure laravel/homestead
it looks like after failing once ,it couldn't resume correctly until the temp was emptied .
hope this helps.

VMware and Homestead, The provider 'vmware_desktop' could not be found

I can't seem to get VMWare support working with Laravel's Homestead on Windows 7.
I've bought and installed VMWare Workstation and Vagrant's VMWare plugin and added the licence for it.
I've downloaded the homestead box via the command in the laravel docs vagrant box add laravel/homestead and selected option 2 for vmware_desktop.
And specified provider: vmware_desktop in my ~/.homestead/Homestead.yml file and run vagrant up from where I downloaded the Homestead Vagrant files.
And I get the message:
C:\Users\Ezra\Desktop\Homestead>vagrant up
The provider 'vmware_desktop' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.
I've tried different provider names; like: vmware_fusion, vm_desktop, vm_fustion.. etc. Nothing works.
I've got the latest vmware_desktop image at v0.2.7 and visually verified the files exist in the ~/.vagrant.d/boxes directory.
VirtualBox provider works fine. But not VMware. Any ideas? :)
To get Homestead working on Windows, the provider must be set to:
provider: vmware_workstation
Made a PR to the laravel docs, so this shouldn't be an issue for anyone else going forward. :)
For Laravel 5 and Homestead 2.0
Try to run
homestead up
Then
homestead provision
This will reload your ~/.homestead/Homestead.yml for additional sites and/or configuration.

Could not resolve host error when trying to install the Homestead Vagrant Box

I'm having problems installing the Homestead Vagrant box following the guide on the Laravel docs.
I have the current latest version of Vagrant (2.2.6) and whenever I'm trying to add the laravel/homestead box to my Vagrant installation using vagrant box add laravel/homestead I get this error:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Could not resolve host: vagrantcloud-files-production.s3.amazonaws.com
Anyone have a clue on how to fix this and/or where the problem lies? Would be much appreciated.
Okay it works now as Kenny already said, for some reason now (a day later) files begin to download. Looks like it was a problem with S3 or something.

Resources