Troubleshooting
Click on an issue to see how to troubleshoot.
If you get the error below while running ./setup, on the Setup Zed step:
Zed Exception: RuntimeException - psql: FATAL: Peer authentication failed for user "postgres"
then open the PostgreSQL configuration file :
sudo vim /etc/postgresql/9.4/main/pg_hba.conf
and make sure that the first line contains the following input:
TYPE DATABASE USER ADDRESS METHOD
local all postgres trust
If you get the Too many open files error while running ./vendor/bin/install, you need to adjust the maximum number of open files as follows:
ulimit -n 65535
If you get an error on downloading Spryker VM box image file, try running Vagrant with debug to see potential errors: vagrant up --debug.
Also, you can go to Spryker VM Releases page and download the box manually. After finishing the box download, you need to run the following:
vagrant box add /path/to/downloaded/image/file.box --name <boxname>
vagrant up
If you get The host path of the shared folder is missing error when building the virtual machine in Windows, you need to clone the Spryker repository manually and start the machine again. To do this, execute the following commands:
mkdir project
cd project
git clone https://github.com/spryker-shop/suite.git .
cd ..
vagrant up
If Spryker Virtual Machine gets stuck at the Configuring and enabling network interfaces message during start up, do the following:
- Press Ctrl+C twice to stop the VM start up process.
- Execute the vagrant halt command to stop the VM.
- Start the virtual machine again with vagrant up.
If you get a message that the machine is already running, end all processes related to Vagrant, Virtualbox and Ruby. Then try again.
- If the start up process halts again with the same message, delete all virtual network interfaces in Virtualbox and restart the VM again.
The interfaces will be re-created automatically.
During Spryker Commerce OS installation , you can get the following error:
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! spryker-master-suite@ zed: `node ./node_modules/@spryker/oryx-for-zed/build`
npm ERR! Exit status 137
npm ERR! Failed at the spryker-master-suite@ zed script.
To fix it:
- On the host, execute the following commands:
.vagrant reload vagrant ssh
- In the code installation directory, delete folder node_modules and file package_lock.json.
- Execute the following command inside the VM:
vendor/bin/install -s frontend
If you get the following error:
NFS is reporting that your exports file is invalid, this means that Vagrant does this check before making any changes to the file. Please correct the issues below and execute "vagrant reload": exports:3: path contains non-directory or non-existent components: /devvm/pillar exports:3: no usable directories in export entry exports:3: using fallback (marked offline): / exports:4: path contains non-directory or non-existent components: /devvm/saltstack exports:4: no usable directories in export entry exports:4: using fallback (marked offline): /
run the following commands, try re-creating NFS exports:
sudo rm /etc/exports
sudo touch /etc/exports
If you still get the NFS is reporting that your export file is invalid error, this can also happen because you previously had VMs that were not properly destroyed. Also, such an error can occur when multiple VMs are hosted o the same computer. To fix this:
sudo sed -i .bak '/VAGRANT-BEGIN/,/VAGRANT-END/d' /etc/exports
Then, you need to re-initialize the VM:
vagrant halt
vagrant up --provision
# - OR -
vagrant destroy
vagrant up
You can get the following error when running vendor/bin/console or console commands inside the development VM:
Error: ENOTEMPTY, directory not empty '/data/shop/development/current/static/public/Yves/images/icons' at Error (native)
This is caused by peculiarities of the NFS file system design. Make sure you have the latest version of the VM installed and also disable the Ngnix open_file_cache feature. To do so, execute the following commands:
sudo grep -r open_file_cache /etc/nginx/
/etc/nginx/nginx.conf: open_file_cache off;
To get the latest Saltstack for your VM and reconfigure Nginx, do the following:
# on your host
cd vendor/spryker/saltstack # (or where you have the Saltstack repository on your host)
git pull
# inside the vm
sudo salt-call state.highstate whitelist=nginx
If you are running Mac OSX as a host system: disable Spotlight for your Code directory. For details, see: How to disable spotlight index for specific folder in Mac OS X.
To remove stale .nfs files, execute the following either on your host or inside the VM:
find . -name .nfs\* -exec rm {} \;
[Elastica\Exception\Connection\HttpException] Couldn't connect to host, Elasticsearch down?
Restart Elasticsearch:
# find out which Elasticsearch you are using:
grep -r ELASTICA_PARAMETER__PORT /data/shop/development/current/config/Shared
# If you have port 10005
sudo -i service elasticsearch-development restart
# Older VMs used port 9200
sudo -i service elasticsearch restart
Do you have more than one Elasticsearch instances running?
sudo -i service elasticsearch status
sudo -i service elasticsearch-development status
sudo -i service elasticsearch-testing status
# Stop some of them ... (see above on how to figure out which one)
sudo -i service elasticsearch... stop
# ... and disable them
sudo -i update-rc.d elasticsearch... disable
You can get the following exception from Redis:
Exception: stream_socket_client(): unable to connect to tcp://......:10009 (Connection refused)
This means that Redis encountered a corrupted AOF file. The following error will also be logged in Redis logs located in the following folder: /data/logs/development/redis:
Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix [filename];
To fix the exception:
-
Run
sudo redis-check-aof --fix /data/shop/development/shared/redis/appendonly.aof
You should get:
Successfully truncated AOF
- Start Redis server
sudo service redis-server-development start
- Make sure Redis can write log files under: /data/logs/development/redis/
sudo chown redis:redis /data/logs/development/redis/ -R
If you encounter error messages like this one:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "de_DE.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "de_DE.UTF-8",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Go to iterm2 Preferences -> Profiles -> Terminal and disable option Set locale variables automatically.
We recommend setting up TCP/IP over SSH for MySQL to avoid port clashing with the host system. For current connection values have a look at config/Shared/config_default-development_DE.php. Use $HOME/.vagrant.d/insecure_private_key as SSH Key File.
MySQL:
In case the connection fails, run the following command :
CREATE USER 'root'@'%' IDENTIFIED BY ''; # no password will be set
GRANT ALL PRIVILEGES ON * . * TO 'root'@'%';
FLUSH PRIVILEGES;
This command creates a new root user with full permissions.
If you receive an error about a wrong curl version on Mac OS, you resolve the issue using the following command:
sudo rm -rf /opt/vagrant/embedded/bin/curl
If you see the above error during composer install or composer update, you need to change your composer configuration. Run composer config -ge in the terminal and replace the configuration with the following one
{
"repositories": {
"packagist": { "url": "https://packagist.org", "type": "composer" }
}
}
SIP (System Integrity Protection) is a MacOS feature that protects the system files from modification. In some cases, it precludes the proper functioning of third-party applications and may prevent you from installing Spryker on MacOS starting from version 10.11 El Capitan. To solve this problem, you need to disable SIP during the installation:
- Reboot your Mac and hold down the Command+R as it boots.
- Wait for entering the recovery environment.
- Click on the “Utilities” menu and select “Terminal”.
- Type csrutil disable in the terminal and press Enter.
- Type reboot.
Now SIP is disabled and you can start your installation. After it’s finished, it is strongly recommended enabling SIP again. You can do this by following the previous steps again with typing csrutil enable at Step 4. To determine, whether SIP is enabled or not, you can type csrutil status.
Last review date: November 11, 2018