Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing customers: [ERROR] exception 'Magento\Setup\SampleDataException' #1509

Closed
klierik opened this issue Jul 17, 2015 · 6 comments
Closed
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@klierik
Copy link

klierik commented Jul 17, 2015

Good day.

I`m try install with sample data and get an error:

Installing sample data:
Installing theme:
.
Installing customers:
[ERROR] exception 'Magento\Setup\SampleDataException' with message 'Error during sample data installation: Warning: fopen(): Filename cannot be empty in /vagrant/httpdocs/app/code/Magento/SampleData/Helper/Csv/Reader.php on line 64' in /vagrant/httpdocs/setup/src/Magento/Setup/Model/Installer.php:1117
Stack trace:
#0 [internal function]: Magento\Setup\Model\Installer->installSampleData(Array)
#1 /vagrant/httpdocs/setup/src/Magento/Setup/Model/Installer.php(298): call_user_func_array(Array, Array)
#2 /vagrant/httpdocs/setup/src/Magento/Setup/Controller/Install.php(87): Magento\Setup\Model\Installer->install(Array)
#3 /vagrant/httpdocs/vendor/zendframework/zend-mvc/Controller/AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction()
#4 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#5 /vagrant/httpdocs/vendor/zendframework/zend-eventmanager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#6 /vagrant/httpdocs/vendor/zendframework/zend-eventmanager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#7 /vagrant/httpdocs/vendor/zendframework/zend-mvc/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#8 /vagrant/httpdocs/vendor/zendframework/zend-mvc/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#9 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#10 /vagrant/httpdocs/vendor/zendframework/zend-eventmanager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#11 /vagrant/httpdocs/vendor/zendframework/zend-eventmanager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#12 /vagrant/httpdocs/vendor/zendframework/zend-mvc/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#13 /vagrant/httpdocs/setup/index.php(31): Zend\Mvc\Application->run()
#14 {main}

How can i fix it?

@buskamuza
Copy link
Contributor

Looks like a duplicate of #1288 and related to current discussion in #1361

@buskamuza
Copy link
Contributor

Internal ticket MAGETWO-40412.
@klierik, meanwhile you can check a solution from @dfediuk #1288 (comment)

@vpelipenko vpelipenko added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development MX bug report labels Jul 20, 2015
@kokoc
Copy link
Member

kokoc commented Aug 5, 2015

@klierik could you please verify the files permissions?

  • app/code/Magento/SampleData/fixtures/Customer/ directory must have "+x" flag
  • app/code/Magento/SampleData/fixtures/Customer/customer_profile.csv must be readable for your user

Also this issue is so hard to reproduce, so it will be very helpful if you provide your vagrant configuration.

@kokoc kokoc added Progress: needs update and removed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Aug 5, 2015
@klierik
Copy link
Author

klierik commented Aug 5, 2015

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
    # All Vagrant configuration is done here. The most common configuration
    # options are documented and commented below. For a complete reference,
    # please see the online documentation at vagrantup.com.

    # Every Vagrant virtual environment requires a box to build off of.
    # config.vm.box = "precise64"
    # config.vm.box = "precise32"

    config.vm.box = "trusty64"

    # The url from where the 'config.vm.box' box will be fetched if it
    # doesn't already exist on the user's system.
    # config.vm.box_url = "http://files.vagrantup.com/precise64.box"
    # config.vm.box_url = "http://files.vagrantup.com/precise32.box"

    config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"

    config.vm.provision :shell, :path => "bootstrap.sh"

    # Create a forwarded port mapping which allows access to a specific port
    # within the machine from a port on the host machine. In the example below,
    # accessing "localhost:8080" will access port 80 on the guest machine.
    config.vm.network :forwarded_port, guest: 80, host: 8933
    config.vm.network :forwarded_port, guest: 22, host: 2234


    # Synced folder
    # config.vm.synced_folder "../magento/", "/vagrant/httpdocs"
    # config.vm.synced_folder "../magento/", "/vagrant/httpdocs", nfs: true, mount_options: ["nolock", "async"], bsd__nfs_options: ["alldirs","async","nolock"]
    # config.nfs.map_uid = 0
    # config.nfs.map_gid = 0

    config.vm.synced_folder "../magento2/", "/vagrant/httpdocs", id: "vagrant-root", owner: "vagrant", group: "www-data", mount_options: ["dmode=775,fmode=664"]


    # VirtualBox settings
    config.vm.provider :virtualbox do |vb|
        # vb.customize ["modifyvm", :id, "--memory", "640"]
        # vb.customize ["modifyvm", :id, "--memory", "1024"]
        vb.customize ["modifyvm", :id, "--memory", "2048"]
        # vb.customize ["modifyvm", :id, "--memory", "3072"]
        # vb.customize ["modifyvm", :id, "--memory", "4096"]
    end


    # Host Manager
    config.hostmanager.enabled = true
    config.hostmanager.manage_host = true
    config.hostmanager.ignore_private_ip = false
    config.hostmanager.include_offline = true
    config.vm.define 'magento2' do |node|
        node.vm.hostname = 'magento2'
        node.vm.network :private_network, ip: '192.168.33.34'
        node.hostmanager.aliases = %w(magento2.dev)
    end
end

bootstrap.sh

#!/usr/bin/env bash


echo "=================================================="
echo "Aloha! Now we will try to Install Ubuntu 14.04 LTS"
echo "with Apache 2.4, PHP 5.6, MySQL 5.6(manual)"
echo "and others dependencies needed for Magento 2."
echo "Good luck :P"
echo "=================================================="


echo "=================================================="
echo "SET LOCALES"
echo "=================================================="

export DEBIAN_FRONTEND=noninteractive

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_TYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US en_US.UTF-8
dpkg-reconfigure locales


echo "=================================================="
echo "RUN UPDATE"
echo "=================================================="

apt-get update
apt-get upgrade


echo "=================================================="
echo "INSTALLING APACHE"
echo "=================================================="

apt-get -y install apache2

if ! [ -L /var/www ]; then
  rm -rf /var/www
  ln -fs /vagrant/httpdocs /var/www
fi

VHOST=$(cat <<EOF
<VirtualHost *:80>
  DocumentRoot "/var/www"
  ServerName magento2.dev

  <Directory "/var/www">
    AllowOverride All
  </Directory>

  SetEnv MAGE_IS_DEVELOPER_MODE true
</VirtualHost>
EOF
)
echo "$VHOST" > /etc/apache2/sites-available/000-default.conf

echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/localhost.conf

a2enconf localhost
a2enmod rewrite
service apache2 restart


echo "=================================================="
echo "INSTALLING PHP"
echo "=================================================="

apt-get -y update
add-apt-repository ppa:ondrej/php5-5.6
apt-get -y update
apt-get -y install php5 php5-mhash php5-mcrypt php5-curl php5-cli php5-mysql php5-gd php5-intl php5-xsl

service apache2 restart


echo "=================================================="
echo "INSTALLING COMPOSER"
echo "=================================================="
curl --silent https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

echo "Install Composer dependencies and update chown..."
cd /vagrant/httpdocs && composer install && chown -R www-data
echo "done."


echo "=================================================="
echo "INSTALLING and CONFIGURE NTP"
echo "=================================================="
apt-get -y install ntp


echo "=================================================="
echo "INSTALLING MYSQL and CONFIGURE DATABASE"
echo "======== ATTENTION!!! READ THIS PLEASE ==========="
echo ""
echo "MySQL 5.6 need to be installed manually."
echo "Please run next command and enter password or whatever system will ask you..."
echo ""
echo "$ sudo apt-get install mysql-server-5.6 mysql-client-5.6 && mysql_secure_installation"
echo "$ sudo apt-get -y autoremove && sudo apt-get -y autoclean"
echo ""
echo "After MySQL Installation complete run:"
echo "$ mysql -u root -p"
echo "> create database magento;"
echo "> GRANT ALL ON magento.* TO magento@localhost IDENTIFIED BY 'magento';"
echo "=================================================="


echo "=================================================="
echo "CLEANING..."
echo "=================================================="
apt-get -y autoremove
apt-get -y autoclean


echo "=================================================="
echo "============= INSTALLATION COMPLETE =============="
echo "=================================================="

or check https://github.com/klierik/magento2-vagrant repo

@kokoc
Copy link
Member

kokoc commented Aug 6, 2015

@klierik thank you! We will investigate the issue and get back to you once we have the solution.

@vpelipenko vpelipenko added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed Progress: needs update labels Aug 11, 2015
@daim2k5
Copy link
Contributor

daim2k5 commented Nov 10, 2015

@klierik do you have still the problem? If yes please feel free to reopen the issue

@daim2k5 daim2k5 closed this as completed Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

5 participants