richdynamix / magestead

The Vagrant Solution for Magento Developers
81 stars 29 forks source link

404 on newly create box #60

Open sallynorthmore opened 8 years ago

sallynorthmore commented 8 years ago

Hi,

I've followed the installation steps with no issues (including installing PHP5 + plugins, Vagrant + plugins) and have created a project using Nginx/PhP7/Ubuntu/Magento2 using VirtualBox 5.1.2 and Vagrant 1.8.5.

However navigating to the site URL/host address provided on successful installation displays an nginx 404.

I'm including my terminal output as there are a few warnings/errors that I didn't understand. Also, I noticed in an earlier issue you mentioned installing Magento2 no longer required Composer but it seems to use it here.

Thanks for your help!

Spinning up your custom box Bringing machine 'local' up with 'virtualbox' provider... ==> local: Box 'richdynamix/magestead-ubuntu14-nginx-php70' could not be found. Attempting to find and install... local: Box Provider: virtualbox local: Box Version: >= 0 ==> local: Loading metadata for box 'richdynamix/magestead-ubuntu14-nginx-php70' local: URL: https://atlas.hashicorp.com/richdynamix/magestead-ubuntu14-nginx-php70 ==> local: Adding box 'richdynamix/magestead-ubuntu14-nginx-php70' (v1.0.1) for provider: virtualbox local: Downloading: https://atlas.hashicorp.com/richdynamix/boxes/magestead-ubuntu14-nginx-php70/versions/1.0.1/providers/virtualbox.box ==> local: Successfully added box 'richdynamix/magestead-ubuntu14-nginx-php70' (v1.0.1) for 'virtualbox'! ==> local: Importing base box 'richdynamix/magestead-ubuntu14-nginx-php70'... ==> local: Matching MAC address for NAT networking... ==> local: Checking if box 'richdynamix/magestead-ubuntu14-nginx-php70' is up to date... ==> local: Setting the name of the VM: project-magento_local_1470828850517_71493 ==> local: Clearing any previously set network interfaces... ==> local: Preparing network interfaces based on configuration... local: Adapter 1: nat local: Adapter 2: hostonly ==> local: Forwarding ports... local: 80 (guest) => 8000 (host) (adapter 1) local: 443 (guest) => 44300 (host) (adapter 1) local: 3360 (guest) => 33600 (host) (adapter 1) local: 5432 (guest) => 54320 (host) (adapter 1) local: 8025 (guest) => 8025 (host) (adapter 1) local: 22 (guest) => 2222 (host) (adapter 1) ==> local: Running 'pre-boot' VM customizations... ==> local: Booting VM... ==> local: Waiting for machine to boot. This may take a few minutes... local: SSH address: 127.0.0.1:2222 local: SSH username: vagrant local: SSH auth method: private key ==> local: Machine booted and ready! ==> local: Checking for guest additions in VM... local: The guest additions on this VM do not match the installed version of local: VirtualBox! In most cases this is fine, but in rare cases it can local: prevent things such as shared folders from working properly. If you see local: shared folder errors, please make sure the guest additions within the local: virtual machine match the version of VirtualBox you have installed on local: your host and reload your VM. local: local: Guest Additions Version: 5.0.10 local: VirtualBox Version: 5.1 ==> local: [vagrant-hostsupdater] Checking for host entries ==> local: [vagrant-hostsupdater] Writing the following entries to (/etc/hosts) ==> local: [vagrant-hostsupdater] 192.168.47.47 magestead-project-magento.dev # VAGRANT: fda867af7ce4796fd0c1dda97b86c35c (local) / 52ea3661-4190-45b9-ae6a-dc4280c92456 ==> local: [vagrant-hostsupdater] 192.168.47.47 magestead2.dev # VAGRANT: fda867af7ce4796fd0c1dda97b86c35c (local) / 52ea3661-4190-45b9-ae6a-dc4280c92456 ==> local: [vagrant-hostsupdater] 192.168.47.47 www.magestead2.dev # VAGRANT: fda867af7ce4796fd0c1dda97b86c35c (local) / 52ea3661-4190-45b9-ae6a-dc4280c92456 ==> local: [vagrant-hostsupdater] 192.168.47.47 project-magento.dev # VAGRANT: fda867af7ce4796fd0c1dda97b86c35c (local) / 52ea3661-4190-45b9-ae6a-dc4280c92456 ==> local: [vagrant-hostsupdater] This operation requires administrative access. You may skip it by manually adding equivalent entries to the hosts file. Password: ==> local: Setting hostname... ==> local: Configuring and enabling network interfaces... ==> local: Exporting NFS shared folders... ==> local: Preparing to edit /etc/exports. Administrator privileges will be required... The nfsd service does not appear to be running. Starting the nfsd service ==> local: Mounting NFS shared folders... ==> local: Mounting shared folders... local: /vagrant => /Users/sal/Sites/project-magento ==> local: Creating bind mounts for selected devices ==> local: Creating bind mount from /mnt/vagrant-vflsf_uocnhnxzm524 to /var/www ==> local: Running provisioner: shell... local: Running: inline script ==> local: Running provisioner: shell... local: Running: /var/folders/1x/2yvh7bns0klclgm4yq0twt947mbvf0/T/vagrant-shell20160810-5758-9u0r69.sh ==> local: ==> local: ███╗ ███╗ █████╗ ██████╗ ███████╗███████╗████████╗███████╗ █████╗ ██████╗ ==> local: ████╗ ████║██╔══██╗██╔════╝ ██╔════╝██╔════╝╚══██╔══╝██╔════╝██╔══██╗██╔══██╗ ==> local: ██╔████╔██║███████║██║ ███╗█████╗ ███████╗ ██║ █████╗ ███████║██║ ██║ ==> local: ██║╚██╔╝██║██╔══██║██║ ██║██╔══╝ ╚════██║ ██║ ██╔══╝ ██╔══██║██║ ██║ ==> local: ██║ ╚═╝ ██║██║ ██║╚██████╔╝███████╗███████║ ██║ ███████╗██║ ██║██████╔╝ ==> local: ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═════╝ ==> local: ==> local: ____ ____ _ _ ____ _ generated using ==> local: | _ \ _ _| _ \| | | | _ \ ___| |_ ___ ___ _ __ ___ ==> local: | |_) | | | | |_) | |_| | |_) / _ \ __| / __/ _ \| '_ \ ==> local: | **/| || | _/| | / / | | (| () | | | | | | ==> local: || *,|| || ||_| |()_\/|| || || ==> local: Running provisioner: shell... local: Running: /var/folders/1x/2yvh7bns0klclgm4yq0twt947mbvf0/T/vagrant-shell20160810-5758-fehcvz.sh ==> local: Generating public/private rsa key pair. ==> local: Your identification has been saved in /vagrant/puphpet/files/dot/ssh/root_id_rsa. ==> local: Your public key has been saved in /vagrant/puphpet/files/dot/ssh/root_id_rsa.pub. ==> local: The key fingerprint is: ==> local: 7a:c3:14:bf:ec:d2:ac:ce:b3:35:5a:38:28:4f:38:2f root@magestead-project-magento ==> local: The key's randomart image is: ==> local: +--[ RSA 2048]----+ ==> local: | | ==> local: | | ==> local: | . | ==> local: | o | ==> local: | S . | ==> local: | . = o . | ==> local: | + + o | ==> local: | E* ooBo. | ==> local: | .o.=. | ==> local: +-----------------+ ==> local: E ==> local: : ==> local: Unable to locate package putty-tools ==> local: /tmp/vagrant-shell: line 22: puttygen: command not found ==> local: Your private key for SSH-based authentication has been saved to 'puphpet/files/dot/ssh/root_id_rsa'! ==> local: Generating public/private rsa key pair. ==> local: Your identification has been saved in /vagrant/puphpet/files/dot/ssh/id_rsa. ==> local: Your public key has been saved in /vagrant/puphpet/files/dot/ssh/id_rsa.pub. ==> local: The key fingerprint is: ==> local: 0c:04:58:6c:78:fe:b8:6c:61:04:d3:85:32:3d:1d:72 root@magestead-project-magento ==> local: The key's randomart image is: ==> local: +--[ RSA 2048]----+ ==> local: | B+=E. | ==> local: | B O+. | ==> local: | O .. | ==> local: | o o | ==> local: | . o S | ==> local: | + . | ==> local: | o o | ==> local: | + | ==> local: | . | ==> local: +-----------------+ ==> local: E ==> local: : ==> local: Unable to locate package putty-tools ==> local: /tmp/vagrant-shell: line 22: puttygen: command not found ==> local: Your private key for SSH-based authentication has been saved to 'puphpet/files/dot/ssh/id_rsa'! ==> local: Adding generated root key to /root/.ssh/id_rsa ==> local: Adding generated root key to /root/.ssh/id_rsa.pub ==> local: Adding generated root key to /root/.ssh/authorized_keys ==> local: Adding generated key to /home/vagrant/.ssh/id_rsa ==> local: Adding generated key to /home/vagrant/.ssh/id_rsa.pub ==> local: Adding generated key to /home/vagrant/.ssh/authorized_keys ==> local: Running provisioner: shell... local: Running: /var/folders/1x/2yvh7bns0klclgm4yq0twt947mbvf0/T/vagrant-shell20160810-5758-jhswm8.sh ==> local: Created file /.puphpet-stuff/mba_12345-ran ==> local: --- Installing Database for Magento 2 --- ==> local: --- Configuring NGINX VHOST for Magento 2 --- ==> local: * Restarting nginx nginx ==> local: ...done. ==> local: Running provisioner: shell... local: Running: /var/folders/1x/2yvh7bns0klclgm4yq0twt947mbvf0/T/vagrant-shell20160810-5758-1xiouau.sh Installing Magento 2 with Composer

[Composer\Downloader\TransportException] The 'https://repo.magento.com/packages.json' URL required authentication. You must be using the interactive console to authenticate

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []

Warning: file_get_contents(/Users/sal/Sites/project-magento/public/composer.json): failed to open stream: No such file or directory in /Users/sal/.composer/vendor/richdynamix/magestead/src/Magestead/Installers/Magento2Project.php on line 238

Warning: file_put_contents(/Users/sal/Sites/project-magento/public/composer.json): failed to open stream: No such file or directory in /Users/sal/.composer/vendor/richdynamix/magestead/src/Magestead/Installers/Magento2Project.php on line 241 Installing PHPSpec sh: line 0: cd: /Users/sal/Sites/project-magento/public: No such file or directory Using version ^2.5 for phpspec/phpspec ./composer.json has been created Loading composer repositories with package information Updating dependencies (including require-dev)

symfony/event-dispatcher suggests installing symfony/dependency-injection () symfony/event-dispatcher suggests installing symfony/http-kernel () symfony/console suggests installing psr/log (For using the console logger) phpspec/phpspec suggests installing phpspec/nyan-formatters (~1.0 – Adds Nyan formatters) Writing lock file Generating autoload files /usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /var/www/public: No such file or directory chmod: cannot access ‘bin/phpspec’: No such file or directory bash: bin/phpspec: No such file or directory Installing Behat sh: line 0: cd: /Users/sal/Sites/project-magento/public: No such file or directory Using version ^3.1 for behat/behat ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev)

symfony/translation suggests installing psr/log (To use logging capability in translator) symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration) symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them) symfony/class-loader suggests installing symfony/polyfill-apcu (For using ApcClassLoader on HHVM) behat/behat suggests installing behat/symfony2-extension (for integration with Symfony2 web framework) behat/behat suggests installing behat/yii-extension (for integration with Yii web framework) behat/behat suggests installing behat/mink-extension (for integration with Mink testing framework) Writing lock file Generating autoload files /usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /var/www/public: No such file or directory chmod: cannot access ‘bin/behat’: No such file or directory bash: bin/behat: No such file or directory Setting Permissions /usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /var/www/public: No such file or directory Folder Permissions Set /usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /var/www/public: No such file or directory File Permissions Set /usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /var/www/public: No such file or directory chmod: cannot access ‘bin/magento’: No such file or directory chmod: cannot access ‘bin/phpspec’: No such file or directory chmod: cannot access ‘bin/behat’: No such file or directory bin/magento Permissions Set Installing Magento 2 Software /usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /var/www/public: No such file or directory bash: bin/magento: No such file or directory Reindexing Tables /usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /var/www/public: No such file or directory bash: bin/magento: No such file or directory Flushing All Cache /usr/local/rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /var/www/public: No such file or directory bash: bin/magento: No such file or directory Configuring Redis Cache

Warning: include(/Users/sal/Sites/project-magento/public/app/etc/env.php): failed to open stream: No such file or directory in /Users/sal/.composer/vendor/richdynamix/magestead/src/Magestead/Installers/Magento2Project.php on line 137

Warning: include(): Failed opening '/Users/sal/Sites/project-magento/public/app/etc/env.php' for inclusion (include_path='.:') in /Users/sal/.composer/vendor/richdynamix/magestead/src/Magestead/Installers/Magento2Project.php on line 137

Warning: file_put_contents(/Users/sal/Sites/project-magento/public/app/etc/env.php): failed to open stream: No such file or directory in /Users/sal/.composer/vendor/richdynamix/magestead/src/Magestead/Installers/Magento2Project.php on line 178 SUCCESS: Magestead has finished installing Magento 2!`

richdynamix commented 8 years ago

Hi,

Unfortunately the project never completed successfully as you did not have the correct credentials set for repo.magento.com. This is required for installing Magento 2.

If you have never done this before then Magestead would prompt you for your credentials and save them to your ~/.composer/auth.json file and won't ask you again. It's quite possible the details are incorrect in your auth.json file.

You should have something similar to this -

{
    "http-basic": {
        "repo.magento.com": {
            "password": "YOUR-MAGENTO-PUBLIC-KEY",
            "username": "YOUR-MAGENTO-PRIVATE-KEY"
        }
    }
}

You can find your credentials in your Magento account under connect. This is your keys.

anarbayramov commented 8 years ago

Hey I've correct credentials even though I get 404 after fresh install thank you

richdynamix commented 8 years ago

Are you sure the credentials are correct? The output you have added suggests they are wrong -

[Composer\Downloader\TransportException]
The 'https://repo.magento.com/packages.json' URL required authentication.
You must be using the interactive console to authenticate

Perhaps you could regenerate new credentials and add them to your auth.json

dsmolovich commented 7 years ago

magestead keeps asking for magento repo's username/password even though I have it is set in ~/.composer/auth.json

$ cat ~/.composer/auth.json 
{"http-basic":{"repo.magento.com":{"password":"XXX...XXX","username":"YYY...YYY"}}}

Is there any solution?

Another issue I have is with the repository.

Vagrant assumes that this means the command failed!

yum -y install fuse

Stdout from the command:

Loaded plugins: priorities
Setting up Install Process

Stderr from the command:

http://apt.sw.be/redhat/el6/en/x86_64/extras/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: repoforgeextras. Please verify its path and try again

Unfortunately can't get through this.

I used the next options:

Which OS would you like to install?
  [0] CentOS 6.5
  [1] Ubuntu 14
 > 0
Which webserver would you like?
  [0] NGINX
  [1] Apache
 > 1
Which version of PHP should be installed?
  [0] 56
  [1] 70
 > 1
Lets configure your project's application
Which application do you want to install?
  [0] Magento
  [1] Magento2
 > 1

Thank you for any help.

BTW this project seems very promising for my needs.

digixweb commented 7 years ago

I also got 404 after installation. Logging into SSH of the vagrant box, I ran composer install again, and the 404 got replaced by Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\App\Config\Scope\ReaderPoolInterface.

I have installed mcrypt and ext-intl, but still I get this warning after composer update: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_intl.dll' - /usr/lib/php/20151012/php_intl.dll: cannot open shared object file: No such file or directory in Unknown on line 0

digixweb commented 7 years ago

To follow up: it's very important to get the necessary extensions working properly. I have installed php 7.0 again with the suggested http://php-osx.liip.ch/ and now it is working!